repo

package
v0.0.0-...-36b45d8 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageManager

type StorageManager interface {
	Load(key string) ([]byte, error)
	Store(key string, data []byte) error
}

StorageManager defines interface

func NewStorageManager

func NewStorageManager(db *bitcask.Bitcask) StorageManager

NewStorageManager returns a new UserRepo instance

type UserRepo

type UserRepo interface {
	GetAll() ([]models.User, error)
	GetByUsername(username string) (*models.User, error)
	Add(o *models.User) error
	Delete(o *models.User) error
}

UserRepo defines UserRepo interface

func NewUserRepo

func NewUserRepo(sm StorageManager) UserRepo

NewUserRepo returns a new UserRepo instance

Jump to

Keyboard shortcuts

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