Documentation ¶
Index ¶
- func NewAPI() (http.Handler, error)
- func NewAdRouter(s ad.Storage) *chi.Mux
- func NewBillRouter(s bill.Storage) *chi.Mux
- func NewCategoryRouter(s category.Storage) *chi.Mux
- func NewClientRouter(s client.Storage) *chi.Mux
- func NewDishRouter(s dish.Storage) *chi.Mux
- func NewOrderRouter(s order.Storage, ts table.Storage, ds dish.Storage) *chi.Mux
- func NewPictureRouter() *chi.Mux
- func NewPromotionRouter(s promotion.Storage) *chi.Mux
- func NewQuestionRouter(s question.Storage) *chi.Mux
- func NewRatingRouter(s rating.Storage) *chi.Mux
- func NewStayRouter(s stay.Storage) *chi.Mux
- func NewTableRouter(s table.Storage) *chi.Mux
- func NewWaiterRouter(s waiter.Storage) *chi.Mux
- type AdRouter
- type BillRouter
- type CategoryRouter
- type ClientRouter
- type DishRouter
- type OrderRouter
- type PromotionRouter
- type QuestionRouter
- type RatingRouter
- type StayRouter
- type TableRouter
- type UserRouter
- type WaiterRouter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdRouter ¶
NewAdRouter inicialize a new router with each endpoint.
func NewBillRouter ¶
NewBillRouter inicialize a new router with each endpoint.
func NewCategoryRouter ¶
NewCategoryRouter inicialize a new router with each endpoint.
func NewClientRouter ¶
NewClientRouter inicialize a new client router with each endpoint.
func NewDishRouter ¶
NewDishRouter inicialize a new router with each endpoint.
func NewOrderRouter ¶
NewOrderRouter returns the order's handler with default configuration.
func NewPictureRouter ¶
NewPictureRouter inicialize a new user router with each endpoint
func NewPromotionRouter ¶
NewPromotionRouter inicialize a new router with each endpoint.
func NewQuestionRouter ¶
NewQuestionRouter inicialize a new router with each endpoint.
func NewRatingRouter ¶
NewRatingRouter inicialize a new router with each endpoint.
func NewStayRouter ¶
NewStayRouter inicialize a new router with each endpoint.
func NewTableRouter ¶
NewTableRouter inicialize a new router with each endpoint.
Types ¶
type AdRouter ¶
type AdRouter struct {
// contains filtered or unexported fields
}
AdRouter is a router to the ads.
type BillRouter ¶
type BillRouter struct {
// contains filtered or unexported fields
}
BillRouter is the router of bills.
type CategoryRouter ¶
type CategoryRouter struct {
// contains filtered or unexported fields
}
CategoryRouter is a router to Categories.
type ClientRouter ¶
type ClientRouter struct {
// contains filtered or unexported fields
}
ClientRouter is the router of clients.
type DishRouter ¶
type DishRouter struct {
// contains filtered or unexported fields
}
DishRouter is a router to dishes.
type OrderRouter ¶
type OrderRouter struct { OrderStorage order.Storage TableStorage table.Storage DishStorage dish.Storage MessageStream chan notification.Notification }
OrderRouter is a router to orders.
type PromotionRouter ¶
type PromotionRouter struct {
// contains filtered or unexported fields
}
PromotionRouter is a router of the promotions.
type QuestionRouter ¶
type QuestionRouter struct {
// contains filtered or unexported fields
}
QuestionRouter is a router of the questions.
type RatingRouter ¶
type RatingRouter struct {
// contains filtered or unexported fields
}
RatingRouter is the router of bills.
type StayRouter ¶
type StayRouter struct {
// contains filtered or unexported fields
}
StayRouter is a router of the stay.
type TableRouter ¶
type TableRouter struct {
// contains filtered or unexported fields
}
TableRouter is a router of the tables.
type UserRouter ¶
type UserRouter struct {
// contains filtered or unexported fields
}
UserRouter is the router of the users.
func NewUserRouter ¶
func NewUserRouter(s user.Storage) (*chi.Mux, UserRouter)
NewUserRouter inicialize a new user router with each endpoint.
func (UserRouter) ForgotPasswordHandler ¶
func (ur UserRouter) ForgotPasswordHandler(w http.ResponseWriter, r *http.Request)
ForgotPasswordHandler update user, set confirm to true.
func (UserRouter) LoginHandler ¶
func (ur UserRouter) LoginHandler(w http.ResponseWriter, r *http.Request)
LoginHandler handle login, returns a json with token.
type WaiterRouter ¶
type WaiterRouter struct {
// contains filtered or unexported fields
}
WaiterRouter is a router of the waiters.