Documentation ¶
Index ¶
- type IServerKeeper
- type SecretsRepo
- func (r *SecretsRepo) Delete(ctx context.Context, userID contract.UserID, id contract.SecretID) error
- func (r *SecretsRepo) GetAllSecrets(ctx context.Context, userID contract.UserID) ([]contract.IUserSecretItem, error)
- func (r *SecretsRepo) SaveSecret(ctx context.Context, userID contract.UserID, secret contract.IUserSecretItem) (contract.IUserSecretItem, error)
- type ServerKeeper
- func (s *ServerKeeper) Delete(ctx context.Context, userID contract.UserID, id contract.SecretID) error
- func (s *ServerKeeper) GetAllSecrets(ctx context.Context, userID contract.UserID) ([]contract.IUserSecretItem, error)
- func (s *ServerKeeper) SaveSecret(ctx context.Context, userID contract.UserID, secret contract.IUserSecretItem) (contract.IUserSecretItem, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IServerKeeper ¶
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 ¶
func (r *SecretsRepo) SaveSecret( ctx context.Context, userID contract.UserID, secret contract.IUserSecretItem, ) (contract.IUserSecretItem, error)
SaveSecret - save secret for the user
type ServerKeeper ¶
type ServerKeeper struct {
// contains filtered or unexported fields
}
ServerKeeper - server keeper
func NewServerKeeper ¶
func NewServerKeeper( repo contract.IKeeperRepository, l contract.IApplicationLogger, ) *ServerKeeper
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 ¶
func (s *ServerKeeper) SaveSecret( ctx context.Context, userID contract.UserID, secret contract.IUserSecretItem, ) (contract.IUserSecretItem, error)
SaveSecret - save secret for the user
Click to show internal directories.
Click to hide internal directories.