Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasePathDescriber ¶
type BasePathDescriber interface {
BasePath() string
}
type DefaultSetter ¶
type DefaultSetter interface {
SetDefault()
}
type EmptyOperator ¶
type EmptyOperator struct{}
func (EmptyOperator) NoOutput ¶
func (EmptyOperator) NoOutput()
type Factory ¶
type Factory struct {
Type reflect.Type
ContextKey any
NoOutput bool
Params url.Values
IsLast bool
Operator Operator
}
func NewFactory ¶
type HasContextKey ¶
type HasMiddlewares ¶
type HasMiddlewares interface {
Middlewares() []Operator
}
type HasParameters ¶
type Initializer ¶
type InitializerFrom ¶
type MetaOperator ¶
type MetaOperator struct {
EmptyOperator
// contains filtered or unexported fields
}
Example ¶
op := BasePathOperator("/base")
fmt.Println(op.(BasePathDescriber).BasePath())
fmt.Println(op)
op = GroupOperator("/base/group")
fmt.Println(op.(PathDescriber).Path())
fmt.Println(op)
Output: /base base(/base) /base/group group(/base/group)
func (*MetaOperator) BasePath ¶
func (g *MetaOperator) BasePath() string
func (*MetaOperator) Path ¶
func (g *MetaOperator) Path() string
func (*MetaOperator) String ¶
func (g *MetaOperator) String() string
type PathDescriber ¶
type PathDescriber interface {
Path() string
}
Click to show internal directories.
Click to hide internal directories.