v1

package
v0.0.0-...-055f2dd Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPI

func NewAPI() (http.Handler, error)

NewAPI returns the API V1 Handler with configuration.

func NewAdRouter

func NewAdRouter(s ad.Storage) *chi.Mux

NewAdRouter inicialize a new router with each endpoint.

func NewBillRouter

func NewBillRouter(s bill.Storage) *chi.Mux

NewBillRouter inicialize a new router with each endpoint.

func NewCategoryRouter

func NewCategoryRouter(s category.Storage) *chi.Mux

NewCategoryRouter inicialize a new router with each endpoint.

func NewClientRouter

func NewClientRouter(s client.Storage) *chi.Mux

NewClientRouter inicialize a new client router with each endpoint.

func NewDishRouter

func NewDishRouter(s dish.Storage) *chi.Mux

NewDishRouter inicialize a new router with each endpoint.

func NewOrderRouter

func NewOrderRouter(s order.Storage, ts table.Storage, ds dish.Storage) *chi.Mux

NewOrderRouter returns the order's handler with default configuration.

func NewPictureRouter

func NewPictureRouter() *chi.Mux

NewPictureRouter inicialize a new user router with each endpoint

func NewPromotionRouter

func NewPromotionRouter(s promotion.Storage) *chi.Mux

NewPromotionRouter inicialize a new router with each endpoint.

func NewQuestionRouter

func NewQuestionRouter(s question.Storage) *chi.Mux

NewQuestionRouter inicialize a new router with each endpoint.

func NewRatingRouter

func NewRatingRouter(s rating.Storage) *chi.Mux

NewRatingRouter inicialize a new router with each endpoint.

func NewStayRouter

func NewStayRouter(s stay.Storage) *chi.Mux

NewStayRouter inicialize a new router with each endpoint.

func NewTableRouter

func NewTableRouter(s table.Storage) *chi.Mux

NewTableRouter inicialize a new router with each endpoint.

func NewWaiterRouter

func NewWaiterRouter(s waiter.Storage) *chi.Mux

NewWaiterRouter 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.

Jump to

Keyboard shortcuts

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