Documentation
¶
Index ¶
- Variables
- type IgnoreUrl
- type IgnoreUrlBase
- func (IgnoreUrlBase) BaseColumnNames() string
- func (IgnoreUrlBase) BaseEntity() dbinfo.Entity
- func (IgnoreUrlBase) GetDataInfo(name string) *dbinfo.DataInfo
- func (IgnoreUrlBase) New() dbinfo.Entity
- func (IgnoreUrlBase) OwnerName() string
- func (IgnoreUrlBase) OwnerTable() string
- func (IgnoreUrlBase) TableName() string
- type IgnoreUrlController
- func (control IgnoreUrlController) Add(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) CheckIgnoreUrl(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) CheckRepeatAlone() map[string]int
- func (control IgnoreUrlController) ClearCache(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) Del(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) Edit(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) FindAll(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) FindByDate(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) FindById(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) FindByKey(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) FindByPage(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) FindByRow(ctx ginutil.Context) interface{}
- func (control IgnoreUrlController) RegisterUrl()
- type IgnoreUrlService
- type SimpleIgonoreURL
Constants ¶
This section is empty.
Variables ¶
var IgnoreUrl_tableName = ""
Functions ¶
This section is empty.
Types ¶
type IgnoreUrl ¶
type IgnoreUrl struct {
IgnoreUrlBase
MustLoginText string `json:"mustLoginText" gorm:"<-:false;column:mustLoginText" defaultData:"1" comment:"必须登录(布尔值,1:是;2:否)"`
}
*
- 拦截器忽略路径'IgnoreUrl'表结构体
- 警告:非数据库字段禁止在此添加,应该创建扩展结构体中添加
- @author HuangXinBian
type IgnoreUrlBase ¶
type IgnoreUrlBase struct {
Id string `json:"id" gorm:"column:id; type:varchar; NOT NULL; primary_key" defaultData:"''" comment:"记录编号"`
UrlName string `json:"urlName" gorm:"column:url_name; type:varchar; NOT NULL" defaultData:"''" comment:"路径名称类别"`
IgnoreUrl string `json:"ignoreUrl" gorm:"column:ignore_url; type:varchar; NOT NULL" defaultData:"''" comment:"路径集合"`
MustLogin int `` /* 136-byte string literal not displayed */
OnlyUserType string `json:"onlyUserType" gorm:"column:only_user_type; type:varchar" defaultData:"''" comment:"限用户类型(分号分隔)"`
Memo string `json:"memo" gorm:"column:memo; type:varchar" defaultData:"''" comment:"备注"`
Creator string `json:"creator" gorm:"column:creator; type:varchar; NOT NULL; DEFAULT '00000000'" defaultData:"'00000000'" comment:"创建者"`
CreateDate time.Time `` /* 127-byte string literal not displayed */
Modifieder string `` /* 131-byte string literal not displayed */
ModifiedDate time.Time `` /* 131-byte string literal not displayed */
State int `json:"state" gorm:"column:state; type:int; NOT NULL; DEFAULT '1'" defaultData:"1" comment:"版本"`
Rank int `json:"rank" gorm:"column:rank; type:int; NOT NULL; DEFAULT '1'" defaultData:"1" comment:"序号"`
Edition int `json:"edition" gorm:"column:edition; type:int; NOT NULL; DEFAULT '1'" defaultData:"1" comment:"版本号"`
}
*
- 拦截器忽略路径'ignore_url'表结构体
- 警告:非数据库字段禁止在此添加,应该创建扩展结构体中添加
- @author HuangXinBian
func (IgnoreUrlBase) BaseColumnNames ¶
func (IgnoreUrlBase) BaseColumnNames() string
*
- 结构体的属性名串(首字母小写)
- @return
func (IgnoreUrlBase) BaseEntity ¶
func (IgnoreUrlBase) BaseEntity() dbinfo.Entity
*
- 取基础实体,用于在子类(嵌套结构体)时同样获得基类
func (IgnoreUrlBase) GetDataInfo ¶
func (IgnoreUrlBase) GetDataInfo(name string) *dbinfo.DataInfo
*
- 取数据结构信息
- @param name 字段名
- @return
func (IgnoreUrlBase) OwnerName ¶
func (IgnoreUrlBase) OwnerName() string
*
- 结构体映射全局库名,需要对应数据库全局变量才能获得真正的库名
- @return
func (IgnoreUrlBase) TableName ¶
func (IgnoreUrlBase) TableName() string
*
- 结构体映射表名,处理结构体名称与表名不一致的情况
- @return
type IgnoreUrlController ¶
type IgnoreUrlController struct {
app.ControllerBaseFunc
ModuleEntity IgnoreUrl
ModuleService IgnoreUrlService
}
@Controller 拦截器忽略路径控制器
func (IgnoreUrlController) Add ¶
func (control IgnoreUrlController) Add(ctx ginutil.Context) interface{}
#region @Api {title=新增} @param {name=data dataType=json paramType=body explain=IgnoreUrl结构数据 explainType=IgnoreUrl required=true} @return {type=json explainType=MsgEntity<IgnoreUrl> explain=返回对象} @RequestMapping {name=Add type=POST value=/ignore/url/add} #endregion
func (IgnoreUrlController) CheckIgnoreUrl ¶
func (control IgnoreUrlController) CheckIgnoreUrl(ctx ginutil.Context) interface{}
#region @Api {title=验证指定url是否在可忽略的访问路径中(给内部拦截器用,直接返回Boolean)} @param {name=url dataType=string paramType=query explain=待检验的url required=true} @param {name=userType dataType=string paramType=query explain=待检验的用户类型 required=false} @param {name=mustLogin dataType=int paramType=query explain=是否必须登录,1:是;2:否 required=false} @return {type=bool explain=返回是否在可忽略的访问路径中} @RequestMapping {name=FindByPage type=POST value=/ignore/url/check} #endregion
func (IgnoreUrlController) CheckRepeatAlone ¶
func (control IgnoreUrlController) CheckRepeatAlone() map[string]int
-- 检查待新增内容是否存在重复数据(单独字段重复即重复)集合 --//
func (IgnoreUrlController) ClearCache ¶
func (control IgnoreUrlController) ClearCache(ctx ginutil.Context) interface{}
#region @Api {title=清理缓存 explain=直接操作数据库的情况下需要手工更新缓存} @return {type=MsgEntity explain=返回分页数据} @RequestMapping {name=FindByPage type=POST value=/ignore/url/clear/cache} #endregion
func (IgnoreUrlController) Del ¶
func (control IgnoreUrlController) Del(ctx ginutil.Context) interface{}
#region @Api {title=删除数据} @param {name=id dataType=string paramType=query explain=记录编号 required=true} @param {name=edition dataType=int paramType=query explain=版本号 required=true} @return {type=json explainType=MsgEntity<int> explain=返回影响数} @RequestMapping {name=Del type=POST value=/ignore/url/del} #endregion
func (IgnoreUrlController) Edit ¶
func (control IgnoreUrlController) Edit(ctx ginutil.Context) interface{}
#region @Api {title=修改数据} @param {name=data dataType=json paramType=body explain=IgnoreUrl结构数据 explainType=IgnoreUrl required=true} @return {type=json explainType=MsgEntity<int> explain=返回码值} @RequestMapping {name=Edit type=POST value=/ignore/url/edit} #endregion
func (IgnoreUrlController) FindAll ¶
func (control IgnoreUrlController) FindAll(ctx ginutil.Context) interface{}
#region @Api {title=查询全部} @param {name=data dataType=json paramType=body explain=map[string]interface结构数据 explainType=IgnoreUrl required=true} @return {type=json explainType=MsgEntity<IgnoreUrl> explain=返回数组[]map[string]interface} @RequestMapping {name=FindAll type=POST value=/ignore/url/find/all} #endregion
func (IgnoreUrlController) FindByDate ¶
func (control IgnoreUrlController) FindByDate(ctx ginutil.Context) interface{}
#region @Api {title=查询指定时间内数据} @param {name=dateSt dataType=string paramType=query explain=格式:YYYY-MM-DD HH:mm:ss required=true} @param {name=dateEd dataType=string paramType=query explain=格式:YYYY-MM-DD HH:mm:ss required=true} @return {type=json explainType=MsgEntity<IgnoreUrl> explain=返回数组[]map[string]interface} @RequestMapping {name=FindByDate type=POST value=/ignore/url/find/date} #endregion
func (IgnoreUrlController) FindById ¶
func (control IgnoreUrlController) FindById(ctx ginutil.Context) interface{}
#region @Api {title=根据记录编号取对象} @param {name=id dataType=string paramType=query explain=记录编号 required=true} @return {type=json explainType=MsgEntity<IgnoreUrl> explain=返回对象} @RequestMapping {name=FindById type=POST value=/ignore/url/find/id} #endregion
func (IgnoreUrlController) FindByKey ¶
func (control IgnoreUrlController) FindByKey(ctx ginutil.Context) interface{}
#region @Api {title=根据关键值取对象集合} @param {name=data dataType=json paramType=body explain=IgnoreUrl结构数据 explainType=IgnoreUrl required=true} @return {type=json explainType=MsgEntity<IgnoreUrl> explain=返回数组[]map[string]interface} @RequestMapping {name=FindByKey type=POST value=/ignore/url/find/key} #endregion
func (IgnoreUrlController) FindByPage ¶
func (control IgnoreUrlController) FindByPage(ctx ginutil.Context) interface{}
#region @Api {title=查询分页数据} @param {name=data dataType=json paramType=body explain=FindByPageParam结构数据 explainType=FindByPageParam<IgnoreUrl> required=true} @return {type=json explainType=MsgEntity<Page<IgnoreUrl>> explain=返回分页数据} @RequestMapping {name=FindByPage type=POST value=/ignore/url/find/page} #endregion
func (IgnoreUrlController) FindByRow ¶
func (control IgnoreUrlController) FindByRow(ctx ginutil.Context) interface{}
#region @Api {title=根据记录编号查询符合分页数据的某条记录} @param {name=id dataType=string paramType=query explain=记录编号 required=true} @return {type=json explainType=MsgEntity<IgnoreUrl> explain=返回数组[]map[string]interface} @RequestMapping {name=FindByRow type=POST value=/ignore/url/find/page/row} #endregion
type IgnoreUrlService ¶
type IgnoreUrlService struct {
app.ServiceBaseFunc
}
*
- 拦截器忽略路径IgnoreUrl表基本业务操作结构体
func (IgnoreUrlService) CheckIgnoreUrl ¶
func (iu IgnoreUrlService) CheckIgnoreUrl(url string, mustLogin bool, userType string) *msgentity.MsgEntity
*
- 验证指定url是否在可忽略的访问路径中(给内部拦截器用,直接返回Boolean)
- @param url 待检验的url
- @param mustLogin 是否必须登录
- @param userType 待检验的用户类型
- @return
func (IgnoreUrlService) ClearCache ¶
func (iu IgnoreUrlService) ClearCache(ctx ginutil.Context, cacheName, user string) *msgentity.MsgEntity
*
- 清理缓存
- @param ctx
- @param cacheName
- @param user
- @return
type SimpleIgonoreURL ¶
type SimpleIgonoreURL struct {
IgnoreUrl string `json:"ignoreUrl"`
MustLogin int64 `json:"mustLogin"`
OnlyUserType string `json:"onlyUserType"`
}
*
- 简版'忽略路径'结构体