Documentation
¶
Index ¶
- func GetCurrentLevel() sql_interface.ModelPermissions
- func GetLevel(nick string, operationType int) sql_interface.ModelPermissions
- func GetMissingPrimaryKeyMessage() string
- func GetPostDataErrorMessage() string
- func GetQueryParameterErrorMessage() string
- type AccountManager
- type AccountModel
- type Field
- type Model
- type ModelConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountManager ¶
type AccountManager struct {
XMLName xml.Name //顶层的账号管理器名称
IncorrectPermissionsMessage string //权限不正确错误消息
AccountTableErrorMessage string //账号表配置错误消息
AccountModel AccountModel //账号模型
}
账号管理器
type AccountModel ¶
type AccountModel struct {
Id string //登录账号的唯一标识字段
Password string //登录账号的密码字段
ValidaterArray []model_validater.DataValidater //验证器数组
OperationArray []model_operation.DataOperator //数据操作器
}
账号模型
type Field ¶
type Field struct {
Name string //字段名
Type string //字段类型
IsPrimaryKey bool //是否是主键
Create string //创建类型
Flag int //user-id: 1, user-password: 2
TargetModel string //关联的目标模型
TargetField string //关联的目标字段
}
字段
type Model ¶
type Model struct {
Nick string //模型昵称
TableName string //表名
ReadPermissions sql_interface.ModelPermissions //模型读权限
WritePermissions sql_interface.ModelPermissions //模型写权限
FieldArray []Field //字段数组
ValidaterArray []model_validater.DataValidater //验证器数组
OperationArray []model_operation.DataOperator //数据操作器
PrimaryKey Field //主键字段
ChildrenField map[string]Field //子模型对应的字段
}
模型
Click to show internal directories.
Click to hide internal directories.