Documentation
¶
Index ¶
- Variables
- type Snowflake
- func (s Snowflake) Before(reference Snowflake) bool
- func (s *Snowflake) FromString(str string) error
- func (s Snowflake) GoString() string
- func (s Snowflake) IsZero() bool
- func (s Snowflake) MarshalJSON() ([]byte, error)
- func (s Snowflake) String() string
- func (s Snowflake) Time() time.Time
- func (s *Snowflake) UnmarshalJSON(data []byte) error
- type Snowflaker
Constants ¶
This section is empty.
Variables ¶
View Source
var Clock = func() time.Time { return time.Now() }
View Source
var Epoch = time.Date(2014, 12, 0, 0, 0, 0, 0, time.UTC)
View Source
var SeqCounter uint64
Functions ¶
This section is empty.
Types ¶
type Snowflake ¶
type Snowflake uint64
func NewFromString ¶
func NewFromTime ¶
func (*Snowflake) FromString ¶
func (Snowflake) MarshalJSON ¶
func (*Snowflake) UnmarshalJSON ¶
type Snowflaker ¶
var DefaultSnowflaker Snowflaker