Documentation ¶
Index ¶
- func Run(router *Router, transports ...Transport)
- type Client
- type ContextProvider
- type ContextWith
- type EmptyOperator
- type Metadata
- type MetadataCarrier
- type MiddleOperators
- type Operator
- type OperatorFactory
- type OperatorInit
- type OperatorNewer
- type OperatorWithParams
- type OperatorWithoutOutput
- type Result
- type Route
- type Router
- type Routes
- type Transport
- type WithMiddleOperators
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContextProvider ¶
type ContextProvider interface { Operator ContextKey() interface{} }
type ContextWith ¶
func ComposeContextWith ¶
func ComposeContextWith(withs ...ContextWith) ContextWith
type EmptyOperator ¶
type EmptyOperator struct {
OperatorWithoutOutput
}
type Metadata ¶
Example ¶
ma := Metadata{} ma.Add("a", "Av1") ma.Add("a", "Av2") mb := Metadata{} mb.Set("b", "Bv1") all := FromMetas(ma, mb) results := []interface{}{ all.String(), all.Has("a"), all.Get("a"), } all.Del("b") results = append(results, all.Get("b"), all.String(), ) for _, r := range results { fmt.Printf("%v\n", r) }
Output: a=Av1&a=Av2&b=Bv1 true Av1 a=Av1&a=Av2
type MetadataCarrier ¶
type MetadataCarrier interface {
Meta() Metadata
}
type MiddleOperators ¶
type MiddleOperators []Operator
type OperatorFactory ¶
type OperatorFactory struct { Type reflect.Type ContextKey interface{} NoOutput bool Params url.Values IsLast bool Operator Operator }
func NewOperatorFactory ¶
func NewOperatorFactory(op Operator, last bool) *OperatorFactory
func (*OperatorFactory) New ¶
func (o *OperatorFactory) New() Operator
func (*OperatorFactory) String ¶
func (o *OperatorFactory) String() string
type OperatorInit ¶
type OperatorInit interface {
InitFrom(o Operator)
}
type OperatorNewer ¶
type OperatorNewer interface {
New() Operator
}
type OperatorWithParams ¶
type OperatorWithoutOutput ¶
type OperatorWithoutOutput interface { Operator NoOutput() }
type Route ¶
type Route struct { Operators []Operator // contains filtered or unexported fields }
func (*Route) OperatorFactories ¶
func (rs *Route) OperatorFactories() (factories []*OperatorFactory)
type WithMiddleOperators ¶
type WithMiddleOperators interface {
MiddleOperators() MiddleOperators
}
Click to show internal directories.
Click to hide internal directories.