Documentation
¶
Index ¶
- Variables
- func NewFacultyRepository(db *sqlx.DB) *facultyRepository
- func NewFormRepository(db *sqlx.DB) *formRepository
- func NewMenuRepository(db *sqlx.DB) *menuRepository
- func NewRatioRepository(db *sqlx.DB) *ratioRepository
- func NewRestaurantRepository(db *sqlx.DB) *restaurantRepository
- type FacultyRepository
- type FormRepository
- type MenuRepository
- type RatioRepository
- type RestaurantRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFoundMoreThanOne error = errors.New("found more than one row in db")
View Source
var ErrNotFound error = errors.New("not found in db")
Functions ¶
func NewFacultyRepository ¶
func NewFormRepository ¶
func NewMenuRepository ¶
func NewRatioRepository ¶
func NewRestaurantRepository ¶
Types ¶
type FacultyRepository ¶
type FormRepository ¶
type MenuRepository ¶
type RatioRepository ¶
type RatioRepository interface {
QueryIsSpicyRatio() ([]model.SpicynessRatio, error)
QuerySubmitFormPrice() ([]model.SubmitFormPrice, error)
QueryFoodTypeRatio() ([]model.FoodTypeRatio, error)
QueryPopularityFromAverageMenuPrice() ([]model.PopularityFromAverageMenuPrice, error)
QueryAveragePopularityFromPrice() ([]model.AveragePopularityFromPrice, error)
}
type RestaurantRepository ¶
type RestaurantRepository interface {
InsertRestarant(model.Restaurant) error
QueryPopularRestaurant() ([]model.Restaurant, error)
InsertRestaurantPopularity(restaurantId int64) error
UpdateRestaurantPopularity(restaurantId int64) error
QueryRestaurantPopularity(restaurantId int64) (model.RestaurantPopularity, error)
QueryNearestRestaurants(restaurantId int64) ([]model.NearestRestaurant, error)
QueryRestaurantById(id int64) (model.Restaurant, error)
}
Click to show internal directories.
Click to hide internal directories.