Documentation ¶
Index ¶
- type Article
- type ArticleField
- type ArticleSent
- type BizError
- type ClsBase
- type ClsInfo
- type DefArticle
- type DefData
- type DefExport
- type DefField
- type DefFieldExport
- type DefInfo
- type DefSimple
- type Dir
- type EndPoint
- type FieldBase
- type FieldSimple
- type FieldWithValues
- type HttpMethod
- type MockChangeSampleSrcReq
- type MockData
- type MockPathMap
- type MockPreviewReq
- type Range
- type ResConfig
- type ResField
- type ResFile
- type ResInstances
- type ResInstancesItem
- type ResRanges
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { Title string `yaml:"title"` Desc string `yaml:"desc"` Author string `yaml:"author"` Type string `yaml:"type"` XFields []ArticleField `yaml:"xfields,flow"` // control orders }
type ArticleField ¶
type DefArticle ¶
type DefData ¶
type DefData struct { ClsBase `yaml:",inline"` Fields []DefField `yaml:"fields"` Content string `yaml:"content,omitempty"` // for article only }
common item
type DefExport ¶
type DefExport struct { ClsBase `yaml:",inline"` XFields []DefFieldExport `yaml:"xfields,flow"` // control orders }
type DefField ¶
type DefField struct { FieldBase `yaml:",inline"` Fields []DefField `yaml:"fields,omitempty"` Length int `yaml:"length,omitempty"` LeftPad string `yaml:"leftpad,omitempty"` RightPad string `yaml:"rightpad,omitempty"` Path string `yaml:"path,omitempty"` FileDir string `yaml:"fileDir,omitempty"` Join bool `yaml:"join,omitempty"` Froms []DefField `yaml:"froms,flow,omitempty"` Values []interface{} `yaml:"-"` ValuesWithPlaceholder []string `yaml:"-"` }
type DefFieldExport ¶
type DefFieldExport struct { Field string `yaml:"field"` Prefix string `yaml:"prefix,omitempty"` Postfix string `yaml:"postfix,omitempty"` Divider string `yaml:"divider,omitempty"` Select string `yaml:"select,omitempty"` Where string `yaml:"where,omitempty"` Rand bool `yaml:"rand"` Limit int `yaml:"limit,omitempty"` }
type DefInfo ¶
type DefInfo struct { Title string `yaml:"title"` Desc string `yaml:"desc"` Fields interface{} `yaml:"fields,omitempty"` // is yaml Range string `yaml:"range,omitempty"` // is config Ranges interface{} `yaml:"ranges,omitempty"` // is ranges Instances interface{} `yaml:"instances,omitempty"` // is instances }
type DefSimple ¶
type DefSimple struct { ClsBase `yaml:",inline"` Fields []FieldSimple `yaml:"fields"` }
type EndPoint ¶
type EndPoint struct { Method HttpMethod `json:"method"` Summary string `json:"summary,omitempty"` Config string `json:"config"` Fields string `json:"fields"` MediaType string `json:"mediaType"` Type consts.OpenApiSchemaType `json:"type"` Lines int `json:"lines"` Samples map[string]string `json:"samples"` }
type FieldBase ¶
type FieldBase struct { FieldSimple `yaml:",inline"` Config string `yaml:"config,omitempty"` Where string `yaml:"where,omitempty"` Limit int `yaml:"limit,omitempty"` IsNumb bool `yaml:"isNumb,omitempty"` Expect string `yaml:"expect,omitempty"` Precision int `yaml:"precision,omitempty"` }
base struct
type FieldSimple ¶
type FieldSimple struct { Field string `yaml:"field,omitempty"` Note string `yaml:"note,omitempty"` Range string `yaml:"range,omitempty"` RangeLiteral string `yaml:"rangeLiteral,omitempty" json:"rangeLiteral,omitempty"` Value string `yaml:"value,omitempty"` Prefix string `yaml:"prefix,omitempty"` Postfix string `yaml:"postfix,omitempty"` Divider string `yaml:"divider,omitempty"` Loop string `yaml:"loop,omitempty"` Loopfix string `yaml:"loopfix,omitempty"` Format string `yaml:"format,omitempty"` Rand bool `yaml:"rand,omitempty"` Type string `yaml:"type,omitempty"` Mode string `yaml:"mode,omitempty"` Items int `yaml:"records,omitempty"` //ParentItems int `yaml:"-"` //ParentJoin bool `yaml:"-"` From string `yaml:"from,omitempty"` Use string `yaml:"use,omitempty"` Select string `yaml:"select,omitempty"` LoopStart int `yaml:"-"` LoopEnd int `yaml:"-"` LoopIndex int `yaml:"-"` IsRand bool `yaml:"-"` ReferToAnotherYaml bool `yaml:"-"` PrefixRange *Range `yaml:"-"` PostfixRange *Range `yaml:"-"` }
func (*FieldSimple) Init ¶
func (fld *FieldSimple) Init(field string)
type FieldWithValues ¶
type HttpMethod ¶
type HttpMethod string
const ( Get HttpMethod = "get" Post HttpMethod = "post" Put HttpMethod = "put" Delete HttpMethod = "delete" Patch HttpMethod = "path" Head HttpMethod = "head" Connect HttpMethod = "connect" Options HttpMethod = "options" Trace HttpMethod = "trace" )
func (HttpMethod) String ¶
func (e HttpMethod) String() string
type MockChangeSampleSrcReq ¶
type MockPreviewReq ¶
type ResConfig ¶
type ResConfig struct { ClsInfo `yaml:",inline"` FieldSimple `yaml:",inline"` }
config res
type ResInstances ¶
type ResInstances struct { ClsBase `yaml:",inline"` FileDir string `yaml:"fileDir,omitempty"` Instances []ResInstancesItem `yaml:"instances,flow"` }
instance res
type ResInstancesItem ¶
Click to show internal directories.
Click to hide internal directories.