Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Registry ¶
func Registry(x MiddlewareBuilder)
Types ¶
type Config ¶
type Config struct { Name string `json:"name" yaml:"name"` Data RawMessage `json:"data" yaml:"data"` }
type Middleware ¶
Middleware is HTTP/gRPC/Mqc/Cron transport middleware.
func Chain ¶
func Chain(m ...Middleware) Middleware
Chain returns a Middleware that specifies the chained handler for endpoint.
func Resolve ¶
func Resolve(m *Config) Middleware
type MiddlewareBuilder ¶
type MiddlewareBuilder interface { Build(data RawMessage) Middleware Name() string }
type RawMessage ¶
func (*RawMessage) MarshalJSON ¶
func (m *RawMessage) MarshalJSON() ([]byte, error)
MarshalJSON returns m as the JSON encoding of m.
func (*RawMessage) MarshalYAML ¶
func (m *RawMessage) MarshalYAML() (interface{}, error)
func (*RawMessage) UnmarshalJSON ¶
func (m *RawMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON sets *m to a copy of data.
func (*RawMessage) UnmarshalYAML ¶
func (m *RawMessage) UnmarshalYAML(value *yaml.Node) error
Click to show internal directories.
Click to hide internal directories.