config

package
v0.0.0-...-82fb81f Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const FILENAME = ".asteroid.yaml"

FILENAME define the config file name that needs to be present on the computer for the app to works

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	Name       string `yaml:"name"`
	DNS        string `yaml:"dns"`
	AllowedIPs string `yaml:"allowed_ips"`
}

ClientConfig regroup the few fields necessarily to generate WG client config

type Config

type Config struct {
	WG           Wireguard    `yaml:"wireguard"`
	ClientConfig ClientConfig `yaml:"client_config_file"`
}

Config regroup the Wireguard and Client config

func ReadConfigFile

func ReadConfigFile() (Config, error)

ReadConfigFile retrieve the asteroid config file and put all fields into Config object

type Wireguard

type Wireguard struct {
	SSHKeyName  string `yaml:"ssh_key_name"`
	WireguardIP string `yaml:"ip"`
	SSHPort     string `yaml:"ssh_port"`
	Username    string `yaml:"username"`
	HostKey     bool   `yaml:"verification_host_key"`
	WGPort      string `yaml:"wg_port"`
}

Wireguard regroup all the field needed for WG to works properly

Jump to

Keyboard shortcuts

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