Versions in this module Expand all Collapse all v1 v1.0.0 Feb 22, 2022 Changes in this version + func CtxWithMock(ctx context.Context, mock ...*Mock) context.Context + func InitMockSetting() + func WithHeader(key, value string) simpleConditionOption + func WithJsonBodyFields(field string, value interface{}) simpleConditionOption + func WithMethod(method string) simpleConditionOption + func WithPathReg(pathReg string) simpleConditionOption + func WithQuery(key, value string) simpleConditionOption + type Mock struct + func NewMock(con RequestCondition, resp *http.Response, err error) *Mock + func NewMockByPath(path string, resp *http.Response, err error) *Mock + type MockResponseFilter struct + func NewMockResponseFilter() *MockResponseFilter + func (m *MockResponseFilter) Clear() + func (m *MockResponseFilter) FilterChain(next httplib.Filter) httplib.Filter + func (m *MockResponseFilter) Mock(cond RequestCondition, resp *http.Response, err error) + func (m *MockResponseFilter) MockByPath(path string, resp *http.Response, err error) + type RequestCondition interface + Match func(ctx context.Context, req *httplib.BeegoHTTPRequest) bool + type SimpleCondition struct + func NewSimpleCondition(path string, opts ...simpleConditionOption) *SimpleCondition + func (sc *SimpleCondition) Match(ctx context.Context, req *httplib.BeegoHTTPRequest) bool + type Stub interface + Clear func() + Mock func(cond RequestCondition, resp *http.Response, err error) + MockByPath func(path string, resp *http.Response, err error) + func StartMock() Stub Other modules containing this package github.com/whiliang/beego-multi-schema/v2