inmem

package
v0.0.0-...-f425ee8 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBirthdayRepository

func NewBirthdayRepository() birthday.Repository

NewBirthdayRepository return a new instance of in-memory phone repository.

func NewLibraryRepository

func NewLibraryRepository() library.Repository

NewLibraryRepository return a new instance of in-memory location repository.

func NewLocationRepository

func NewLocationRepository() location.Repository

NewLocationRepository return a new instance of in-memory location repository.

func NewMenuRepository

func NewMenuRepository() menu.Repository

NewMenuRepository return a new instance of in-memory menu repository.

func NewPhoneRepository

func NewPhoneRepository() phone.Repository

NewPhoneRepository return a new instance of in-memory phone repository.

Types

type BirthdayRepository

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

BirthdayRepository struct definition.

func (*BirthdayRepository) Clean

func (r *BirthdayRepository) Clean() error

Clean the birthday repository.

func (*BirthdayRepository) Find

func (r *BirthdayRepository) Find(name string) (*birthday.Birthday, error)

Find returns phone that match with the given restaurant.

func (*BirthdayRepository) FindAll

func (r *BirthdayRepository) FindAll() ([]*birthday.Birthday, error)

FindAll returns phone that match with the given restaurant.

func (*BirthdayRepository) Store

func (r *BirthdayRepository) Store(target *birthday.Birthday) error

Store saves phone model in memory.

type LibraryRepository

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

LibraryRepository struct definition.

func (*LibraryRepository) Clean

func (r *LibraryRepository) Clean() error

Clean the location repository.

func (*LibraryRepository) Find

func (r *LibraryRepository) Find(userkey string) (*library.LoginInfo, error)

Find returns location that match with the given name.

func (*LibraryRepository) Store

func (r *LibraryRepository) Store(target *library.LoginInfo) error

Store saves location model in memory.

func (*LibraryRepository) StoreJSessionID

func (r *LibraryRepository) StoreJSessionID(target *library.LoginInfo, JSessionID string) error

StoreJSessionID saves JSessionID to loginInfo.

type LocationRepository

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

LocationRepository struct definition.

func (*LocationRepository) Clean

func (r *LocationRepository) Clean() error

Clean the location repository.

func (*LocationRepository) Find

func (r *LocationRepository) Find(name string) ([]*location.Location, error)

Find returns location that match with the given name.

func (*LocationRepository) Store

func (r *LocationRepository) Store(target *location.Location) error

Store saves location model in memory.

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

MenuRepository struct definition.

func (r *MenuRepository) Clean() error

Clean the menu repository.

func (r *MenuRepository) Find(rest menu.Restaurant) (*menu.Menu, error)

Find returns today's menus that match with the given restaurant.

func (r *MenuRepository) FindAll() []*menu.Menu

FindAll returns all menus that were stored in memory.

func (r *MenuRepository) Store(target *menu.Menu) error

Store saves menu model in memory.

type PhoneRepository

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

PhoneRepository struct definition.

func (*PhoneRepository) Clean

func (r *PhoneRepository) Clean() error

Clean the phone repository.

func (*PhoneRepository) Find

func (r *PhoneRepository) Find(d phone.Department) ([]*phone.Phone, error)

Find returns phone that match with the given restaurant.

func (*PhoneRepository) FindByNum

func (r *PhoneRepository) FindByNum(phoneNum int) ([]*phone.Phone, error)

FindByNum returns phone that match with the given phonbe number.

func (*PhoneRepository) Store

func (r *PhoneRepository) Store(target *phone.Phone) error

Store saves phone model in memory.

Jump to

Keyboard shortcuts

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