hostModel

package
v0.0.0-...-fdfd418 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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) AllList

func (host *Host) AllList() []Host

func (*Host) Delete

func (host *Host) Delete(hostId int)

删除

func (*Host) Detail

func (host *Host) Detail(hostId int) *Host

func (*Host) IsExistsHost

func (host *Host) IsExistsHost(hostId int) int64

主机是否存在

func (*Host) IsExistsHostAlias

func (host *Host) IsExistsHostAlias(hostAlias string) int64

主机别名是否存在

func (*Host) IsExistsHostName

func (host *Host) IsExistsHostName(hostName string) int64

主机名是否存在

func (*Host) List

func (host *Host) List(page int, pageSize int, hostName string) ([]Host, int64)

func (*Host) Save

func (host *Host) Save()

新增

func (*Host) Update

func (host *Host) Update(hostId int, fieldMap map[string]interface{})

修改

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL