storage

package
v0.0.0-...-9841d36 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionRepository

type SessionRepository struct {
	RedisClient *redis.Client
}

func NewSessionRepository

func NewSessionRepository(options map[string]interface{}) (*SessionRepository, error)

func (*SessionRepository) DeleteSession

func (st *SessionRepository) DeleteSession(s domain.Session) error

func (*SessionRepository) GetSessionByID

func (st *SessionRepository) GetSessionByID(id string) (*domain.Session, error)

func (*SessionRepository) PutSession

func (st *SessionRepository) PutSession(s domain.Session) error

type UserRepository

type UserRepository struct {
	Adapter *storage.PSQL
}

func NewRepository

func NewRepository(ctx context.Context, options map[string]interface{}, logger *log.Logger) (*UserRepository, error)

NewRepository creates a PSQL implementation of a secrets repository

func (*UserRepository) Add

func (r *UserRepository) Add(p domain.User) error

func (*UserRepository) GetUserByCredentials

func (r *UserRepository) GetUserByCredentials(credentials domain.Credentials) (*domain.User, error)

func (*UserRepository) GetUserByID

func (r *UserRepository) GetUserByID(id string) (*domain.User, error)

func (*UserRepository) SetLock

func (r *UserRepository) SetLock(id string, lock *domain.Lock) error

func (*UserRepository) SetPassword

func (r *UserRepository) SetPassword(id, password string) error

Jump to

Keyboard shortcuts

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