Documentation ¶
Index ¶
- func NewBirthdayRepository() birthday.Repository
- func NewLibraryRepository() library.Repository
- func NewLocationRepository() location.Repository
- func NewMenuRepository() menu.Repository
- func NewPhoneRepository() phone.Repository
- type BirthdayRepository
- type LibraryRepository
- type LocationRepository
- type MenuRepository
- type PhoneRepository
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.
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.
type MenuRepository ¶
type MenuRepository struct {
// contains filtered or unexported fields
}
MenuRepository struct definition.
func (*MenuRepository) Find ¶
func (r *MenuRepository) Find(rest menu.Restaurant) (*menu.Menu, error)
Find returns today's menus that match with the given restaurant.
func (*MenuRepository) FindAll ¶
func (r *MenuRepository) FindAll() []*menu.Menu
FindAll returns all menus that were stored in memory.
type PhoneRepository ¶
type PhoneRepository struct {
// contains filtered or unexported fields
}
PhoneRepository struct definition.
func (*PhoneRepository) Find ¶
func (r *PhoneRepository) Find(d phone.Department) ([]*phone.Phone, error)
Find returns phone that match with the given restaurant.