pulid

package
v1.1.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID string

ID implements a PULID - a prefixed ULID.

func MustNew

func MustNew(prefix string) ID

MustNew returns a new PULID for time.Now() given a prefix. This uses the default entropy source.

func Ptr added in v1.1.6

func Ptr(s string) *ID

func (ID) MarshalGQL

func (u ID) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface

func (*ID) Scan

func (u *ID) Scan(src any) error

Scan implements the Scanner interface.

func (*ID) UnmarshalGQL

func (u *ID) UnmarshalGQL(v any) error

UnmarshalGQL implements the graphql.Unmarshaler interface

func (ID) Value

func (u ID) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL