keeper

package
v0.0.0-...-05cdca5 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IServerKeeper

type IServerKeeper interface {
	contract.IKeeper
}

IServerKeeper - server keeper interface

type SecretsRepo

type SecretsRepo struct {
	// contains filtered or unexported fields
}

SecretsRepo - secrets repository

func NewSecretsRepo

func NewSecretsRepo(
	db *sqlx.DB,
	l contract.IApplicationLogger,
) *SecretsRepo

NewSecretsRepo - create new secrets repository

func (*SecretsRepo) Delete

func (r *SecretsRepo) Delete(
	ctx context.Context,
	userID contract.UserID,
	id contract.SecretID,
) error

Delete - delete secret for the user

func (*SecretsRepo) GetAllSecrets

func (r *SecretsRepo) GetAllSecrets(
	ctx context.Context,
	userID contract.UserID,
) ([]contract.IUserSecretItem, error)

GetAllSecrets - get all secrets for user

func (*SecretsRepo) SaveSecret

SaveSecret - save secret for the user

type ServerKeeper

type ServerKeeper struct {
	// contains filtered or unexported fields
}

ServerKeeper - server keeper

func NewServerKeeper

NewServerKeeper - constructor. Creates new server keeper

func (*ServerKeeper) Delete

func (s *ServerKeeper) Delete(
	ctx context.Context,
	userID contract.UserID,
	id contract.SecretID,
) error

Delete - delete secret for the user

func (*ServerKeeper) GetAllSecrets

func (s *ServerKeeper) GetAllSecrets(
	ctx context.Context,
	userID contract.UserID,
) ([]contract.IUserSecretItem, error)

GetAllSecrets - get all secrets for user

func (*ServerKeeper) SaveSecret

SaveSecret - save secret for the user

Jump to

Keyboard shortcuts

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