Documentation
¶
Index ¶
- type Host
- func (host *Host) AllList() []Host
- func (host *Host) Delete(hostId int)
- func (host *Host) Detail(hostId int) *Host
- func (host *Host) IsExistsHost(hostId int) int64
- func (host *Host) IsExistsHostAlias(hostAlias string) int64
- func (host *Host) IsExistsHostName(hostName string) int64
- func (host *Host) List(page int, pageSize int, hostName string) ([]Host, int64)
- func (host *Host) Save()
- func (host *Host) Update(hostId int, fieldMap map[string]interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct { HostId int `json:"hostId" gorm:"primary_key; auto_increment; not null"` HostAlias string `json:"hostAlias" gorm:"type:varchar(100); DEFAULT ''"` HostName string `json:"hostName" gorm:"type:varchar(100); not null"` HostPort int `json:"hostPort" gorm:"type:int(20); DEFAULT 5921; not null"` Remark string `json:"remark" gorm:"type:varchar(200); not null"` CreateTime string `json:"createTime" gorm:"type:varchar(50); not null"` UpdateTime string `json:"updateTime" gorm:"type:varchar(50); DEFAULT ''"` }
用户model
func (*Host) IsExistsHostAlias ¶
主机别名是否存在
Click to show internal directories.
Click to hide internal directories.