session

package
v0.0.0-...-4ddcd84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiTokenRepository

type ApiTokenRepository interface {
	CreateApiToken(apiToken *entities.ApiToken) error
	GetApiTokensByUserID(userID string) ([]entities.ApiToken, error)
	DeleteApiToken(token string) error
}

ApiTokenRepository holds the mongo database implementation of the Service

func NewApiTokenRepo

func NewApiTokenRepo(collection *mongo.Collection) ApiTokenRepository

NewApiTokenRepo creates a new instance of this repository

type RevokedTokenRepository

type RevokedTokenRepository interface {
	RevokeToken(token *entities.RevokedToken) error
	IsTokenRevoked(encodedToken string) bool
}

RevokedTokenRepository holds the mongo database implementation of the Service

func NewRevokedTokenRepo

func NewRevokedTokenRepo(collection *mongo.Collection) RevokedTokenRepository

NewRevokedTokenRepo creates a new instance of this repository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL