Documentation ¶
Index ¶
- Variables
- func DeleteHost(id int) error
- func DeleteHostRole(id int) error
- func DeleteHostType(id int) error
- func InitDB(config config.Config) *gorm.DB
- func InsertHistory(history History) error
- func InsertHost(hostInfo HostInfo) error
- func InsertHostRole(hostRole HostRole) error
- func InsertHostType(hostType HostType) error
- func IsExistHost(id int) bool
- func IsExistHostRole(id int) bool
- func IsExistHostType(id int) bool
- func UpdateHost(hostInfo HostInfo) error
- func UpdateSetting(setting Setting) error
- type History
- type HostInfo
- type HostRole
- type HostType
- type Setting
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
func DeleteHost ¶
func DeleteHostRole ¶
func DeleteHostType ¶
func InsertHistory ¶
func InsertHost ¶
func InsertHostRole ¶
func InsertHostType ¶
func IsExistHost ¶
func IsExistHostRole ¶
func IsExistHostType ¶
func UpdateHost ¶
func UpdateSetting ¶
Types ¶
type History ¶
type History struct { gorm.Model HostInfoID uint `json:"host"` HostInfo HostInfo IsUP bool `json:"is_up"` }
History はHostの死活ステータスの履歴を持つ
func GetHistories ¶
type HostInfo ¶
type HostInfo struct { gorm.Model Active bool `json:"active" gorm:"DEFAULT:false"` HostName string `json:"hostname"` IPAddress string `json:"ipaddress"` OS string `json:"os"` Core int `json:"core"` RAM int `json:"ram"` Disk int `json:"disk"` HostTypeID uint `json:"type"` HostType HostType HostRoleID uint `json:"role"` HostRole HostRole Online bool `json:"online" gorm:"DEFAULT:false"` OnlineAt time.Time `json:"online_at"` Note string `json:"note"` }
HostInfo はホストの基本的な情報を持つ
func GetHostById ¶
Click to show internal directories.
Click to hide internal directories.