repositories

package
v0.0.0-...-0bd68be Latest Latest
Warning

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

Go to latest
Published: Mar 7, 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 AuthenticationRepository

type AuthenticationRepository struct {
	Database squirrel.StatementBuilderType
}

func (*AuthenticationRepository) CreateUser

func (ar *AuthenticationRepository) CreateUser(user entities.User) (userId string, err error)

func (*AuthenticationRepository) GetUserByEmail

func (ar *AuthenticationRepository) GetUserByEmail(email string) (user entities.User, err error)

func (*AuthenticationRepository) GetUserIdByEmail

func (ar *AuthenticationRepository) GetUserIdByEmail(email string) (userId string, err error)

type IAuthenticationRepository

type IAuthenticationRepository interface {
	CreateUser(user entities.User) (userId string, err error)
	GetUserByEmail(email string) (user entities.User, err error)
	GetUserIdByEmail(email string) (userId string, err error)
}

type IRedisRepository

type IRedisRepository interface {
	SetStringValue(key string, value interface{}, expiration time.Duration) error
	SetHashValue(key string, field string, value interface{}, expiration time.Duration) error
	GetStringValue(key string) (interface{}, error)
	GetHashValue(key string, field string) (interface{}, error)
}

type RedisRepository

type RedisRepository struct {
	Client *redis.Client
}

func (*RedisRepository) GetHashValue

func (rr *RedisRepository) GetHashValue(key string, field string) (interface{}, error)

func (*RedisRepository) GetStringValue

func (rr *RedisRepository) GetStringValue(key string) (interface{}, error)

func (*RedisRepository) SetHashValue

func (rr *RedisRepository) SetHashValue(key string, field string, value interface{}, expiration time.Duration) error

func (*RedisRepository) SetStringValue

func (rr *RedisRepository) SetStringValue(key string, value interface{}, expiration time.Duration) error

Jump to

Keyboard shortcuts

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