repositories

package
v0.0.0-...-40b02db Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheRepository

type CacheRepository interface {
	GetCache(key string) ([]byte, error)
	SetCache(key string, entry []byte) error
}

type Repository

type Repository struct {
	DB      *sql.DB
	MongoDB *mongo.Database
	Context context.Context
}

func NewRepository

func NewRepository(conn *sql.DB, MongoDB *mongo.Database, ctx context.Context) Repository

type UserRepository

type UserRepository interface {
	AddUser(user models.User) (id int64, err error)
	EditUser(user models.User) (err error)
	RemoveUser(userId int64) (err error)
	IsUserExistsById(userId int64) (user models.User, exists bool)
	GetUserListByIndex(user models.User) (result []models.User, err error)
	IsEmailExistsByIndex(email string) (user models.User, exists bool)
	IsUsernameExistsByIndex(username string) (user models.User, exists bool)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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