Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MaxSequence maximum allowed value MaxSequence uint32 = math.MaxUint32 >> 4 // 268435455 )
Variables ¶
View Source
var ErrSequenceOverflow = fmt.Errorf("sequence over the max limition of %d", MaxSequence)
ErrSequenceOverflow oveflow error
Functions ¶
Types ¶
type Generator ¶
type Generator interface { New(prefix Prefix) (string, error) Parse(id string) (Prefix, time.Time, error) }
Generator genarate a 18len decimal id with 2len prefix
func NewGenerator ¶
NewGenerator create a new generator
Click to show internal directories.
Click to hide internal directories.