Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAddressNotInRange = errors.New("the provided ip address was not in allowed range")
View Source
var ErrInvalidHostNameOrIPAddress = errors.New("invalid Hostname, or IP address")
View Source
var ErrNotAValidHostname = errors.New("not a valid hostname")
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct {
ID uuid.UUID `json:"id,omitempty" gorm:"type:uuid;primary_key;"`
// Address represents the hostname or an IP address of the remote computer
Address string `json:"address" gorm:"not null;default:null"`
// Comma Separated List of allowed CIDRs, and hostnames
AddressListRange *string `json:"address_list_range" gorm:"not null;default:''"`
// The ID of a host group that the host belongs to.
HostGroupID *uuid.UUID `json:"host_group_id,omitempty" gorm:"type:uuid"`
// The ID of a team that this host belongs too.
TeamID uuid.UUID `json:"team_id,omitempty" gorm:"type:uuid;not null"`
// Hide is responsible for hiding the host on the scoring table
Hide *bool `json:"pause,omitempty" gorm:"not null;default:false"`
// Pause is responsible for pausing the host on scoring table
Pause *bool `json:"hide,omitempty" gorm:"not null;default:false"`
// Enables to Edit the hostname. If a single host needs to be eddited for one check_service, and kept only visible for other check_service, you can make 2 services that point to same address, and have different edit_host properties.
EditHost *bool `json:"edit_host,omitempty" gorm:"not null;default:false"`
// Services is an aggregate of all child Services that belong to a host
Services []*service.Service `json:"services,omitempty" gorm:"foreignkey:HostID;constraint:OnUpdate:RESTRICT,OnDelete:RESTRICT"`
}
Host model represents a single machine. This could be an IP address or a resolvable hostname
Click to show internal directories.
Click to hide internal directories.