server

package
v0.0.0-...-726fc0d Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

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

Jump to

Keyboard shortcuts

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