token

package
v0.0.0-...-ca0f7d1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRepository

type MockRepository struct {
	mock.Mock
}

MockRepository is an autogenerated mock type for the Repository type

func (*MockRepository) Create

func (_m *MockRepository) Create(token models.Token, executor database.QueryExecutor) (uuid.UUID, error)

Create provides a mock function with given fields: token, executor

func (*MockRepository) DeleteExpiredTokens

func (_m *MockRepository) DeleteExpiredTokens(tokenType models.TokenType, executor database.QueryExecutor) ([]*models.Token, error)

DeleteExpiredTokens provides a mock function with given fields: tokenType, executor

func (*MockRepository) DeleteUsedTokens

func (_m *MockRepository) DeleteUsedTokens(executor database.QueryExecutor) error

DeleteUsedTokens provides a mock function with given fields: executor

func (*MockRepository) GetTokensByIdentityID

func (_m *MockRepository) GetTokensByIdentityID(identityID uuid.UUID, tokenType models.TokenType, executor database.QueryExecutor) ([]*models.Token, error)

GetTokensByIdentityID provides a mock function with given fields: identityID, tokenType, executor

func (*MockRepository) UpdateStatus

func (_m *MockRepository) UpdateStatus(tokenID uuid.UUID, tokenStatus models.TokenStatus, executor database.QueryExecutor) (*models.Token, error)

UpdateStatus provides a mock function with given fields: tokenID, tokenStatus, executor

type Repository

type Repository interface {
	Create(executor database.QueryExecutor, token models.Token) (tokenID uuid.UUID, err error)
	GetTokensByIdentityID(
		executor database.QueryExecutor,
		identityID uuid.UUID,
		tokenType models.TokenType,
	) ([]*models.Token, error)
	UpdateStatus(
		executor database.QueryExecutor,
		tokenID uuid.UUID,
		tokenStatus models.TokenStatus,
	) (*models.Token, error)
	DeleteUsedTokens(executor database.QueryExecutor) error
	DeleteExpiredTokens(
		executor database.QueryExecutor,
		tokenType models.TokenType,
	) ([]*models.Token, error)
}

IdentityRepository is an interface for any Repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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