Documentation ¶
Index ¶
- Constants
- func EchoBadRequest(ec echo.Context, err error) error
- func EchoCreateFailed(ec echo.Context, err error) error
- func EchoForbidden(ec echo.Context, err error) error
- func EchoHasExpired(ec echo.Context, err error) error
- func EchoInternalServerError(ec echo.Context, err error) error
- func EchoNotDeleted(ec echo.Context, err error) error
- func EchoNotFound(ec echo.Context, err error) error
- func EchoNotUpdated(ec echo.Context, err error) error
- func EchoOK(ec echo.Context, data interface{}) error
- func EchoOkResult(ec echo.Context) error
- func EchoUnauthorized(ec echo.Context, err error) error
- type ErrorAnsw
- func BadRequest(err error) ErrorAnsw
- func CreateFailed(err error) ErrorAnsw
- func Forbidden(err error) ErrorAnsw
- func HasExpired(err error) ErrorAnsw
- func InternalServerError(err error) ErrorAnsw
- func NewErrorAnsw(statusCode int, code string, err error) ErrorAnsw
- func NotDeleted(err error) ErrorAnsw
- func NotFound(err error) ErrorAnsw
- func NotUpdated(err error) ErrorAnsw
- func PreconditionFailed(err error) ErrorAnsw
- func Unauthorized(err error) ErrorAnsw
- type ErrorAnswBody
- type HTTPSrv
- type ResultAnsw
Constants ¶
View Source
const ( PublicSrv = "public" PrivateSrv = "private" V1 = "1" )
Variables ¶
This section is empty.
Functions ¶
func EchoBadRequest ¶
BadRequest return err 400
func EchoCreateFailed ¶
CreateFailed return err 409
func EchoHasExpired ¶
HasExpired return err 408
func EchoInternalServerError ¶
InternalServerError return err 500
func EchoNotDeleted ¶
NotDeleted return err 406
func EchoNotUpdated ¶
NotUpdated return err 409
func EchoOkResult ¶
func EchoOkResult(ec echo.Context) error
func EchoUnauthorized ¶
Unauthorized return err 401
Types ¶
type ErrorAnsw ¶
type ErrorAnsw struct {
Body ErrorAnswBody `json:"error"`
}
func InternalServerError ¶
InternalServerError return err 500
func PreconditionFailed ¶
PreconditionFailed return err 409
type ErrorAnswBody ¶
type HTTPSrv ¶
type HTTPSrv struct { PublicSrv *echo.Echo PrivateSrv *echo.Echo PublicV1 *echo.Group PrivateV1 *echo.Group // contains filtered or unexported fields }
func NewHTTPSrv ¶
func NewHTTPSrv(ctx *internalctx.Context) (*HTTPSrv, error)
type ResultAnsw ¶
type ResultAnsw struct {
Body interface{} `json:"result"`
}
Click to show internal directories.
Click to hide internal directories.