Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IdGenerator ¶
type IdGenerator interface {
Next() int64
}
func NewSnowflakeIdGenerator ¶ added in v1.7.0
func NewSnowflakeIdGenerator(nid int64) (IdGenerator, error)
type SnowflakeIdGenerator ¶
type SnowflakeIdGenerator struct {
// contains filtered or unexported fields
}
func (*SnowflakeIdGenerator) Next ¶
func (s *SnowflakeIdGenerator) Next() int64
type StringIdGenerator ¶ added in v1.7.0
type StringIdGenerator interface {
Next() string
}
func NewStringIdGenerator ¶ added in v1.7.0
func NewStringIdGenerator(nid int16, len int) StringIdGenerator
Click to show internal directories.
Click to hide internal directories.