Documentation ¶
Overview ¶
Package chivalues provides value extractor for Chi router.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoValue = errors.New("request path value is empty")
ErrNoValue indicates that all possible route path segments were empty.
Functions ¶
This section is empty.
Types ¶
type ChiRequestValueExtractor ¶
type ChiRequestValueExtractor struct {
// contains filtered or unexported fields
}
ChiRequestValueExtractor retrieves chi.Router named URL parameters.
func New ¶
func New(names ...string) (*ChiRequestValueExtractor, error)
New creates a ChiRequestValueExtractor that retrieves named URL parameters seeded by a chi.Router.
func (*ChiRequestValueExtractor) ExtractRequestValue ¶
ExtractRequestValue populates [url.Value]s with URL parameters.
func (*ChiRequestValueExtractor) ExtractStringValue ¶
func (c *ChiRequestValueExtractor) ExtractStringValue(r *http.Request) (string, error)
ExtractStringValue satisfies `extract.StringValue` interface.
Click to show internal directories.
Click to hide internal directories.