v1

package
v0.0.0-...-cd9e93c Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() http.Handler

New returns the API V1 Handler with configuration.

Types

type BillRouter

type BillRouter struct {
	Repository bill.Repository
}

PromotionRouter is the router of the promotions.

func (*BillRouter) CreateHandler

func (pr *BillRouter) CreateHandler(w http.ResponseWriter, r *http.Request)

CreateHandler Create a new bills.

func (*BillRouter) DeleteHandler

func (pr *BillRouter) DeleteHandler(w http.ResponseWriter, r *http.Request)

DeleteHandler Remove a bill by ID.

func (*BillRouter) GetAllDaysHandler

func (pr *BillRouter) GetAllDaysHandler(w http.ResponseWriter, r *http.Request)

GetAllHandler response all the bills.

func (*BillRouter) GetAllHandler

func (pr *BillRouter) GetAllHandler(w http.ResponseWriter, r *http.Request)

RootHandler - Returns all the available APIs @Summary This API can be used as health check for this application. @Description Tells if the chi-swagger APIs are working or not. @Tags chi-swagger @Accept json @Produce json @Success 200 {string} response "api response" @Router / [get]

func (*BillRouter) GetAllPaymentsHandler

func (pr *BillRouter) GetAllPaymentsHandler(w http.ResponseWriter, r *http.Request)

GetAllHandler response all the bills.

func (*BillRouter) GetOneHandler

func (pr *BillRouter) GetOneHandler(w http.ResponseWriter, r *http.Request)

GetOneHandler response one bills by id.

func (*BillRouter) Routes

func (pr *BillRouter) Routes() http.Handler

Routes returns bill router with each endpoint.

func (*BillRouter) UpdateHandler

func (pr *BillRouter) UpdateHandler(w http.ResponseWriter, r *http.Request)

UpdateHandler update a stored bill by id.

type MedicineRouter

type MedicineRouter struct {
	Repository medicine.Repository
}

PostRouter is the router of the posts.

func (*MedicineRouter) CreateHandler

func (pr *MedicineRouter) CreateHandler(w http.ResponseWriter, r *http.Request)

CreateHandler Create a new post.

func (*MedicineRouter) DeleteHandler

func (pr *MedicineRouter) DeleteHandler(w http.ResponseWriter, r *http.Request)

DeleteHandler Remove a post by ID.

func (*MedicineRouter) GetAllHandler

func (pr *MedicineRouter) GetAllHandler(w http.ResponseWriter, r *http.Request)

GetAllHandler response all the posts.

func (*MedicineRouter) GetOneHandler

func (pr *MedicineRouter) GetOneHandler(w http.ResponseWriter, r *http.Request)

GetOneHandler response one post by id.

func (*MedicineRouter) Routes

func (pr *MedicineRouter) Routes() http.Handler

Routes returns post router with each endpoint.

func (*MedicineRouter) UpdateHandler

func (pr *MedicineRouter) UpdateHandler(w http.ResponseWriter, r *http.Request)

UpdateHandler update a stored post by id.

type PromotionRouter

type PromotionRouter struct {
	Repository promotion.Repository
}

PromotionRouter is the router of the promotions.

func (*PromotionRouter) CreateHandler

func (pr *PromotionRouter) CreateHandler(w http.ResponseWriter, r *http.Request)

CreateHandler Create a new promotions.

func (*PromotionRouter) DeleteHandler

func (pr *PromotionRouter) DeleteHandler(w http.ResponseWriter, r *http.Request)

DeleteHandler Remove a promotion by ID.

func (*PromotionRouter) GetAllHandler

func (pr *PromotionRouter) GetAllHandler(w http.ResponseWriter, r *http.Request)

GetAllHandler response all the ps.

func (*PromotionRouter) GetOneHandler

func (pr *PromotionRouter) GetOneHandler(w http.ResponseWriter, r *http.Request)

GetOneHandler response one promotion by id.

func (*PromotionRouter) Routes

func (pr *PromotionRouter) Routes() http.Handler

Routes returns promotion router with each endpoint.

func (*PromotionRouter) UpdateHandler

func (pr *PromotionRouter) UpdateHandler(w http.ResponseWriter, r *http.Request)

UpdateHandler update a stored promotion by id.

type UserRouter

type UserRouter struct {
	Repository user.Repository
}

UserRouter is the router of the users.

func (*UserRouter) CreateHandler

func (ur *UserRouter) CreateHandler(w http.ResponseWriter, r *http.Request)

CreateHandler Create a new user.

func (*UserRouter) DeleteHandler

func (ur *UserRouter) DeleteHandler(w http.ResponseWriter, r *http.Request)

DeleteHandler Remove a user by ID.

func (*UserRouter) GetAllHandler

func (ur *UserRouter) GetAllHandler(w http.ResponseWriter, r *http.Request)

GetAllHandler response all the users.

func (*UserRouter) GetOneHandler

func (ur *UserRouter) GetOneHandler(w http.ResponseWriter, r *http.Request)

GetOneHandler response one user by id.

func (*UserRouter) LoginHandler

func (ur *UserRouter) LoginHandler(w http.ResponseWriter, r *http.Request)

LoginHandler search user and return a jwt.

func (*UserRouter) Routes

func (ur *UserRouter) Routes() http.Handler

Routes returns user router with each endpoint.

func (*UserRouter) UpdateHandler

func (ur *UserRouter) UpdateHandler(w http.ResponseWriter, r *http.Request)

UpdateHandler update a stored user by id.

Jump to

Keyboard shortcuts

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