presenter

package
v0.0.0-...-75dcc22 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServerEmptyResponse

func ServerEmptyResponse() *fiber.Map

ServerEmptyResponse is a successful response where no server is found that will be passed in the response by handler.

func ServerErrorResponse

func ServerErrorResponse(err error) *fiber.Map

ServerErrorResponse is the singular ErrorResponse that will be passed in the response by handler.

func ServerSuccessResponse

func ServerSuccessResponse(data *types.Server) *fiber.Map

ServerSuccessResponse is the SuccessResponse that will be passed in the response by handler.

func SetupErrorResponse

func SetupErrorResponse(err error) *fiber.Map

SetupErrorResponse is the singular ErrorResponse that will be passed in the response by handler.

func SetupSuccessResponse

func SetupSuccessResponse(data config.Config) *fiber.Map

SetupSuccessResponse is the SuccessResponse that will be passed in the response by handler.

func StatusErrorResponse

func StatusErrorResponse(err error) *fiber.Map

SetupErrorResponse is the singular ErrorResponse that will be passed in the response by handler.

func StatusSuccessResponse

func StatusSuccessResponse(data Status) *fiber.Map

SetupSuccessResponse is the SuccessResponse that will be passed in the response by handler.

Types

type Status

type Status struct {
	Type    string `json:"type" yaml:"type" xml:"type" form:"type"`             // The type of status e.g. "healthy".
	Message string `json:"message" yaml:"message" xml:"message" form:"message"` // The message returned by the api.
}

Jump to

Keyboard shortcuts

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