config

package
v0.0.0-...-6d4f3c0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config reads configuration data from the file which is provided in the "config" argument when the app is started and returns the Configuration type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Servers []Server `yaml:"servers"`
}

func GetConfiguration

func GetConfiguration(fileName string) (Configuration, error)

GetConfiguration reads the configuration from the file and converts it to the Configuration object.

type Server

type Server struct {
	Host            string   `yaml:"host"`
	Port            int      `yaml:"port"`
	User            string   `yaml:"user"`
	KeyFile         string   `yaml:"key_file"`
	KeyFilePassword string   `yaml:"key_file_password"`
	Password        string   `yaml:"password"`
	Tunnels         []Tunnel `yaml:"tunnels"`
}

type Tunnel

type Tunnel struct {
	RemotePort int    `yaml:"remote_port"`
	RemoteHost string `yaml:"remote_host"`
	LocalPort  int    `yaml:"local_port"`
}

Jump to

Keyboard shortcuts

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