Versions in this module Expand all Collapse all v0 v0.1.0 Jul 26, 2026 Changes in this version + var ErrBadReset = errors.New("sequent: unknown reset policy") + var ErrBadSeq = errors.New("sequent: seq must be >= 1") + var ErrBadTemplate = errors.New("sequent: malformed template") + var ErrNilLocation = errors.New("sequent: nil location") + var ErrNilStore = errors.New("sequent: nil Store") + var ErrNoSeq = errors.New("sequent: template has no {seq} token") + type Format struct + func NewFormat(template string, reset Reset, opts ...Option) (*Format, error) + func (f *Format) Allocate(ctx context.Context, s Store, scope Scope, at time.Time) (string, error) + func (f *Format) Key(scope Scope, at time.Time) string + func (f *Format) Location() *time.Location + func (f *Format) Render(scope Scope, seq int64, at time.Time) (string, error) + func (f *Format) Reset() Reset + func (f *Format) Template() string + type MemStore struct + func NewMemStore() *MemStore + func (m *MemStore) Next(ctx context.Context, key string) (int64, error) + func (m *MemStore) Peek(key string) int64 + type Option func(*formatConfig) + func InLocation(loc *time.Location) Option + type Reset uint8 + const Daily + const Monthly + const Never + const Yearly + func (r Reset) String() string + type Scope struct + Series string + Tenant string + type Store interface + Next func(ctx context.Context, key string) (int64, error)