Documentation
¶
Index ¶
- Variables
- type CwmpConfig
- type CwmpConfigSession
- type CwmpEventData
- type CwmpFactoryReset
- type CwmpFirmwareConfig
- type CwmpPreset
- type CwmpPresetContent
- type CwmpPresetDownload
- type CwmpPresetFactoryResetConfig
- type CwmpPresetFirmwareConfig
- type CwmpPresetParameterValue
- type CwmpPresetSched
- type CwmpPresetTask
- type CwmpPresetUpload
- type NetCpe
- type NetCpeParam
- type NetCpeTaskQue
- type NetNode
- type NetVpe
- type RadiusAccounting
- type RadiusOnline
- type RadiusProfile
- type RadiusUser
- type SysApiToken
- type SysConfig
- type SysOpr
- type SysOprLog
Constants ¶
This section is empty.
Variables ¶
View Source
var Tables = []interface{}{ &SysConfig{}, &SysOpr{}, &SysOprLog{}, &SysApiToken{}, &NetNode{}, &NetCpe{}, &NetVpe{}, &NetCpeParam{}, &RadiusAccounting{}, &RadiusOnline{}, &RadiusProfile{}, &RadiusUser{}, &CwmpConfigSession{}, &CwmpConfig{}, &CwmpFactoryReset{}, &CwmpFirmwareConfig{}, &CwmpPreset{}, &CwmpPresetTask{}, }
Functions ¶
This section is empty.
Types ¶
type CwmpConfig ¶
type CwmpConfig struct {
ID string `gorm:"primaryKey" json:"id" form:"id"` // 主键 ID
Oid string `gorm:"index" json:"oid" form:"oid"`
Name string `json:"name" form:"name"` // Name
Level string `json:"level" form:"level"` // script level normal|major
SoftwareVersion string `json:"software_version" form:"software_version"`
ProductClass string `json:"product_class" form:"product_class"`
Oui string `json:"oui" form:"oui"`
TaskTags string `gorm:"index" json:"task_tags" form:"task_tags"` // task label
Content string `json:"content" form:"content"` // script content
TargetFilename string `json:"target_filename" form:"target_filename"`
Timeout int64 `json:"timeout" form:"timeout"` // Execution Timeout Seconds
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type CwmpConfigSession ¶
type CwmpConfigSession struct {
ID int64 `gorm:"primaryKey" json:"id,string" form:"id"` // primary key ID
ConfigId string `gorm:"index" json:"config_id,string" form:"config_id"` // Script ID
CpeId int64 `gorm:"index" json:"cpe_id,string" form:"cpe_id"` // CPE ID
Session string `gorm:"index" json:"session" form:"session"` // Session ID
Name string `json:"name" form:"name"` // Name
Level string `json:"level" form:"level"` // script level normal|major
SoftwareVersion string `json:"software_version" form:"software_version"`
ProductClass string `json:"product_class" form:"product_class"`
Oui string `json:"oui" form:"oui"`
TaskTags string `gorm:"index" json:"task_tags" form:"task_tags"` // task label
Content string `json:"content" form:"content"` // script content
ExecStatus string `gorm:"index" json:"exec_status" form:"exec_status"` // execution state success | failure
LastError string `json:"last_error" form:"last_error"` // last execution error
Timeout int64 `json:"timeout" form:"timeout"` // execution timeout second
ExecTime time.Time `gorm:"index" json:"exec_time" form:"exec_time"` // execution time
RespTime time.Time `json:"resp_time" form:"resp_time"` // Response time
CreatedAt time.Time `gorm:"index" json:"created_at"`
UpdatedAt time.Time `gorm:"index" json:"updated_at"`
}
type CwmpEventData ¶
type CwmpFactoryReset ¶
type CwmpFactoryReset struct {
ID int64 `json:"id,string" form:"id"` // 主键 ID
Oid string `json:"oid" form:"oid"`
Name string `json:"name" form:"name"`
SoftwareVersion string `json:"software_version" form:"software_version"`
ProductClass string `json:"product_class" form:"product_class"`
Oui string `json:"oui" form:"oui"`
Content string `json:"content" form:"content"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
CwmpFactoryReset factory settings script
type CwmpFirmwareConfig ¶
type CwmpFirmwareConfig struct {
ID int64 `json:"id,string" form:"id"` // 主键 ID
Oid string `json:"oid" form:"oid"`
Name string `json:"name" form:"name"`
SoftwareVersion string `json:"software_version" form:"software_version"`
ProductClass string `json:"product_class" form:"product_class"`
Oui string `json:"oui" form:"oui"`
Content string `json:"content" form:"content"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
CwmpFirmwareConfig firmware configuration
type CwmpPreset ¶
type CwmpPreset struct {
ID int64 `json:"id,string" form:"id"` // 主键 ID
Name string `json:"name" form:"name"`
Priority int `json:"priority" form:"priority"`
Event string `json:"event" form:"event"`
SchedPolicy string `json:"sched_policy" form:"sched_policy"`
SchedKey string `json:"sched_key" form:"sched_key"`
Interval int `json:"interval" form:"interval"`
Content string `json:"content" form:"content"`
TaskTags string `gorm:"index" json:"task_tags" form:"task_tags"` // 任务标签
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type CwmpPresetContent ¶
type CwmpPresetContent struct {
FactoryResetConfig *CwmpPresetFactoryResetConfig `yaml:"FactoryResetConfig"`
FirmwareConfig *CwmpPresetFirmwareConfig `yaml:"FirmwareConfig"`
Downloads []CwmpPresetDownload `yaml:"Downloads"`
Uploads []CwmpPresetUpload `yaml:"Uploads"`
GetParameterValues []string `yaml:"GetParameterValues"`
SetParameterValues []CwmpPresetParameterValue `yaml:"SetParameterValues"`
}
type CwmpPresetDownload ¶
type CwmpPresetSched ¶
type CwmpPresetSched struct {
Downloads []CwmpPresetDownload `yaml:"Downloads"`
Uploads []CwmpPresetUpload `yaml:"Uploads"`
GetParameterValues []string `yaml:"GetParameterValues"`
SetParameterValues []CwmpPresetParameterValue `yaml:"SetParameterValues"`
}
type CwmpPresetTask ¶
type CwmpPresetTask struct {
ID int64 `json:"id,string"` // 主键 ID
PresetId int64 `json:"preset_id,string" gorm:"index"`
Sn string `json:"sn" gorm:"index"`
Name string `json:"name" `
Oid string `json:"oid" gorm:"index"`
Event string `json:"event" `
Batch string `json:"batch" `
Onfail string `json:"onfail" `
Session string `json:"session" gorm:"index"`
Request string `json:"request" `
Response string `json:"response"`
Content string `json:"content"`
Status string `json:"status" gorm:"index"`
ExecTime time.Time `json:"exec_time"` // 执行时间
RespTime time.Time `json:"resp_time"` // 响应时间
CreatedAt time.Time `json:"created_at" gorm:"index"`
UpdatedAt time.Time `json:"updated_at"`
}
func (*CwmpPresetTask) MarshalJSON ¶
func (d *CwmpPresetTask) MarshalJSON() ([]byte, error)
func (*CwmpPresetTask) UnmarshalJSON ¶
func (d *CwmpPresetTask) UnmarshalJSON(b []byte) error
type CwmpPresetUpload ¶
type NetCpe ¶
type NetCpe struct {
ID int64 `json:"id,string" form:"id"` // 主键 ID
NodeId int64 `json:"node_id,string" form:"node_id"` // 节点ID
SystemName string `json:"system_name" form:"system_name"` // 设备系统名称
CpeType string `json:"cpe_type" form:"cpe_type"` // 设备类型
Sn string `gorm:"uniqueIndex" json:"sn" form:"sn"` // 设备序列号
Name string `json:"name" form:"name"` // 设备名称
ArchName string `json:"arch_name" form:"arch_name"` // 设备架构
SoftwareVersion string `json:"software_version" form:"software_version"` // 设备固件版本
HardwareVersion string `json:"hardware_version" form:"hardware_version"` // 设备版本
Model string `json:"model" form:"model"` // 设备型号
VendorCode string `json:"vendor_code" form:"vendor_code"` // 设备厂商代码
Oui string `json:"oui" form:"oui"` // 设备OUI
Manufacturer string `json:"manufacturer" form:"manufacturer"` // 设备制造商
ProductClass string `json:"product_class" form:"product_class"` // 设备类型
Status string `gorm:"index" json:"status" form:"status"` // 设备状态
Tags string `json:"tags" form:"tags"` // 标签
TaskTags string `gorm:"index" json:"task_tags" form:"task_tags"` // 任务标签
Remark string `json:"remark" form:"remark"` // 备注
Uptime int64 `json:"uptime" form:"uptime"` // UpTime
MemoryTotal int64 `json:"memory_total" form:"memory_total"` // 内存总量
MemoryFree int64 `json:"memory_free" form:"memory_free"` // 内存可用
CPUUsage int64 `json:"cpu_usage" form:"cpu_usage"` // CPE 百分比
CwmpStatus string `gorm:"index" json:"cwmp_status"` // cwmp 状态
CwmpUrl string `json:"cwmp_url"`
FactoryresetId string `json:"factoryreset_id" form:"factoryreset_id"`
CwmpLastInform time.Time `json:"cwmp_last_inform" ` // CWMP 最后检测时间
CreatedAt time.Time `json:"created_at" `
UpdatedAt time.Time `json:"updated_at"`
}
NetCpe Cpe 数据模型
func (NetCpe) MarshalJSON ¶
type NetCpeParam ¶
type NetCpeParam struct {
ID string `gorm:"primaryKey" json:"string"` // 主键 ID
Sn string `gorm:"index" json:"sn"` // 设备序列号
Tag string `gorm:"index" json:"tag" `
Name string `gorm:"index" json:"name" `
Value string `json:"value" `
Remark string `json:"remark"`
Writable string `json:"writable"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
NetCpeParam CPE 参数
type NetCpeTaskQue ¶
type NetNode ¶
type NetNode struct {
ID int64 `json:"id,string" form:"id"`
Name string `json:"name" form:"name"`
Remark string `json:"remark" form:"remark"`
Tags string `json:"tags" form:"tags"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
NetNode network node
type NetVpe ¶
type NetVpe struct {
ID int64 `json:"id,string" form:"id"` // 主键 ID
NodeId int64 `json:"node_id,string" form:"node_id"` // 节点ID
Name string `json:"name" form:"name"` // 设备名称
Identifier string `json:"identifier" form:"identifier"` // 设备标识-RADIUS
Hostname string `json:"hostname" form:"hostname"` // 设备主机地址
Ipaddr string `json:"ipaddr" form:"ipaddr"` // 设备IP
Secret string `json:"secret" form:"secret"` // 设备 RADIUS 秘钥
CoaPort int `json:"coa_port" form:"coa_port"` // 设备 RADIUS COA 端口
Model string `json:"model" form:"model"` // 设备型号
VendorCode string `json:"vendor_code" form:"vendor_code"` // 设备厂商代码
Status string `json:"status" form:"status"` // 设备状态
Tags string `json:"tags" form:"tags"` // 标签
Remark string `json:"remark" form:"remark"` // 备注
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
NetVpe VPE data model, VPE is usually a gateway-type device that can act as a BRAS device
type RadiusAccounting ¶
type RadiusAccounting struct {
ID int64 `json:"id,string"` // 主键 ID
Username string `gorm:"index" json:"username"`
AcctSessionId string `gorm:"index" json:"acct_session_id"`
NasId string `json:"nas_id"`
NasAddr string `json:"nas_addr"`
NasPaddr string `json:"nas_paddr"`
SessionTimeout int `json:"session_timeout"`
FramedIpaddr string `json:"framed_ipaddr"`
FramedNetmask string `json:"framed_netmask"`
FramedIpv6Prefix string `json:"framed_ipv6_prefix"`
FramedIpv6Address string `json:"framed_ipv6_address"`
DelegatedIpv6Prefix string `json:"delegated_ipv6_prefix"`
MacAddr string `json:"mac_addr"`
NasPort int64 `json:"nas_port,string"`
NasClass string `json:"nas_class"`
NasPortId string `json:"nas_port_id"`
NasPortType int `json:"nas_port_type"`
ServiceType int `json:"service_type"`
AcctSessionTime int `json:"acct_session_time"`
AcctInputTotal int64 `json:"acct_input_total,string"`
AcctOutputTotal int64 `json:"acct_output_total,string"`
AcctInputPackets int `json:"acct_input_packets"`
AcctOutputPackets int `json:"acct_output_packets"`
LastUpdate time.Time `json:"last_update"`
AcctStartTime time.Time `gorm:"index" json:"acct_start_time"`
AcctStopTime time.Time `gorm:"index" json:"acct_stop_time"`
}
RadiusAccounting Radius Accounting Recode
type RadiusOnline ¶
type RadiusOnline struct {
ID int64 `json:"id,string"` // 主键 ID
Username string `gorm:"index" json:"username"`
NasId string `json:"nas_id"`
NasAddr string `json:"nas_addr"`
NasPaddr string `json:"nas_paddr"`
SessionTimeout int `json:"session_timeout"`
FramedIpaddr string `json:"framed_ipaddr"`
FramedNetmask string `json:"framed_netmask"`
FramedIpv6Prefix string `json:"framed_ipv6_prefix"`
FramedIpv6Address string `json:"framed_ipv6_address"`
DelegatedIpv6Prefix string `json:"delegated_ipv6_prefix"`
MacAddr string `json:"mac_addr"`
NasPort int64 `json:"nas_port,string"`
NasClass string `json:"nas_class"`
NasPortId string `json:"nas_port_id"`
NasPortType int `json:"nas_port_type"`
ServiceType int `json:"service_type"`
AcctSessionId string `gorm:"index" json:"acct_session_id"`
AcctSessionTime int `json:"acct_session_time"`
AcctInputTotal int64 `json:"acct_input_total,string"`
AcctOutputTotal int64 `json:"acct_output_total,string"`
AcctInputPackets int `json:"acct_input_packets"`
AcctOutputPackets int `json:"acct_output_packets"`
AcctStartTime time.Time `gorm:"index" json:"acct_start_time"`
LastUpdate time.Time `json:"last_update"`
}
RadiusOnline Radius RadiusOnline Recode
type RadiusProfile ¶
type RadiusProfile struct {
ID int64 `json:"id,string" form:"id"` // 主键 ID
NodeId int64 `json:"node_id,string" form:"node_id"` // 节点ID
Name string `json:"name" form:"name"` // 策略名称
Status string `gorm:"index" json:"status" form:"status"` // 策略状态 0:禁用 1:正常
AddrPool string `json:"addr_pool" form:"addr_pool"` // 策略地址池
ActiveNum int `json:"active_num" form:"active_num"` // 并发数
UpRate int `json:"up_rate" form:"up_rate"` // 上行速率
DownRate int `json:"down_rate" form:"down_rate"` // 下行速率
Remark string `json:"remark" form:"remark"` // 备注
CreatedAt time.Time `json:"created_at" form:"created_at"`
UpdatedAt time.Time `json:"updated_at" form:"updated_at"`
}
RadiusProfile RADIUS 策略
type RadiusUser ¶
type RadiusUser struct {
ID int64 `json:"id,string" form:"id"` // 主键 ID
NodeId int64 `json:"node_id,string" form:"node_id"` // 节点ID
ProfileId int64 `gorm:"index" json:"profile_id,string" form:"profile_id"` // RADIUS 策略ID
Realname string `json:"realname" form:"realname"` // 联系人姓名
Mobile string `json:"mobile" form:"mobile"` // 联系人电话
Username string `json:"username" gorm:"uniqueIndex" form:"username"` // 账号名
Password string `json:"password" form:"password"` // 密码
AddrPool string `json:"addr_pool" form:"addr_pool"` // 策略地址池
ActiveNum int `gorm:"index" json:"active_num" form:"active_num"` // 并发数
UpRate int `json:"up_rate" form:"up_rate"` // 上行速率
DownRate int `json:"down_rate" form:"down_rate"` // 下行速率
Vlanid1 int `json:"vlanid1" form:"vlanid1"` // VLAN ID 1
Vlanid2 int `json:"vlanid2" form:"vlanid2"` // VLAN ID 2
IpAddr string `json:"ip_addr" form:"ip_addr"` // 静态IP
MacAddr string `json:"mac_addr" form:"mac_addr"` // MAC
BindVlan int `json:"bind_vlan" form:"bind_vlan"` // 绑定VLAN
BindMac int `json:"bind_mac" form:"bind_mac"` // 绑定MAC
ExpireTime time.Time `gorm:"index" json:"expire_time"` // 过期时间
Status string `gorm:"index" json:"status" form:"status"` // 状态 enabled | disabled
Remark string `json:"remark" form:"remark"` // 备注
OnlineCount int `json:"online_count" gorm:"-:migration;<-:false"`
LastOnline time.Time `json:"last_online"`
CreatedAt time.Time `gorm:"index" json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
RadiusUser RADIUS Authentication account
func (*RadiusUser) MarshalJSON ¶
func (d *RadiusUser) MarshalJSON() ([]byte, error)
func (*RadiusUser) UnmarshalJSON ¶
func (d *RadiusUser) UnmarshalJSON(b []byte) error
type SysApiToken ¶
type SysApiToken struct {
ID string `json:"string"`
Uid string `json:"uid"`
Name string `json:"name"`
Level string `json:"level"`
Token string `json:"token"`
Remark string `json:"remark"`
ExpireTime time.Time `json:"expire_time"`
CreatedAt time.Time `json:"created_at"`
}
SysApiToken API 令牌
type SysConfig ¶
type SysConfig struct {
ID int64 `json:"id,string" form:"id"`
Sort int `json:"sort" form:"sort"`
Type string `gorm:"index" json:"type" form:"type"`
Name string `gorm:"index" json:"name" form:"name"`
Value string `json:"value" form:"value"`
Remark string `json:"remark" form:"remark"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type SysOpr ¶
type SysOpr struct {
ID int64 `json:"id,string" form:"id"`
Realname string `json:"realname" form:"realname"`
Mobile string `json:"mobile" form:"mobile"`
Email string `json:"email" form:"email"`
Username string `json:"username" form:"username"`
Password string `json:"password" form:"password"`
Level string `json:"level" form:"level"`
Status string `json:"status" form:"status"`
Remark string `json:"remark" form:"remark"`
LastLogin time.Time `json:"last_login" form:"last_login"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Click to show internal directories.
Click to hide internal directories.