configurator

package
v0.0.0-...-319f29d Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveDefaultConfig

func SaveDefaultConfig(path string)

Types

type Config

type Config struct {
	Version       string            `yaml:"version"`
	SmdHost       string            `yaml:"smd-host"`
	SmdPort       int               `yaml:"smd-port"`
	AccessToken   string            `yaml:"access-token"`
	TemplatePaths map[string]string `yaml:"templates"`
	Server        Server            `yaml:"server"`
	Options       Options           `yaml:"options"`
}

func LoadConfig

func LoadConfig(path string) Config

func NewConfig

func NewConfig() Config

func (*Config) SaveConfig

func (config *Config) SaveConfig(path string)

type DHCP

type DHCP struct {
	Hostname   string
	MacAddress string
	IpAddress  []IPAddr
}

type EthernetInterface

type EthernetInterface struct {
	Id          string
	Description string
	MacAddress  string
	LastUpdate  string
	ComponentId string
	Type        string
	IpAddresses []IPAddr
}

type IPAddr

type IPAddr struct {
	IpAddress string `json:"IPAddress"`
	Network   string `json:"Network"`
}

type Options

type Options struct {
	JwksUri     string `yaml:"jwks-uri"`
	JwksRetries int    `yaml:"jwks-retries"`
}

type Server

type Server struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
}

type SmdClient

type SmdClient struct {
	http.Client
	Host        string
	Port        int
	AccessToken string
}

func (*SmdClient) FetchDNS

func (client *SmdClient) FetchDNS(config *Config) error

func (*SmdClient) FetchEthernetInterfaces

func (client *SmdClient) FetchEthernetInterfaces() ([]EthernetInterface, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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