Documentation ¶
Index ¶
- func BindJSON(v any, r io.Reader) error
- func DisableTraceID()
- func EnableTraceID()
- func Errorf(statusCode, code int, format string, a ...any) error
- func NewBasicAuth(next http.Handler, fc BasicAuthFunc) http.Handler
- func NewStatus(statusCode, code int, message string) error
- func StatusWrap(statusCode, code int, err error) error
- func StatusWrapE(statusCode, code int, message string, err error) error
- func TraceID() string
- func WrapE(fc func(w http.ResponseWriter, r *http.Request) error) http.HandlerFunc
- func XBindJSON[T any](r io.Reader) (T, error)
- type Ack
- type BasicAuthFunc
- type Caller
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableTraceID ¶
func DisableTraceID()
func EnableTraceID ¶
func EnableTraceID()
func NewBasicAuth ¶
func NewBasicAuth(next http.Handler, fc BasicAuthFunc) http.Handler
func StatusWrap ¶
func WrapE ¶
func WrapE(fc func(w http.ResponseWriter, r *http.Request) error) http.HandlerFunc
Types ¶
type BasicAuthFunc ¶
func NewMemoryBasicAuthFunc ¶
func NewMemoryBasicAuthFunc(users map[string]string) BasicAuthFunc
type Caller ¶
type Caller[T any] struct { // contains filtered or unexported fields }
func (*Caller[T]) GetTraceID ¶
func (*Caller[T]) Ok ¶
func (c *Caller[T]) Ok(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.