repository

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ItemsFileRepo

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

func NewItemsFileRepo

func NewItemsFileRepo() *ItemsFileRepo

func (*ItemsFileRepo) ForEach

func (r *ItemsFileRepo) ForEach(f func(item *model.Item) bool)

func (*ItemsFileRepo) Get

func (r *ItemsFileRepo) Get(uid string) *model.Item

func (*ItemsFileRepo) Remove

func (r *ItemsFileRepo) Remove(uid string)

func (*ItemsFileRepo) Start

func (r *ItemsFileRepo) Start() error

func (*ItemsFileRepo) Stop

func (r *ItemsFileRepo) Stop()

func (*ItemsFileRepo) Store

func (r *ItemsFileRepo) Store(i *model.Item)

type ItemsRepository

type ItemsRepository interface {
	Start() error
	Stop()
	Store(i *model.Item)
	Get(uid string) *model.Item
	Remove(uid string)
	ForEach(f func(item *model.Item) bool)
}

type UserFileRepository

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

func NewFileUserRepo

func NewFileUserRepo(logger *zap.SugaredLogger, userFile string) *UserFileRepository

func (*UserFileRepository) CheckUserAuth

func (r *UserFileRepository) CheckUserAuth(user, password string) bool

func (*UserFileRepository) GetUser

func (r *UserFileRepository) GetUser(username string) *model.UserInfo

func (*UserFileRepository) Start

func (r *UserFileRepository) Start() error

func (*UserFileRepository) Stop

func (r *UserFileRepository) Stop()

func (*UserFileRepository) UserIsValid

func (r *UserFileRepository) UserIsValid(user, sn string) bool

type UserRepository

type UserRepository interface {
	Start() error
	Stop()
	CheckUserAuth(user, password string) bool
	UserIsValid(user, sn string) bool
	GetUser(username string) *int.UserInfo
}

Jump to

Keyboard shortcuts

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