Documentation
¶
Index ¶
- Constants
- type Option
- func Custom(key string, value any) Option
- func Detail(detail string) Option
- func Ext(key string, value any) Option
- func Instance(uri string) Option
- func Status(status int) Option
- func Title(title string) Option
- func Type(uri string) Option
- func Wrap(err error) Option
- func WrapPublic(err error) Option
- type Problem
- func (p *Problem) Append(opts ...Option) *Problem
- func (p *Problem) Data() map[string]any
- func (p *Problem) Error() string
- func (p *Problem) Get(key string) (any, bool)
- func (p *Problem) Is(target error) bool
- func (p *Problem) JSON() []byte
- func (p *Problem) JSONString() string
- func (p *Problem) MarshalJSON() ([]byte, error)
- func (p *Problem) UnmarshalJSON(b []byte) error
- func (p *Problem) Unwrap() error
- func (p *Problem) With(key string, value any) *Problem
- func (p *Problem) WriteHeaderTo(w http.ResponseWriter)
- func (p *Problem) WriteTo(w http.ResponseWriter) (int, error)
Constants ¶
View Source
const MediaType = "application/problem+json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WrapPublic ¶
type Problem ¶
type Problem struct {
// contains filtered or unexported fields
}
func (*Problem) JSONString ¶
func (*Problem) MarshalJSON ¶
func (*Problem) UnmarshalJSON ¶
func (*Problem) WriteHeaderTo ¶
func (p *Problem) WriteHeaderTo(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.