Documentation ¶
Index ¶
- func ErrorCode(err error) int
- func ErrorCodeWithDefault(err error, defaultCode int) int
- func ParseAndGetChart(req *http.Request, cu chartUtils.Resolver, requireV1Support bool) (*chartUtils.Details, *chartUtils.ChartMultiVersion, error)
- func QueryParamIsTruthy(param string, req *http.Request) bool
- type Params
- type WithParams
- type WithoutParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorCodeWithDefault ¶
ErrorCodeWithDefault returns the int representing an error with a default value.
func ParseAndGetChart ¶ added in v1.8.0
func ParseAndGetChart(req *http.Request, cu chartUtils.Resolver, requireV1Support bool) (*chartUtils.Details, *chartUtils.ChartMultiVersion, error)
ParseAndGetChart request and parse a chart.
Types ¶
type WithParams ¶
type WithParams func(http.ResponseWriter, *http.Request, Params)
WithParams can be used to wrap handlers to take an extra arg for path params
func (WithParams) ServeHTTP ¶
func (h WithParams) ServeHTTP(w http.ResponseWriter, req *http.Request)
type WithoutParams ¶
type WithoutParams func(http.ResponseWriter, *http.Request)
WithoutParams can be used to wrap handlers that doesn't take params
func (WithoutParams) ServeHTTP ¶
func (h WithoutParams) ServeHTTP(w http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.