Documentation ¶
Index ¶
- type Component
- func (this *Component) Config() bird.ConfigInterface
- func (this *Component) LogDomain() *logDomain
- func (this *Component) Login(username, password string) bool
- func (this *Component) Models() []bird.ModelInterface
- func (this *Component) NewLog() *logModel
- func (this *Component) NewQueue() *queueModel
- func (this *Component) QueueDomain() *queueDomain
- type Config
- type LogFindParams
- type LogModel
- type QueueModel
- type SessionConfig
- type SignConfig
- type VisitConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
func (*Component) Config ¶
func (this *Component) Config() bird.ConfigInterface
func (*Component) Models ¶
func (this *Component) Models() []bird.ModelInterface
type Config ¶
type Config struct { CrossOpen bool `name:"是否允许跨域访问"` Route string `name:"管理路由" desc:"重启后生效"` UseDashboard bool `name:"是否启用管理面板" desc:"默认启用"` Username string `name:"管理账号" desc:"登录账号为字母数字组合" valid:"account:登录账号为字母数字组合"` Password string `` /* 185-byte string literal not displayed */ LogLevel int `name:"日志保存等级" mode:"single" options:"1:调试 2:记录 3:警告 4:致命" desc:"超过该等级才保存日志"` LogSaveDays int `name:"日志保存天数" desc:"超过后将自动清理" valid:"lte=30,gte=1:日志可保存时间为1-30天"` SignConfig SignConfig `name:"签名认证" desc:"采用Sha256加密,判断Sha256(token,secret)==sign,重启后生效"` VisitConfig VisitConfig `name:"访问限制" desc:"重启生效"` SessionConfig SessionConfig `name:"session配置" desc:"重启生效"` WhiteIP []string `name:"控制台访问IP白名单" desc:"重启生效"` }
type LogFindParams ¶
type LogFindParams struct { Msg string // BirdId int64 //鸟 BeginTime string //开始时间 OverTime string //结束时间 BirdClass int //鸟类型 BirdName string //鸟名 Level string //等级 Handler string //操作者 IP string //操作ip }
日志查询参数
type LogModel ¶
type LogModel struct { Id int64 BirdId int64 `xorm:"bigint(20)"` //保证是一个请求发起的 ModuleName string `xorm:"varchar(32) index"` //模块名称 BirdClass int `xorm:"tinyint(4) index"` //鸟类 BirdName string `xorm:"varchar(255) index"` //鸟名 Msg string `xorm:"varchar(255) index"` //日志消息 Level int `xorm:"tinyint(4) index"` //日志等级 Handler string `xorm:"varchar(32) index"` //操作人 Stack string `xorm:"text"` //日志堆栈 IP string `xorm:"varchar(32) index"` //操作ip Data string `xorm:"text"` //日志数据 CreatedAt time.Time `xorm:"created datetime"` }
日志结构
type QueueModel ¶
type QueueModel struct { Id int64 QueueAlias string `xorm:"varchar(64)"` //队列别名 Arg string `xorm:"text"` //参数 Err string `xorm:"text"` //错误数据 CreatedAt time.Time `xorm:"created datetime"` UpdatedAt time.Time `xorm:"updated datetime"` Version int `xorm:"version"` }
队列数据库模型
type SessionConfig ¶
type SignConfig ¶
type SignConfig struct { Open bool `name:"是否启用" desc:"默认不启用"` SignName string `name:"签名Head头key值" desc:"默认Sign,长度为80字符"` SignSecret string `name:"-" desc:""` }
签名中间件配置
type VisitConfig ¶
type VisitConfig struct { MaxConnect int `name:"最大访问量" desc:"小于1则不限制,默认0"` RepeatCheckTime int64 `name:"重复提交检测时间" desc:"单位:秒,小于1则不限制,默认0"` }
访问配置
Click to show internal directories.
Click to hide internal directories.