Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendResponse ¶
func SendResponse[T any](w http.ResponseWriter, v *Res[T])
func ThrowBadRequest ¶
func ThrowBadRequest(w http.ResponseWriter, err error)
Types ¶
type Context ¶
type Context[TI any, TO any] struct { Request *http.Request TraceId string Input *TI Output *TO Exception exception.Exception Logger *logger.Logger Timeline ContextTimeline }
type ContextTimeline ¶
type HttpMethod ¶
type HttpMethod string
const ( Get HttpMethod = http.MethodGet Post HttpMethod = http.MethodPost Put HttpMethod = http.MethodPut Patch HttpMethod = http.MethodPatch Delete HttpMethod = http.MethodDelete Head HttpMethod = http.MethodHead Options HttpMethod = http.MethodOptions )
type Nichirin ¶
type Nichirin struct { Engine *chi.Mux Address string }
func (*Nichirin) StartServer ¶
func (s *Nichirin) StartServer()
type ResPayload ¶
Click to show internal directories.
Click to hide internal directories.