Documentation ¶
Index ¶
- Constants
- type Mock
- func (m *Mock) Close()
- func (m *Mock) DefaultSpec() interface{}
- func (m *Mock) Description() string
- func (m *Mock) Handle(ctx context.HTTPContext) (result string)
- func (m *Mock) Inherit(filterSpec *httppipeline.FilterSpec, previousGeneration httppipeline.Filter)
- func (m *Mock) Init(filterSpec *httppipeline.FilterSpec)
- func (m *Mock) Kind() string
- func (m *Mock) Results() []string
- func (m *Mock) Status() interface{}
- type Rule
- type Spec
Constants ¶
View Source
const (
// Kind is the kind of Mock.
Kind = "Mock"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
Mock is filter Mock.
func (*Mock) DefaultSpec ¶
func (m *Mock) DefaultSpec() interface{}
DefaultSpec returns default spec of Mock.
func (*Mock) Description ¶
Description returns the description of Mock.
func (*Mock) Handle ¶
func (m *Mock) Handle(ctx context.HTTPContext) (result string)
Handle mocks HTTPContext.
func (*Mock) Inherit ¶
func (m *Mock) Inherit(filterSpec *httppipeline.FilterSpec, previousGeneration httppipeline.Filter)
Inherit inherits previous generation of Mock.
type Rule ¶
type Rule struct { Path string `yaml:"path,omitempty" jsonschema:"omitempty,pattern=^/"` PathPrefix string `yaml:"pathPrefix,omitempty" jsonschema:"omitempty,pattern=^/"` Code int `yaml:"code" jsonschema:"required,format=httpcode"` Headers map[string]string `yaml:"headers" jsonschema:"omitempty"` Body string `yaml:"body" jsonschema:"omitempty"` Delay string `yaml:"delay" jsonschema:"omitempty,format=duration"` // contains filtered or unexported fields }
Rule is the mock rule.
Click to show internal directories.
Click to hide internal directories.