Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeApply = int8(iota) TypeReview ReviewReject ReviewSuccess ReviewFailed )
type and explanation
Variables ¶
View Source
var ( TypeMap = map[int8]string{ TypeApply: "申请", TypeReview: "审核", ReviewReject: "驳回", ReviewSuccess: "通过", ReviewFailed: "失败", } )
TypeMap struct
Functions ¶
This section is empty.
Types ¶
type Apply ¶
type Apply struct { ID int `gorm:"column:id" json:"id"` Addr string `gorm:"column:addr" json:"addr"` Remark string `gorm:"column:remark" json:"remark"` Cluster string `gorm:"column:cluster" json:"project"` Leader string `gorm:"column:leader" json:"leader"` Comment string `gorm:"column:comment" json:"comment"` State int8 `gorm:"column:state" json:"status"` Operator string `gorm:"column:operator" json:"operator"` Ctime time.Time `gorm:"column:ctime" json:"ctime"` Mtime time.Time `gorm:"column:mtime" json:"mtime"` ConfID int `gorm:"column:conf_id" json:"conf_id"` }
Apply apply model
type Canal ¶
type Canal struct { ID int64 `gorm:"column:id" json:"id"` Addr string `gorm:"column:addr" json:"addr" form:"addr" validate:"required"` BinName string `gorm:"column:bin_name" json:"bin_name" form:"bin_name"` BinPos int32 `gorm:"column:bin_pos" json:"bin_pos" form:"bin_pos"` Remark string `gorm:"column:remark" json:"remark" form:"remark"` Leader string `gorm:"column:leader" json:"leader" form:"leader"` Cluster string `gorm:"column:cluster" json:"project" form:"project"` CTime xtime.Time `gorm:"column:ctime" json:"ctime"` MTime xtime.Time `gorm:"column:mtime" json:"mtime"` IsDelete int `gorm:"column:is_delete" json:"is_delete"` }
Canal canal
type Config ¶
type Config struct {
Instance *Instance `json:"instance" toml:"instance"`
}
Config struct
type ConfigReq ¶
type ConfigReq struct { Addr string `form:"addr" validate:"required"` User string `form:"user"` Password string `form:"password"` MonitorPeriod string `form:"monitor_period"` Databases string `form:"databases" validate:"required"` Project string `form:"project"` Leader string `form:"leader"` Mark string `form:"mark" validate:"required"` }
ConfigReq struct is
type DB ¶
type DB struct { Schema string `json:"schema" toml:"schema"` Table []*Table `json:"table" toml:"table"` Databus *Databus `json:"databus" toml:"databus"` Infoc *Infoc `json:"infoc" toml:"infoc"` }
DB struct
type Databus ¶
type Databus struct { Key string `json:"key" toml:"key"` Secret string `json:"secret" toml:"secret"` Group string `json:"group" toml:"group"` Topic string `json:"topic" toml:"topic"` Action string `json:"action" toml:"action"` Name string `json:"name" toml:"name"` Proto string `json:"proto" toml:"proto"` Addr string `json:"addr" toml:"addr"` Idle int `json:"idle" toml:"idle"` Active int `json:"active" toml:"active"` DialTimeout string `json:"dialTimeout" toml:"dialTimeout"` ReadTimeout string `json:"readTimeout" toml:"readTimeout"` WriteTimeout string `json:"writeTimeout" toml:"writeTimeout"` IdleTimeout string `json:"idleTimeout" toml:"idleTimeout"` }
Databus struct
type Document ¶
type Document struct { Instance struct { User string `json:"user" toml:"user"` Password string `json:"password" toml:"password"` MonitorPeriod string `json:"monitor_period" toml:"monitor_period"` ServerID int64 `json:"server_id" toml:"server_id"` Db []*struct { Schema string `json:"schema" toml:"schema"` Table []*struct { Name string `json:"name" toml:"name"` Primarykey []string `json:"primarykey,omitempty" toml:"primarykey"` Omitfield []string `json:"omitfield,omitempty" toml:"omitfield"` } `json:"table" toml:"table"` Databus *struct { Group string `json:"group" toml:"group"` Topic string `json:"topic" toml:"topic"` Action string `json:"action" toml:"action"` Name string `json:"name" toml:"name"` Proto string `json:"proto" toml:"proto"` Addr string `json:"addr" toml:"addr"` Idle int `json:"idle" toml:"idle"` Active int `json:"active" toml:"active"` DialTimeout string `json:"dialTimeout" toml:"dialTimeout"` ReadTimeout string `json:"readTimeout" toml:"readTimeout"` WriteTimeout string `json:"writeTimeout" toml:"writeTimeout"` IdleTimeout string `json:"idleTimeout" toml:"idleTimeout"` } `json:"databus" toml:"databus"` Infoc *struct { TaskID string `json:"taskID" toml:"taskID"` Proto string `json:"proto" toml:"proto"` Addr string `json:"addr" toml:"addr"` ReporterAddr string `json:"reporterAddr" toml:"reporterAddr"` } `json:"infoc" toml:"infoc"` } `json:"db"` } `json:"instance"` }
Document document
type EditReq ¶
type EditReq struct { ID int64 `form:"id" validate:"required"` BinName string `form:"bin_name"` BinPos int32 `form:"bin_pos"` Remark string `form:"remark"` Leader string `form:"leader"` Project string `form:"project"` }
EditReq canal edit req
type Infoc ¶
type Infoc struct { TaskID string `json:"taskID" toml:"taskID"` Proto string `json:"proto" toml:"proto"` Addr string `json:"addr" toml:"addr"` ReporterAddr string `json:"reporterAddr" toml:"reporterAddr"` }
Infoc struct
type Instance ¶
type Instance struct { Caddr string `json:"caddr" toml:"addr"` User string `json:"user" toml:"user"` Password string `json:"password" toml:"password"` MonitorPeriod string `json:"monitor_period" toml:"monitor_period,omitempty"` ServerID int64 `json:"server_id" toml:"server_id"` Flavor string `json:"flavor" toml:"flavor"` HeartbeatPeriod time.Duration `json:"heartbeat_period" toml:"heartbeat_period"` ReadTimeout time.Duration `json:"read_timeout" toml:"read_timeout"` DB []*DB `json:"db" toml:"db"` }
Instance struct
type ListReq ¶
type ListReq struct { Addr string `form:"addr"` Project string `form:"project"` Status int8 `form:"status"` Pn int `form:"pn" default:"1"` Ps int `form:"ps" default:"20"` }
ListReq canallist req
type Paper ¶
type Paper struct { Total int `json:"total"` Pn int `json:"pn"` Ps int `json:"ps"` Items interface{} `json:"items"` }
Paper canallist resp
type Results ¶
type Results struct { ID int64 `json:"id"` Addr string `json:"addr"` Cluster string `json:"project"` Leader string `json:"leader"` Document *Document `json:"document"` }
Results canalscan resp
Click to show internal directories.
Click to hide internal directories.