Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Logger *LoggerConfig `yaml:"logger"`
Netbox *NetboxConfig `yaml:"netbox"`
Sources []SourceConfig `yaml:"source"`
}
func ParseConfig ¶
type HTTPScheme ¶
type HTTPScheme string
const ( HTTP HTTPScheme = "http" HTTPS HTTPScheme = "https" )
type LoggerConfig ¶
func (LoggerConfig) String ¶
func (l LoggerConfig) String() string
func (*LoggerConfig) UnmarshalYAML ¶
func (l *LoggerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type NetboxConfig ¶
type NetboxConfig struct {
APIToken string `yaml:"apiToken"`
Hostname string `yaml:"hostname"`
Port int `yaml:"port"`
// Can be http or https (default)
HTTPScheme HTTPScheme `yaml:"httpScheme"`
ValidateCert bool `yaml:"validateCert"`
Timeout int `yaml:"timeout"`
Tag string `yaml:"tag"`
TagColor string `yaml:"tagColor"`
RemoveOrphans bool `yaml:"removeOrphans"`
RemoveOrphansAfterDays int `yaml:"removeOrphansAfterDays"`
SourcePriority []string `yaml:"sourcePriority"`
CAFile string `yaml:"caFile"`
}
Configuration that can be used for Netbox. In netbox block.
func (NetboxConfig) String ¶
func (n NetboxConfig) String() string
type SourceConfig ¶
type SourceConfig struct {
Name string `yaml:"name"`
Type constants.SourceType `yaml:"type"`
HTTPScheme HTTPScheme `yaml:"httpScheme"`
Hostname string `yaml:"hostname"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
APIToken string `yaml:"apiToken"`
ValidateCert bool `yaml:"validateCert"`
Tag string `yaml:"tag"`
TagColor string `yaml:"tagColor"`
IgnoredSubnets []string `yaml:"ignoredSubnets"`
PermittedSubnets []string `yaml:"permittedSubnets"`
InterfaceFilter string `yaml:"interfaceFilter"`
CollectArpData bool `yaml:"collectArpData"`
CAFile string `yaml:"caFile"`
IgnoreAssetTags bool `yaml:"ignoreAssetTags"`
IgnoreSerialNumbers bool `yaml:"ignoreSerialNumbers"`
IgnoreVMTemplates bool `yaml:"ignoreVMTemplates"`
// Relations
DatacenterClusterGroupRelations map[string]string `yaml:"datacenterClusterGroupRelations"`
HostSiteRelations map[string]string `yaml:"hostSiteRelations"`
HostRoleRelations map[string]string `yaml:"hostRoleRelations"`
ClusterSiteRelations map[string]string `yaml:"clusterSiteRelations"`
ClusterTenantRelations map[string]string `yaml:"clusterTenantRelations"`
HostTenantRelations map[string]string `yaml:"hostTenantRelations"`
VMTenantRelations map[string]string `yaml:"vmTenantRelations"`
VMRoleRelations map[string]string `yaml:"vmRoleRelations"`
VlanGroupRelations map[string]string `yaml:"vlanGroupRelations"`
VlanGroupSiteRelations map[string]string `yaml:"vlanGroupSiteRelations"`
VlanTenantRelations map[string]string `yaml:"vlanTenantRelations"`
VlanSiteRelations map[string]string `yaml:"vlanSiteRelations"`
WlanTenantRelations map[string]string `yaml:"wlanTenantRelations"`
CustomFieldMappings map[string]string `yaml:"customFieldMappings"`
}
Configuration that can be used for each of the sources.
func (SourceConfig) String ¶
func (sc SourceConfig) String() string
func (*SourceConfig) UnmarshalYAML ¶
func (sc *SourceConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML is a custom unmarshal function for SourceConfig. This is needed because we map relations to the map[string]string.
Click to show internal directories.
Click to hide internal directories.