Documentation
¶
Index ¶
- Variables
- type IDType
- type UUID
- func (u UUID) IsNil() bool
- func (u UUID) MarshalText() ([]byte, error)
- func (u UUID) Sequence() uint8
- func (u UUID) String() string
- func (u UUID) Time() time.Time
- func (u UUID) Timestamp() uint64
- func (u UUID) Type() IDType
- func (u *UUID) UnmarshalText(text []byte) error
- func (u UUID) Unused() uint64
- func (u UUID) Version() uint8
- type UUIDGenerator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLength = errors.New(`invalid UUID length`) ErrInvalidVersion = errors.New(`invalid UUID version`) )
Functions ¶
This section is empty.
Types ¶
type UUID ¶
type UUID [16]byte
UUID is a 128-bit identifier.
func FromString ¶
Checks version, passes off to version specific parser
func (UUID) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*UUID) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type UUIDGenerator ¶
type UUIDGenerator struct {
// contains filtered or unexported fields
}
UUIDGenerator is responsible for generating unique UUIDs.
func (*UUIDGenerator) NewUUID ¶
func (g *UUIDGenerator) NewUUID(typeID IDType) UUID
NewUUID generates a new UUID for the given typeID (0 ≤ typeID < 256).
Click to show internal directories.
Click to hide internal directories.