api

package module
v0.0.0-...-2d97715 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidBody = ValidationError{
	Msg: "Invalid body",
}
View Source
var ServiceOverloaded = BusinessError{
	Msg:  "Service is overloaded. Please try again later.",
	Code: "SERVICE_OVERLOADED",
}

Functions

This section is empty.

Types

type ApiError

type ApiError interface {
	ToResponseEvent() events.APIGatewayV2HTTPResponse
}

type BusinessError

type BusinessError struct {
	Code string `json:"code"`
	Msg  string `json:"msg"`
}

func (BusinessError) Error

func (businessError BusinessError) Error() string

func (BusinessError) ToResponseEvent

func (businessError BusinessError) ToResponseEvent() (responseEvent events.APIGatewayV2HTTPResponse)

type ValidationError

type ValidationError struct {
	Msg string
}

func (ValidationError) Error

func (invalid ValidationError) Error() string

func (ValidationError) ToResponseEvent

func (invalid ValidationError) ToResponseEvent() (responseEvent events.APIGatewayV2HTTPResponse)

Jump to

Keyboard shortcuts

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