Documentation
¶
Index ¶
- func IsNotFound(err error) bool
- func IsValidationError(err error) bool
- type Field
- type Problem
- func BadRequest(detail string) Problem
- func Conflict(detail string) Problem
- func Forbidden(title, detail string) Problem
- func InternalServerError(title, detail string) Problem
- func MethodNotAllowed(method string) Problem
- func NewProblemOfError(err error) Problem
- func NotFound(ref ...string) Problem
- func Unauthorized(title, detail string) Problem
- func ValidationError(field, detail string) Problem
- func ValidationErrors(fieldsMap map[string]string, detail ...string) Problem
- type ProblemBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
func IsValidationError ¶
Types ¶
type Problem ¶
func BadRequest ¶
func InternalServerError ¶
func MethodNotAllowed ¶
func NewProblemOfError ¶
func Unauthorized ¶
func ValidationError ¶
type ProblemBuilder ¶
type ProblemBuilder interface {
Build() Problem
Type(string) ProblemBuilder
Status(int) ProblemBuilder
Title(string) ProblemBuilder
Detail(string) ProblemBuilder
Instance(string) ProblemBuilder
Fields(...Field) ProblemBuilder
}
func Builder ¶
func Builder() ProblemBuilder
Click to show internal directories.
Click to hide internal directories.