Documentation ¶
Index ¶
- func ParsePrice(str string) (int64, error)
- type CanteenMenu
- type CanteenMetadata
- type CanteenRef
- type Meal
- type MealPrices
- type Provider
- type Store
- func (s *Store) Close() error
- func (s *Store) Filter(ctx context.Context, lang string, keyword string) ([]*storage.CanteenData, error)
- func (s *Store) IsEmpty(lang string) bool
- func (s *Store) Lock() error
- func (s *Store) Open() error
- func (s *Store) Read() error
- func (s *Store) Sync(ctx context.Context, providers []Provider, lang string) error
- func (s *Store) Unlock() error
- func (s *Store) Write() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParsePrice ¶
Types ¶
type CanteenMenu ¶
type CanteenMetadata ¶
type CanteenRef ¶
type Meal ¶
type Meal struct { Label string Description []string Prices MealPrices }
type MealPrices ¶
type Provider ¶
type Provider interface { // A unique identifier for the provider. Id() string // A human readable name for the provider. Label() string // List all menus of the given canteens for the given date and daytime. FetchMenus(ctx context.Context, canteens []CanteenRef, date string, daytime string, lang string) ([]CanteenMenu, error) // List all canteens fo this provider FetchCanteens(ctx context.Context, lang string) ([]CanteenMetadata, error) }
Click to show internal directories.
Click to hide internal directories.