storage

package
v0.0.0-...-80c91bd Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserExists   = errors.New("user already exists")
	ErrUserNotFound = errors.New("user id not found")
)

Functions

This section is empty.

Types

type Storage

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

func New

func New(storagePath string) (*Storage, error)

func (*Storage) AddPerson

func (s *Storage) AddPerson(ctx context.Context, p *models.Person) (id int64, err error)

func (*Storage) EditPerson

func (s *Storage) EditPerson(ctx context.Context, person *models.Person) (err error)

func (*Storage) GetList

func (s *Storage) GetList() (personList []models.Person, err error)

func (*Storage) GetPerson

func (s *Storage) GetPerson(ctx context.Context, id int64) (person *models.Person, err error)

func (*Storage) RemovePerson

func (s *Storage) RemovePerson(ctx context.Context, id int64) (err error)

func (*Storage) Stop

func (s *Storage) Stop() error

Jump to

Keyboard shortcuts

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