Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseConfig ¶
func ParseConfig()
Types ¶
type AutoApiActionDefined ¶
type AutoApiActionDefined struct {
Name string `json:"Name" yaml:"Name"` //api操作名称
Describe string `json:"Describe" yaml:"Describe"` //api操作具体描述内容
Enable bool `json:"Enable" yaml:"Enable"` //是否启用
Plugins []AutoApiActionPluginDefined `json:"Plugins" yaml:"Plugins"` //该api操作的插件列表
}
AutoApiActionDefined 单个autoApi使用插件的定义
type AutoApiActionPluginDefined ¶
type AutoApiActionPluginDefined struct {
Enable bool `json:"Enable" yaml:"Enable"` //是否启用
Name string `json:"Name" yaml:"Name"` //插件名称,如:API_SEARCH,必须为注册的插件
ExtendParams extendparams.CommonExtendParams `json:"ExtendParams" yaml:"ExtendParams"` //扩展参数
Remark string `json:"Remark" yaml:"Remark"` //备注,如使用的插件用途的具体描述
}
AutoApiActionPluginDefined 单个autoApi使用插件的定义
type AutoApiConfig ¶
type AutoApiConfig struct {
Apis []AutoApiDefined `json:"Apis" yaml:"Apis"`
ExtendParams extendparams.CommonExtendParams `json:"ExtendParams" yaml:"ExtendParams"` //扩展参数
}
type AutoApiDataDefined ¶
type AutoApiDataDefined struct {
//结构
DataName string `json:"DataName" yaml:"DataName"` //数据名称,用于给数据区分存储来源,如表名
AutoTable bool `json:"AutoTable" yaml:"AutoTable"` //是否自动建表,true:自动检查并创建表,false:不检查
Fields []AutoApiFieldDefined `json:"Fields" yaml:"Fields"`
Comment string `json:"Comment" yaml:"Comment"` //数据名称,用于给数据区分存储来源,如表名
}
func (AutoApiDataDefined) FieldNames ¶
func (a AutoApiDataDefined) FieldNames() []string
type AutoApiDefined ¶
type AutoApiDefined struct {
Name string `json:"Name" yaml:"Name"` //api总称
ShowName string `json:"ShowName" yaml:"ShowName"` //展示名称(一般为中文)
Version string `json:"Version" yaml:"Version"` //版本,v1/v2 这样,为空则默认使用最新版本
LoadFile string `json:"LoadFile" yaml:"LoadFile"` //加载文件路径,有路径值则从该路径加载覆盖当前AutoApi
Actions []AutoApiActionDefined `json:"Actions" yaml:"Actions"` //使用的插件列表
Data AutoApiDataDefined `json:"Data" yaml:"Data"` //数据定义
Comment string `json:"Comment" yaml:"Comment"` //备注/注释说明
}
AutoApiDefined 单个autoApi的定义
type AutoApiFieldDefined ¶
type AutoApiFieldDefined struct {
Name string `json:"Name" yaml:"Name"` //字段名,如:name
ShowName string `json:"ShowName" yaml:"ShowName"` //展示名称(一般为中文)
//类型, 可为:
// varchar(32)
// bigint unsigned
// int unsigned
// tinyint unsigned
// datetime(3)
SqlType string `json:"SqlType" yaml:"SqlType"`
Default string `json:"Default" yaml:"Default"` //默认值
Comment string `json:"Comment" yaml:"Comment"` //备注/注释说明
ExtendParams extendparams.CommonExtendParams `json:"ExtendParams" yaml:"ExtendParams"` //扩展参数
}
AutoApiFieldDefined 单个autoApi字段的定义
func (*AutoApiFieldDefined) CreateSql ¶
func (f *AutoApiFieldDefined) CreateSql() string
func (*AutoApiFieldDefined) Type ¶
func (f *AutoApiFieldDefined) Type() types.BasicKind
type GinHandleParam ¶
type PluginData ¶
type PluginData struct {
Api AutoApiDefined //当前api信息
Action AutoApiActionDefined //当前action信息
Plugin AutoApiActionPluginDefined //当前plugin信息
}
PluginData 插件使用的参数合集
Click to show internal directories.
Click to hide internal directories.