Documentation
¶
Overview ¶
Package sandid implements a unique ID generation algorithm to ensure that every grain of sand on Earth has its own ID.
Index ¶
- func Compare(a, b SandID) int
- func Equal(a, b SandID) bool
- type NullSandID
- type SandID
- func (sID SandID) IsZero() bool
- func (sID SandID) MarshalBinary() ([]byte, error)
- func (sID SandID) MarshalJSON() ([]byte, error)
- func (sID SandID) MarshalText() ([]byte, error)
- func (sID *SandID) Scan(value interface{}) error
- func (sID SandID) String() string
- func (sID *SandID) UnmarshalBinary(data []byte) error
- func (sID *SandID) UnmarshalJSON(data []byte) error
- func (sID *SandID) UnmarshalText(text []byte) error
- func (sID SandID) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NullSandID ¶
NullSandID represents an instance of SandID that may be null. It implements database/sql.Scanner so it can be used as a scan destination.
func (*NullSandID) Scan ¶
func (nsID *NullSandID) Scan(value interface{}) error
Scan implements database/sql.Scanner.
func (NullSandID) Value ¶
func (nsID NullSandID) Value() (driver.Value, error)
Value implements driver.Valuer.
type SandID ¶
type SandID [16]byte
SandID is an ID of sand.
func (SandID) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (SandID) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (SandID) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*SandID) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (*SandID) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*SandID) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
Click to show internal directories.
Click to hide internal directories.