config

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig() error

Types

type AuthConfig

type AuthConfig struct {
	LDAP *LDAPConfig
}

type Config

type Config struct {
	Authentication AuthConfig
	NetBox         struct {
		URL                 string
		APIKey              string
		DatacenterFilterKey Filter
		LimitPerPage        int
	}
	Log struct {
		Level  string
		Pretty bool
	}
	Datacenter string
	API        struct {
		ListenAddress string
		ListenPort    int
	}
	Build struct {
		Interval            time.Duration
		AllDevicesMustBuild bool
	}
	Debug struct {
		Pprof struct {
			Enabled bool
		}
	}
}
var (
	Cfg Config
)

type Filter

type Filter string
const (
	SiteFilter       Filter = "site"
	SiteGroupFilter  Filter = "site_group"
	SiteRegionFilter Filter = "region"
)

type LDAPConfig

type LDAPConfig struct {
	URL                   string
	BaseDN                string
	BindDN                string
	Password              string
	Timeout               time.Duration
	MaxConnectionLifetime time.Duration
	InsecureSkipVerify    bool
	WorkersCount          int
}

Jump to

Keyboard shortcuts

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