Documentation ¶
Index ¶
- func Time(ms uint64) time.Time
- func Timestamp(t time.Time) uint64
- type UUID
- func (u UUID) HashLike() string
- func (u UUID) MarshalBinary() (data []byte, err error)
- func (u UUID) MarshalJSON() ([]byte, error)
- func (u UUID) MarshalText() ([]byte, error)
- func (u UUID) Next() (UUID, error)
- func (u *UUID) Scan(src interface{}) error
- func (u UUID) String() string
- func (u UUID) TimeUUIDToTime() (time.Time, error)
- func (u *UUID) UnmarshalBinary(data []byte) error
- func (u *UUID) UnmarshalJSON(b []byte) error
- func (u *UUID) UnmarshalText(text []byte) error
- func (u UUID) Value() (driver.Value, error)
- func (u UUID) XOR(v UUID) (UUID, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UUID ¶
type UUID string
var (
Nil UUID
)
func FromHashLike ¶
FromHashLike parses uuid in hash format, eg: afe406938f63476685f1250a427f1db5
func FromString ¶
FromString parses uuid in canonical format, eg: afe40693-8f63-4766-85f1-250a427f1db5
func (UUID) HashLike ¶
HashLike returns the uuid without dashes, eg: afe406938f63476685f1250a427f1db5
func (UUID) MarshalBinary ¶
func (UUID) MarshalJSON ¶
func (UUID) MarshalText ¶
func (UUID) Next ¶
Next generates a new uuid from the current one. The uuid returned is consistent, meaning calling Next() on a given uuid will always return the same value.
func (UUID) TimeUUIDToTime ¶
TimeUUIDToTime converts UUID into UTC time. @warning - Handle with care. If you use it for single UUID you will receive random/invalid timestamp.
func (*UUID) UnmarshalBinary ¶
func (*UUID) UnmarshalJSON ¶
func (*UUID) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.