token_repository

package
v0.1.31 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: LGPL-2.1 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenRepository

type TokenRepository interface {
	Create(ctx context.Context, token *go_nuntio.Token) error
	Block(ctx context.Context, token *go_nuntio.Token) error
	IsBlocked(ctx context.Context, token *go_nuntio.Token) (bool, error)
	UpdateUsedAt(ctx context.Context, token *go_nuntio.Token) error
	GetTokens(ctx context.Context, token *go_nuntio.Token) ([]*models.Token, error)
	Get(ctx context.Context, token *go_nuntio.Token) (*models.Token, error)
	BuildIndexes(ctx context.Context) error
}

func New

func New(collection *mongo.Collection, crypto cryptox.Crypto) TokenRepository

Jump to

Keyboard shortcuts

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