Documentation ¶
Index ¶
- func NewMainModule() *application.ModuleBuilder
- func NewTestModule() *application.ModuleBuilder
- type Client
- type ClientContext
- type Clients
- type Context
- type Entity
- type Filter
- type FilterChain
- type FilterChainBuilder
- type FilterRegistration
- type FilterRegistry
- type Headers
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMainModule ¶ added in v0.0.4
func NewMainModule() *application.ModuleBuilder
NewMainModule ...
func NewTestModule ¶ added in v0.0.4
func NewTestModule() *application.ModuleBuilder
NewTestModule ...
Types ¶
type Client ¶
Client 是一个简易的 HTTP 客户端
func NewClientWithFilters ¶ added in v0.0.3
func NewClientWithFilters(filters ...*FilterRegistration) Client
NewClientWithFilters ...
type ClientContext ¶ added in v0.0.4
type ClientContext struct { Attributes attributes.Table Client Client Chain FilterChain Filters []*FilterRegistration }
ClientContext ...
type Context ¶ added in v0.0.4
type Context struct { Attributes attributes.Table ClientContext *ClientContext Request *Request Response *Response }
Context ...
type Entity ¶
Entity ...
func NewEntityWithBinary ¶ added in v0.0.4
NewEntityWithBinary ...
func NewEntityWithJSON ¶ added in v0.0.4
NewEntityWithJSON ...
func NewEntityWithText ¶ added in v0.0.4
NewEntityWithText ...
type Filter ¶ added in v0.0.3
type Filter interface {
Handle(c *Context, chain FilterChain) error
}
Filter 用于过滤 web 请求
type FilterChain ¶ added in v0.0.3
FilterChain 表示一个由若干 Filter 构成的链条
type FilterChainBuilder ¶ added in v0.0.3
type FilterChainBuilder struct {
// contains filtered or unexported fields
}
FilterChainBuilder 用于创建 FilterChain
func (*FilterChainBuilder) AddRegistration ¶ added in v0.0.3
func (inst *FilterChainBuilder) AddRegistration(list ...*FilterRegistration) *FilterChainBuilder
AddRegistration ...
func (*FilterChainBuilder) AddRegistry ¶ added in v0.0.3
func (inst *FilterChainBuilder) AddRegistry(list ...FilterRegistry) *FilterChainBuilder
AddRegistry ...
func (*FilterChainBuilder) Create ¶ added in v0.0.3
func (inst *FilterChainBuilder) Create() FilterChain
Create ...
type FilterRegistration ¶ added in v0.0.3
FilterRegistration 是 Filter 的注册信息
type FilterRegistry ¶ added in v0.0.3
type FilterRegistry interface {
FilterRegistrations() []*FilterRegistration
}
FilterRegistry 用于注册 Filter
Source Files ¶
Click to show internal directories.
Click to hide internal directories.