Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorAttribute ¶
type ErrorSchema ¶
type HTTPErrorResponse ¶
type HTTPErrorResponse struct {
Error ErrorSchema `json:"error"`
}
func NewAuthorizationError ¶
func NewAuthorizationError() HTTPErrorResponse
func NewBodyParserErrorResponse ¶
func NewBodyParserErrorResponse() HTTPErrorResponse
func NewErrorResponse ¶
func NewErrorResponse(ctx context.Context, err error, msg ...string) HTTPErrorResponse
type HTTPSuccessResponse ¶
type HTTPSuccessResponse struct {
Data interface{} `json:"data"`
}
func NewSuccessResponse ¶
func NewSuccessResponse(data interface{}) HTTPSuccessResponse
type HTTPValidationErrorResponse ¶
type HTTPValidationErrorResponse struct {
Error ErrorSchema `json:"error"`
Attributes []ErrorAttribute `json:"attributes"`
}
func NewValidationErrorResponse ¶
func NewValidationErrorResponse(errors map[string]string) HTTPValidationErrorResponse
Click to show internal directories.
Click to hide internal directories.