Documentation ¶
Index ¶
Constants ¶
View Source
const ( CmdTypeReturns = CmdType(mapPolicyReturns) CmdTypeForwards = CmdType(mapPolicyForwards) CmdTypeRedirects = CmdType(mapPolicyRedirects) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORSOptions ¶ added in v1.1.9
type CORSOptions struct { Enabled bool AllowCredentials bool MaxAge int64 AllowedOrigins []string AllowedMethods []myhttp.HTTPMethod AllowedHeaders []string ExposedHeaders []string }
func (*CORSOptions) ToCors ¶ added in v1.1.9
func (c *CORSOptions) ToCors() *cors.Cors
type Config ¶ added in v1.1.9
type Config struct { CORS *CORSOptions MatchTrailingSlash bool }
type MockuMappings ¶
func (*MockuMappings) GroupMethodsByURI ¶ added in v1.1.4
func (m *MockuMappings) GroupMethodsByURI() map[string][]myhttp.HTTPMethod
func (*MockuMappings) IsEmpty ¶ added in v1.1.4
func (m *MockuMappings) IsEmpty() bool
type NameJSONPair ¶ added in v1.1.4
type NameJSONPair struct { Name string JSON myjson.ExtJSONMatcher }
type NameRegexpPair ¶
type NameValuesPair ¶
type Parser ¶ added in v1.1.4
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) Parse ¶ added in v1.1.4
func (p *Parser) Parse() (r *MockuMappings, e error)
type Returns ¶
type Returns struct { StatusCode myhttp.StatusCode Headers []*NameValuesPair Body []byte Latency *Interval }
type When ¶
type When struct { Headers []*NameValuesPair HeaderRegexps []*NameRegexpPair HeaderJSONs []*NameJSONPair Params []*NameValuesPair ParamRegexps []*NameRegexpPair ParamJSONs []*NameJSONPair PathVars []*NameValuesPair PathVarRegexps []*NameRegexpPair Body []byte BodyRegexp *regexp.Regexp BodyJSON *myjson.ExtJSONMatcher }
Click to show internal directories.
Click to hide internal directories.