Documentation
¶
Index ¶
- Constants
- func MustLoadLocation(name string) *time.Location
- type CardProp
- type Config
- type DNSServerConfig
- type DeviceGrpc
- type DeviceGrpcMfg
- type DeviceGrpcOs
- type DeviceGrpcPorts
- type DeviceGrpcSupSvc
- type Entries
- type Entry
- type HTTPServerConfig
- type Log
- type Material
- type Metadata
- type NetdiscoConfig
- type Routing
- type SearchQuery
- type SearchRequest
- type SearchResponse
- type SnmpInfo
- type TLSPem
- type WorkersConfig
Constants ¶
View Source
const SeparatorByte byte = 255
Variables ¶
This section is empty.
Functions ¶
func MustLoadLocation ¶
Types ¶
type Config ¶
type Config struct { DNSServer *DNSServerConfig `yaml:"dns_server"` HTTPServer *HTTPServerConfig `yaml:"http_server"` Entries Entries `yaml:"entries"` Netdisco *NetdiscoConfig `yaml:"netdisco"` Workers *WorkersConfig `yaml:"workers"` Log *Log `yaml:"log"` DisableReportsMetrics bool `yaml:"disable_reports_metrics"` }
func LoadConfig ¶
func (*Config) UnmarshalYAML ¶
type DNSServerConfig ¶
func (*DNSServerConfig) UnmarshalYAML ¶
func (c *DNSServerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type DeviceGrpc ¶ added in v0.4.2
type DeviceGrpc struct { Name string `json:"name"` IP string `json:"ip"` MacAddress string `json:"macAddress"` DNS string `json:"dns"` Ports DeviceGrpcPorts `json:"ports"` SupportedServices DeviceGrpcSupSvc `json:"supportedServices"` Mfg DeviceGrpcMfg `json:"mfg"` Os DeviceGrpcOs `json:"os"` ChassisID string `json:"chassisId"` Serial string `json:"serial"` Uptime string `json:"uptime"` Description string `json:"description"` Contact string `json:"contact"` Location string `json:"location"` Layers int `json:"layers"` }
func DeviceGrpcFromNetdisco ¶ added in v0.4.2
func DeviceGrpcFromNetdisco(device netdisco.Device) DeviceGrpc
type DeviceGrpcMfg ¶ added in v0.4.2
type DeviceGrpcOs ¶ added in v0.4.2
type DeviceGrpcPorts ¶ added in v0.4.6
type DeviceGrpcSupSvc ¶ added in v0.4.6
type Entry ¶
type Entry struct { Domain string `yaml:"domain" json:"domain"` Routing *Routing `yaml:"routing" json:"-"` EnableMetrics bool `yaml:"enable_metrics" json:"-"` Targets []*netdisco.SearchDeviceQuery `yaml:"targets" json:"targets"` }
func (*Entry) UnmarshalYAML ¶
type HTTPServerConfig ¶
type HTTPServerConfig struct { Disable bool `yaml:"disable"` Listen string `yaml:"listen"` EnableSSL bool `yaml:"enable_ssl"` TLSPem TLSPem `yaml:"tls_pem"` }
func (*HTTPServerConfig) UnmarshalYAML ¶
func (c *HTTPServerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type Log ¶
type Log struct { Level string `yaml:"level"` NoColor bool `yaml:"no_color"` InJson bool `yaml:"in_json"` }
func (*Log) UnmarshalYAML ¶
type Material ¶
type Material struct { HostID int `json:"hostId,omitempty"` Hostname string `json:"hostname,omitempty"` Hostgroup string `json:"hostgroup,omitempty"` HostType string `json:"hostType,omitempty"` HostUsage string `json:"hostUsage,omitempty"` HostAdditionalInfo string `json:"hostAdditionalInfo,omitempty"` CreationDate string `json:"creationDate,omitempty"` AllocationDate string `json:"allocationDate,omitempty"` PfsID int `json:"pfsId,omitempty"` Pfs string `json:"pfs,omitempty"` PfsShortName string `json:"pfsShortName,omitempty"` PfsCriticity string `json:"pfsCriticity,omitempty"` PfsDomain string `json:"pfsDomain,omitempty"` MachineID int `json:"machineId,omitempty"` Machine string `json:"machine,omitempty"` Equipment string `json:"equipment,omitempty"` Profile string `json:"profile,omitempty"` Rampup int `json:"rampup,omitempty"` ShutdownOrder int `json:"shutdownOrder,omitempty"` ShutdownLevel int `json:"shutdownLevel,omitempty"` Env string `json:"env,omitempty"` SiteID int `json:"siteId,omitempty"` Site string `json:"site,omitempty"` Etat string `json:"etat,omitempty"` RoomID int `json:"roomId,omitempty"` Room string `json:"room,omitempty"` Active int `json:"active,omitempty"` BackIP string `json:"backIP,omitempty"` IloType string `json:"iloType,omitempty"` IloIP string `json:"iloIP,omitempty"` CardProps []CardProp `json:"-"` // contains filtered or unexported fields }
type NetdiscoConfig ¶
type NetdiscoConfig struct { Endpoint string `yaml:"endpoint"` Username string `yaml:"username"` Password string `yaml:"password"` ApiKey string `yaml:"api_key"` InsecureSkipVerify bool `yaml:"insecure_skip_verify"` }
func (*NetdiscoConfig) UnmarshalYAML ¶
func (c *NetdiscoConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type Routing ¶
type Routing struct { Scheme string `yaml:"scheme" json:"scheme"` Port int `yaml:"port" json:"port"` Host string `yaml:"host" json:"host"` Metadata map[string]interface{} `yaml:"metadata" json:"metadata"` IP string `yaml:"ip" json:"ip"` }
func (Routing) UnTemplate ¶
type SearchQuery ¶
type SearchQuery struct { Hostname string `json:"hostname" yaml:"hostname"` HostId string `json:"host_id" yaml:"host_id"` PFS string `json:"pfs" yaml:"pfs"` PfsShortName string `json:"pfs_short_name" yaml:"pfs_short_name"` Machine string `json:"machine" yaml:"machine"` Env string `json:"env" yaml:"env"` Equipment string `json:"equipment" yaml:"equipment"` Profile string `json:"profile" yaml:"profile"` ProfileID string `json:"profile_id" yaml:"profile_id"` Active string `json:"active" yaml:"active"` Etat string `json:"etat" yaml:"etat"` CreationDate time.Time `json:"creation_date" yaml:"creation_date"` AllocationDate time.Time `json:"allocation_date" yaml:"allocation_date"` OSType string `json:"os_type" yaml:"os_type"` OSCurrent string `json:"os_current" yaml:"os_current"` System string `json:"system" yaml:"system"` Site string `json:"site" yaml:"site"` LocationHeight string `json:"location_height" yaml:"location_height"` LocationLabel string `json:"location_label" yaml:"location_label"` LocationBuilding string `json:"location_building" yaml:"location_building"` LocationRoom string `json:"location_room" yaml:"location_room"` LocationStreet string `json:"location_street" yaml:"location_street"` LocationBay string `json:"location_bay" yaml:"location_bay"` LocationSlot string `json:"location_slot" yaml:"location_slot"` LocationFace string `json:"location_face" yaml:"location_face"` ArticleType string `json:"article_type" yaml:"article_type"` ArticleLib string `json:"article_lib" yaml:"article_lib"` ArticleSerialNumber string `json:"article_serial_number" yaml:"article_serial_number"` ArticleId string `json:"article_id" yaml:"article_id"` // contains filtered or unexported fields }
func (*SearchQuery) Id ¶
func (q *SearchQuery) Id() uint64
func (*SearchQuery) Serialize ¶
func (q *SearchQuery) Serialize() url.Values
type SearchRequest ¶ added in v0.5.0
type SearchRequest struct { HostMatch string ManufacturerNameMatch string ManufacturerModelMatch string LocationMatch string LayersMatch string SerialMatch string OsName string OsVersion string MatchAll bool }
func (*SearchRequest) Empty ¶ added in v0.5.0
func (r *SearchRequest) Empty() bool
type SearchResponse ¶
type TLSPem ¶
func (TLSPem) BuildCertif ¶
func (t TLSPem) BuildCertif() (tls.Certificate, error)
type WorkersConfig ¶
type WorkersConfig struct { NbWorkers int `yaml:"nb_workers"` RefreshInterval pmodel.Duration `yaml:"refresh_interval"` }
func (*WorkersConfig) UnmarshalYAML ¶
func (c *WorkersConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.