Documentation
¶
Index ¶
- func EqualLocation(a, b Location) bool
- type AnyModelAdapter
- type Encoder
- type HookMatch
- type Location
- type Match
- type ModelAdapter
- type PathMaker
- func (pm PathMaker) Hook(instanceId string, hookId uint64, name string) string
- func (pm PathMaker) ID() string
- func (pm PathMaker) Match(r *http.Request) (Match, bool)
- func (pm PathMaker) Prefix() string
- func (pm PathMaker) Resource(r *resources.Resource, name string) string
- func (pm PathMaker) SessionCookie() string
- type UndoPath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualLocation ¶
EqualLocation reports whether a and b encode the same path and query.
Types ¶
type AnyModelAdapter ¶ added in v0.12.1
type Location ¶
type Location struct {
// Segments holds the decoded path segments without leading or trailing
// slashes.
Segments []string
// Query holds the decoded query parameters.
Query url.Values
}
Location is a parsed or generated URL path plus query string.
func NewLocationFromEscapedURI ¶
NewLocationFromEscapedURI parses s into a Location.
func NewLocationFromURL ¶
NewLocationFromURL decodes u into a Location.
func (Location) Clone ¶ added in v0.12.10
Clone returns a deep copy of l.
The returned Location has independent Segments and Query slices, so callers can mutate it without changing the original value.
type ModelAdapter ¶ added in v0.12.1
type ModelAdapter[M any] adapter
func GetModelAdapter ¶ added in v0.12.1
func GetModelAdapter[M any]() (ModelAdapter[M], error)
func (ModelAdapter[M]) Decode ¶ added in v0.12.1
func (ma ModelAdapter[M]) Decode(l Location) (*M, bool)
func (ModelAdapter[M]) Encode ¶ added in v0.12.1
func (ma ModelAdapter[M]) Encode(m *M) (Location, error)
type PathMaker ¶
type PathMaker struct {
// contains filtered or unexported fields
}
func NewPathMaker ¶
func (PathMaker) SessionCookie ¶ added in v0.12.1
Click to show internal directories.
Click to hide internal directories.