Documentation ¶
Index ¶
- Constants
- func Create(id, name string, conf *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)
- func NewComplete(responseStatus int, contentType string, responseExample string, ...) *complete
- func NewFactory() eosc.IExtenderDriverFactory
- func Register(register eosc.IExtenderDriverRegister)
- type Config
- type Mocking
- func (m *Mocking) CheckSkill(skill string) bool
- func (m *Mocking) Destroy()
- func (m *Mocking) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err error)
- func (m *Mocking) DoHttpFilter(ctx http_context.IHttpContext, next eocontext.IChain) (err error)
- func (m *Mocking) Reset(v interface{}, workers map[eosc.RequireId]eosc.IWorker) error
- func (m *Mocking) Start() error
- func (m *Mocking) Stop() error
Constants ¶
View Source
const (
Name = "http-mocking"
)
Variables ¶
This section is empty.
Functions ¶
func NewComplete ¶
func NewFactory ¶
func NewFactory() eosc.IExtenderDriverFactory
func Register ¶
func Register(register eosc.IExtenderDriverRegister)
Types ¶
type Config ¶
type Config struct { ResponseStatus int `json:"response_status" default:"200" label:"响应状态码" description:"仅http路由有效"` ContentType string `json:"content_type" label:"响应 Content-Type" enum:"application/json"` ResponseExample string `json:"response_example" format:"text" label:"响应Body" description:"与Json Schema字段二选一"` ResponseSchema string `` /* 138-byte string literal not displayed */ ResponseHeader map[string]string `json:"response_header" label:"响应头"` }
type Mocking ¶
type Mocking struct { drivers.WorkerBase // contains filtered or unexported fields }
func (*Mocking) CheckSkill ¶
func (*Mocking) DoHttpFilter ¶
func (m *Mocking) DoHttpFilter(ctx http_context.IHttpContext, next eocontext.IChain) (err error)
Click to show internal directories.
Click to hide internal directories.