domain

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 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 BlackListRepository

type BlackListRepository interface {
	FindByIPv4(ipv4 string) (*model.BlackListItem, error)
}

BlackListRepository is responsible for manipulation of blacklisted items IP addresses.

type SessionChecker

type SessionChecker interface {
	CheckSession(ctx context.Context, sessionToken, cookie string) (*model.User, error)
}

type Store

type Store interface {
	Token() TokenRepository
	Blacklist() BlackListRepository
}

Store is an interface for communication with store.

type TokenRepository

type TokenRepository interface {
	Create(ctx context.Context, token *model.Token) error
	Update(ctx context.Context, token *model.Token) error
	FindByID(ctx context.Context, id string) (*model.Token, error)
	FindBySecret(ctx context.Context, secret string) (*model.Token, error)
	DeleteByID(ctx context.Context, id string) error
	List(ctx context.Context, q *query.ListTokens) ([]model.Token, error)
}

TokenRepository is responsible for tokens manipulation.

type UserService

type UserService interface {
	CreateToken(context.Context, *command.CreateToken) (*model.Token, error)
	TokenDetails(context.Context, *query.TokenDetails) (*model.Token, error)
	ResetToken(context.Context, *command.ResetToken) (*model.Token, error)
	DeleteToken(context.Context, *command.DeleteToken) error
	ListTokens(context.Context, *query.ListTokens) ([]model.Token, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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