Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DbDeleteTokenBody ¶
type DbDeleteTokenBody struct {
Enabled bool `bson:"enabled"`
}
type DbDeleteTokenDocument ¶
type DbDeleteTokenDocument struct {
Set DbDeleteTokenBody `bson:"$set"`
}
type DbTokenIdFilter ¶
type TokenRepository ¶
type TokenRepository interface {
Insert(userID primitive.ObjectID) (*Token, error)
FindByID(tokenID string) (*Token, error)
Delete(tokenID primitive.ObjectID) error
}
func NewTokenRepository ¶
func NewTokenRepository( log log.LogRusEntry, collection db.Collection, ) (TokenRepository, error)
type TokenService ¶
type TokenService interface {
Create(userID string) (*Token, error)
Validate(tokenString string) (*Token, error)
Invalidate(tokenString string) error
Find(tokenID string) (*Token, error)
}
func NewTokenService ¶
func NewTokenService( log log.LogRusEntry, cache cache.Cache[Token], repository TokenRepository, ) TokenService
Click to show internal directories.
Click to hide internal directories.