Documentation
¶
Index ¶
- Constants
- Variables
- type Generator
- type ID
- func (id ID) MarshalBinary() (data []byte, err error)
- func (id ID) MarshalJSON() ([]byte, error)
- func (id ID) MarshalText() (text []byte, err error)
- func (id *ID) Scan(src any) error
- func (id ID) String() string
- func (id *ID) UnmarshalBinary(data []byte) error
- func (id *ID) UnmarshalJSON(p []byte) error
- func (id *ID) UnmarshalText(text []byte) error
- func (id ID) Value() (driver.Value, error)
Constants ¶
View Source
const ( // Unix timestamp of Nov 04 2010 01:42:54 UTC in seconds, // you may customize this to set a different epoch for your application. SnowflakeEpoch int64 = 1288834974 )
Variables ¶
View Source
var ( ErrInvalidStringLength = errors.New("ErrInvalidStringLength") ErrInvalidStringChar = errors.New("ErrInvalidStringChar") )
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID [lenbyt]byte
var Empty ID
func (ID) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (ID) MarshalJSON ¶
MarshalJSON implements encoding/json.Marshaler
func (ID) MarshalText ¶
MarshalText implements encoding.TextMarshaler
func (*ID) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
func (*ID) UnmarshalJSON ¶
UnmarshalJSON implements encoding/json.Unmarshaler
func (*ID) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler
Click to show internal directories.
Click to hide internal directories.