Documentation ¶
Index ¶
- type RateLimits
- type Token
- type TokenV1
- func (t *TokenV1) Sign(secret []byte) []byte
- func (t TokenV1) String() string
- func (t *TokenV1) ValidSignature(secret []byte) bool
- func (t *TokenV1) WithExpireAt(t1 time.Time) *TokenV1
- func (t *TokenV1) WithRateLimits(rps float32, burstMultiplicator uint8, perIP bool) *TokenV1
- func (t *TokenV1) WithSubtokenID(id uint32) *TokenV1
- func (t *TokenV1) WithTTL(duration time.Duration) *TokenV1
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimits ¶ added in v1.0.0
type Token ¶
type Token struct { TokenV1 // contains filtered or unexported fields }
func ParseToken ¶
type TokenV1 ¶
type TokenV1 struct { AppID uint32 TokenID uint32 IsSubtoken bool SubtokenID uint32 ExpireAt *time.Time Limits *RateLimits Signature [32]byte // contains filtered or unexported fields }
func NewTokenV1 ¶
func (*TokenV1) ValidSignature ¶
func (*TokenV1) WithRateLimits ¶
func (*TokenV1) WithSubtokenID ¶
Click to show internal directories.
Click to hide internal directories.