Documentation ¶
Index ¶
- type ID
- func (id ID) Bytes() []byte
- func (id ID) Compare(other ID) int
- func (id ID) Equal(other ID) bool
- func (id ID) IsZero() bool
- func (id ID) Marshal() ([]byte, error)
- func (id ID) MarshalJSON() ([]byte, error)
- func (id ID) MarshalTo(data []byte) (n int, err error)
- func (id *ID) Size() int
- func (id ID) String() string
- func (id ID) Time() uint64
- func (id ID) Timestamp() uint64
- func (id *ID) Unmarshal(data []byte) error
- func (id *ID) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
ID is an alias of ulid.ULID.
func NewPopulatedID ¶
func NewPopulatedID(r randyID) *ID
NewPopulatedID only required if populate option is set
func (ID) MarshalJSON ¶
MarshalJSON returns id in human readable string format.
func (*ID) UnmarshalJSON ¶
UnmarshalJSON unmarshals and valid data.
Click to show internal directories.
Click to hide internal directories.