Documentation
¶
Overview ¶
Package uid sourced from: https://github.com/ent/contrib/blob/master/entgql/internal/todopulid/ent/schema/pulid/pulid.go
Index ¶
Constants ¶
View Source
const ( PrefixLen = 5 ULIDLen = 26 IDLen = PrefixLen + ULIDLen )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID string
ID implements a uid - a prefixed ULID.
func MustNew ¶
MustNew returns a new uid for time.Now() given a prefix. This uses the default entropy source.
func (*ID) IsValid ¶
IsValid checks the length of an ID. And returns true if the ID length is valid.
func (ID) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface.
func (*ID) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.