Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { RouterNames []string `yaml:"routerNames"` Request []RequestRule `yaml:"request"` Response []ResponseRule `yaml:"response"` }
type CustomRuleAnalyzer ¶
type CustomRuleAnalyzer struct {
// contains filtered or unexported fields
}
func NewCustomRuleAnalyzer ¶
func (*CustomRuleAnalyzer) MatchCustomRequestRule ¶
func (p *CustomRuleAnalyzer) MatchCustomRequestRule(node ast.Node) (matched bool)
func (*CustomRuleAnalyzer) MatchCustomResponseRule ¶
func (p *CustomRuleAnalyzer) MatchCustomResponseRule(node ast.Node) (matched bool)
type DataProperties ¶
type DataProperties map[string]*DataSchema
type DataSchema ¶
type DataSchema struct { Type DataType `json:"type"` Format string `json:"format"` Properties DataProperties `json:"properties"` // set when Type='array' Item *DataSchema `json:"item"` Optional bool `json:"optional"` }
type DataSchemaTransformer ¶
type DataSchemaTransformer struct {
// contains filtered or unexported fields
}
func NewDataSchemaTransformer ¶
func NewDataSchemaTransformer(dataSchema *DataSchema) *DataSchemaTransformer
func (*DataSchemaTransformer) TransformToGeneric ¶
func (d *DataSchemaTransformer) TransformToGeneric() *spec.SchemaRef
func (*DataSchemaTransformer) TransformToSpecific ¶
func (d *DataSchemaTransformer) TransformToSpecific(genericType *spec.SchemaRef, dataTypeFallback func(dataType *DataSchema) *spec.SchemaRef) *spec.SchemaRef
type RequestReturn ¶
type RequestReturn struct { Data *DataSchema `yaml:"data"` ContentType string `yaml:"contentType"` }
type RequestRule ¶
type RequestRule struct { Type string `yaml:"type"` // type name Method string `yaml:"method"` Return *RequestReturn `yaml:"return"` }
type ResponseReturn ¶
type ResponseReturn struct { Status string `yaml:"status"` Data *DataSchema `yaml:"data"` ContentType string `yaml:"contentType"` }
type ResponseRule ¶
type ResponseRule struct { Node string `yaml:"node"` Type string `yaml:"type"` // type name Method string `yaml:"method"` Return *ResponseReturn `yaml:"return"` }
Click to show internal directories.
Click to hide internal directories.