Documentation ¶
Index ¶
- Variables
- func NewDefaultProblemConverter(opts ...appkithttp.ProblemConverterOption) appkithttp.ProblemConverter
- func NewProblemConverter(opts ...appkithttp.ProblemConverterOption) appkithttp.ProblemConverter
- func NewServiceProblemMatcher() appkithttp.ProblemMatcher
- func NewValidationWithViolationsProblemMatcher() appkithttp.ProblemMatcher
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultProblemMatchers = append( []appkithttp.ProblemMatcher{ NewValidationWithViolationsProblemMatcher(), }, append( appkithttp.DefaultProblemMatchers, NewServiceProblemMatcher(), )..., )
DefaultProblemMatchers is a list of default ProblemMatchers. nolint: gochecknoglobals
Functions ¶
func NewDefaultProblemConverter ¶
func NewDefaultProblemConverter(opts ...appkithttp.ProblemConverterOption) appkithttp.ProblemConverter
func NewProblemConverter ¶
func NewProblemConverter(opts ...appkithttp.ProblemConverterOption) appkithttp.ProblemConverter
func NewServiceProblemMatcher ¶
func NewServiceProblemMatcher() appkithttp.ProblemMatcher
NewServiceProblemMatcher returns a problem matcher for service errors. If the returned error matches the following interface, a special service problem is returned by NewProblem:
type ServiceError interface { ServiceError() bool }
func NewValidationWithViolationsProblemMatcher ¶
func NewValidationWithViolationsProblemMatcher() appkithttp.ProblemMatcher
NewValidationWithViolationsProblemMatcher returns a problem matcher for validation errors that contain violations. If the returned error matches the following interface, a special validation problem is returned by NewProblem:
type violationError interface { Violations() map[string][]string }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.