Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpService ¶
type HttpService struct { BurrowServiceInstance *services.BurrowService // contains filtered or unexported fields }
HttpService provides a HTTP Rest endpoint for the loading functions
func NewHttpService ¶
func NewHttpService(burrowServiceInstance *services.BurrowService) *HttpService
func (*HttpService) BurrowStatus ¶
func (svc *HttpService) BurrowStatus(c *gin.Context)
@Summary Show Burrow Status @Accept json @Produce json @Param id path int64 true "ID" @Success 200 {object} dto.IndexResponse{results=[]model.Burrow} @Router /burrows [get]
func (*HttpService) ErrorWithJson ¶
func (svc *HttpService) ErrorWithJson(c *gin.Context, code int, err error)
Wraps error nicely
func (*HttpService) RentBurrow ¶
func (svc *HttpService) RentBurrow(c *gin.Context)
@Summary Rent Burrow @Accept json @Produce json @Param uuid path int64 true "UUID" @Success 200 {object} model.Burrow @Router /rent-burrow/{id} [put]
func (*HttpService) Routes ¶
func (svc *HttpService) Routes()
func (*HttpService) Start ¶
func (svc *HttpService) Start() error
Start the http service with given listeners and then listen on port
Click to show internal directories.
Click to hide internal directories.