Documentation ¶
Index ¶
- func HealthCheck(c echo.Context) error
- type Health
- type SatelliteHandler
- func (h SatelliteHandler) SatellitesDeleteOne(c echo.Context) error
- func (h SatelliteHandler) SatellitesGetAll(c echo.Context) error
- func (h SatelliteHandler) SatellitesGetOne(c echo.Context) error
- func (h SatelliteHandler) SatellitesPatchOne(c echo.Context) error
- func (h SatelliteHandler) SatellitesPostOne(c echo.Context) error
- func (h SatelliteHandler) SatellitesPutOne(c echo.Context) error
- type TopSecretHandler
- type TopSecretSplitHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HealthCheck ¶
func HealthCheck(c echo.Context) error
HealthCheck @Title HealthCheck @Description check API health @Success 200 {object} Health @Router /health [get]
Types ¶
type SatelliteHandler ¶
type SatelliteHandler struct {
// contains filtered or unexported fields
}
func NewSatelliteHandler ¶
func NewSatelliteHandler(service interfaces.ISatelliteService) *SatelliteHandler
func (SatelliteHandler) SatellitesDeleteOne ¶
func (h SatelliteHandler) SatellitesDeleteOne(c echo.Context) error
SatellitesDeleteOne @Title SatellitesDeleteOne @Description Delete satellite by name @Accept json @Param name path string true "name" @Success 200 {object} request.Satellite @Failure 404 {object} responses.HTTPError @Failure 500 {object} responses.HTTPError @Router /satellites/{name} [delete]
func (SatelliteHandler) SatellitesGetAll ¶
func (h SatelliteHandler) SatellitesGetAll(c echo.Context) error
SatellitesGetAll @Title SatellitesGetAll @Description get all satellites @Success 200 {array} request.Satellite @Router /satellites [get] @Failure 500 {object} responses.HTTPError
func (SatelliteHandler) SatellitesGetOne ¶
func (h SatelliteHandler) SatellitesGetOne(c echo.Context) error
SatellitesGetOne @Title SatellitesGetOne @Description get a satellite by name @Param name path string true "name" @Success 200 {object} request.Satellite @Failure 404 {object} responses.HTTPError @Failure 500 {object} responses.HTTPError @Router /satellites/{name} [get]
func (SatelliteHandler) SatellitesPatchOne ¶
func (h SatelliteHandler) SatellitesPatchOne(c echo.Context) error
SatellitesPatchOne @Title SatellitesPatchOne @Description update a property satellite by name @Accept json @Param name path string true "name" @Param satellite body request.Satellite true "satellite info" @Success 200 {object} request.Satellite @Failure 400 404 {object} responses.HTTPError @Failure 500 {object} responses.HTTPError @Router /satellites/{name} [patch]
func (SatelliteHandler) SatellitesPostOne ¶
func (h SatelliteHandler) SatellitesPostOne(c echo.Context) error
SatellitesPostOne @Title SatellitesPostOne @Description Create a satellite @Accept json @Param satellite body request.Satellite true "satellite info" @Success 201 "Successfully create Satellite" @Failure 404 {object} responses.HTTPError @Failure 500 {object} responses.HTTPError @Router /satellites [post]
func (SatelliteHandler) SatellitesPutOne ¶
func (h SatelliteHandler) SatellitesPutOne(c echo.Context) error
SatellitesPutOne @Title SatellitesPutOne @Description update a satellite by name @Accept json @Param name formData string true "name" @Param satellite body request.Satellite true "satellite info" @Success 200 {object} request.Satellite @Failure 400 {object} responses.HTTPError @Failure 500 {object} responses.HTTPError @Router /satellites/{name} [put]
type TopSecretHandler ¶
type TopSecretHandler struct {
// contains filtered or unexported fields
}
func NewTopSecretHandler ¶
func NewTopSecretHandler(messageService interfaces.IMessagesService, trilaterationService interfaces.ITrilaterationService) *TopSecretHandler
func (TopSecretHandler) GetMessages ¶
func (h TopSecretHandler) GetMessages(c echo.Context) error
GetMessages @Title GetMessages @Description get secret message and coordinates @Accept json @Param satellite body request.SatellitesRequest true "satellite info" @Success 200 {object} responses.MessageResponse @Failure 404 {object} responses.HTTPError @Failure 500 {object} responses.HTTPError @Router /topsecret [post]
type TopSecretSplitHandler ¶
type TopSecretSplitHandler struct {
// contains filtered or unexported fields
}
func NewTopSecretSplitHandler ¶
func NewTopSecretSplitHandler(trilaterationService interfaces.ITrilaterationService, satelliteService interfaces.ISatelliteService, messageService interfaces.IMessagesService) *TopSecretSplitHandler
func (TopSecretSplitHandler) GetMessage ¶
func (h TopSecretSplitHandler) GetMessage(c echo.Context) error
GetMessage @Title GetMessage @Description get secret message and coordinates @Accept json @Success 200 {object} responses.MessageResponse @Failure 404 {object} responses.HTTPError @Failure 500 {object} responses.HTTPError @Router /topsecret_split [get]
func (TopSecretSplitHandler) PutMessageOnSatellite ¶
func (h TopSecretSplitHandler) PutMessageOnSatellite(c echo.Context) error
PutMessageOnSatellite @Title PutMessageOnSatellite @Description put message and distance on satellite @Accept json @Param name path string true "name" @Param satellite body request.Satellite true "satellite info" @Success 200 {object} request.Satellite @Failure 400 404 {object} responses.HTTPError @Failure 500 {object} responses.HTTPError @Router /topsecret_split/{name} [post]