service

package
v0.0.0-...-0c11fba Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFacultyService

func NewFacultyService(facultyRepository repository.FacultyRepository) *facultyService

func NewFormService

func NewFormService(formRepository repository.FormRepository) *formService

func NewMenuService

func NewMenuService(menuRepository repository.MenuRepository, restaurantRepository repository.RestaurantRepository) *menuService

func NewRatioService

func NewRatioService(ratioRepository repository.RatioRepository) *ratioService

func NewRestaurantService

func NewRestaurantService(restaurantRepository repository.RestaurantRepository) *restaurantService

Types

type FacultyService

type FacultyService interface {
	GetAllFaculty() ([]model.Faculty, error)
}

type FormService

type FormService interface {
	CreateNewForm(model.Form) error
}
type MenuService interface {
	CreateNewMenu(model.Menu) error
	GetRecommendedMenu(foodType string, spicyNess bool, price float64) (model.RecommendedMenu, error)
	GetAllFoodType() ([]model.Menu, error)
	GetMenuMinPrice() (map[string]float64, error)
}

type RatioService

type RatioService interface {
	GetSpicynessRatio() ([]model.SpicynessRatio, error)
	GetPriceRatio() (model.PriceRatio, error)
	GetFoodTypeRatio() ([]model.FoodTypeRatio, error)
	GetPopularityFromAverageMenuPrice() ([]model.PopularityFromAverageMenuPrice, error)
	GetAveragePopularityFromPriceRange() (model.PopularityAndPriceRatio, error)
}

type RestaurantService

type RestaurantService interface {
	CreateNewRestaurant(model.Restaurant) error
	GetPopularRestaurant() ([]model.Restaurant, error)
	CreateOrUpdateRestaurantPopularity(restaurantId int64) error
	GetNearestRestaurants(facultyId int64) ([]model.NearestRestaurant, error)
}

Jump to

Keyboard shortcuts

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