Versions in this module Expand all Collapse all v0 v0.0.4 Oct 24, 2021 Changes in this version + func DecodeBSON(d interface{}, val interface{}) (err error) + func DecodeBSONSlice(dSlice []interface{}, val interface{}) (err error) + func GenerateAccessKey(lengthArg ...uint8) []byte + func GenerateStringAccessKey(lengthArg ...uint8) string + func NumKiloString(n uint64) string + func NumMetaKiloString(n uint64) string + func NumMetaString(n uint64) string + func TimeBetween(t time.Time, start *time.Time, end *time.Time) bool + func TimeDayAt(t time.Time, offset time.Duration) time.Time + func TimeHourAt(t time.Time) time.Time + func TimeMinuteAt(t time.Time) time.Time + func TimeMonthAt(t time.Time, offset time.Duration) time.Time + func TimeParseAny(value string) (*time.Time, error) + func TimeSecondAt(t time.Time) time.Time + type Authorization struct + func NewAuthorization(cred *Credential) *Authorization + func (authorization *Authorization) CheckPermission(perm int32) bool + func (authorization *Authorization) IsAuthorized() bool + func (authorization *Authorization) PopPermission() (perm int32, err error) + func (authorization *Authorization) PushPermission(perm int32) (err error) + type Clicker interface + Now func() time.Time + type ClockGenerator struct + func NewClockGenerator(clock Clicker, d time.Duration, bufferSize ...uint16) (clockGenerator *ClockGenerator) + func (clockGenerator *ClockGenerator) Channel() <-chan time.Time + func (clockGenerator *ClockGenerator) Receive(ctx context.Context) (t time.Time, ok bool) + func (clockGenerator *ClockGenerator) Stop() + type Credential struct + AccessKey []byte + func NewCredentialFromKnownAccessKey(accessKey []byte, secretLength ...int) (credential *Credential) + func NewCredentialFromKnownAccessKeyChain(accessKey ...string) (credential *Credential) + func NewCredentialFromKnownStringAccessKey(accessKey string, secretLength ...int) (credential *Credential) + func (credential *Credential) AccessKeys() [][]byte + func (credential *Credential) Append(next *Credential) (newCredential *Credential) + func (credential *Credential) Attach(next *Credential) + func (credential *Credential) Clone() *Credential + func (credential *Credential) ID() []byte + func (credential *Credential) StringAccessKeys() []string + func (credential *Credential) StringID() string + func (credential *Credential) StringToken() string + func (credential *Credential) Token() []byte + type CredentialChain = *Credential + func CredentialChainFromToken(token []byte, levelParam ...int) CredentialChain + type KVPairs []kvPair + func (pairs KVPairs) Get(key string) (val interface{}, ok bool) + func (pairs KVPairs) Set(key string, val interface{}) (newPairs KVPairs)