Documentation ¶
Overview ¶
Package pathadaptor provides a path adaptor.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathAdaptor ¶
type PathAdaptor struct {
// contains filtered or unexported fields
}
PathAdaptor is the path Adaptor.
type RegexpReplace ¶
type RegexpReplace struct { Regexp string `json:"regexp" jsonschema:"required,format=regexp"` Replace string `json:"replace"` // contains filtered or unexported fields }
RegexpReplace use regexp-replace pair to rewrite path.
type Spec ¶
type Spec struct { Replace string `json:"replace,omitempty"` AddPrefix string `json:"addPrefix,omitempty" jsonschema:"pattern=^/"` TrimPrefix string `json:"trimPrefix,omitempty" jsonschema:"pattern=^/"` RegexpReplace *RegexpReplace `json:"regexpReplace,omitempty"` }
Spec describes rules for PathAdaptor.
Click to show internal directories.
Click to hide internal directories.