Documentation ¶
Index ¶
- Variables
- func GetPathTokens(r *http.Request) []string
- type API
- func (api *API) Close() error
- func (api *API) DefaultHandler(w http.ResponseWriter, r *http.Request)
- func (api *API) Handle(w http.ResponseWriter, r *http.Request)
- func (api *API) Logger() *zap.Logger
- func (api *API) OptionsResponse(allowedMethods []string, w http.ResponseWriter, r *http.Request)
- func (api *API) Respond(w http.ResponseWriter, r *http.Request, respObj any, err error)
- func (api *API) Transaction(ctx context.Context, fn func(tx *dbr.Tx) error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyExists = errors.New("already exists")
View Source
var ErrBadRequest = errors.New("bad request")
View Source
var ErrMethodNotAllowed = errors.New("method not allowed")
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func GetPathTokens ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) DefaultHandler ¶
func (api *API) DefaultHandler(w http.ResponseWriter, r *http.Request)
func (*API) OptionsResponse ¶
Click to show internal directories.
Click to hide internal directories.