auth

package
v0.0.0-...-f07e814 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

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

func New

func New(db db.DBops) *Repo

func (*Repo) CreateUserSecret

func (r *Repo) CreateUserSecret(ctx context.Context, userSecret *structs.UserSecret) error

CreateUserSecret create user secret Returns repository.ErrDuplicateKey or err

func (*Repo) DeleteUserSecret

func (r *Repo) DeleteUserSecret(ctx context.Context, token string) error

DeleteUserSecret delete user secret Returns repository.ErrObjectNotFound or err

func (*Repo) GetLoginBySecret

func (r *Repo) GetLoginBySecret(ctx context.Context, secret string) (string, error)

GetLoginBySecret return login by token. Returns repository.ErrObjectNotFound or err

func (*Repo) GetSecretByLogin

func (r *Repo) GetSecretByLogin(ctx context.Context, login string) (*structs.UserSecret, error)

GetSecretByLogin get secret Returns repository.ErrObjectNotFound or err

func (*Repo) GetSecretBySecret

func (r *Repo) GetSecretBySecret(ctx context.Context, token string) (*structs.UserSecret, error)

GetSecretBySecret get secret Returns repository.ErrObjectNotFound or err

func (*Repo) UpdateUserSecret

func (r *Repo) UpdateUserSecret(ctx context.Context, userSecret *structs.UserSecret) error

UpdateUserSecret update secret Returns repository.ErrDuplicateKey or err

Jump to

Keyboard shortcuts

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