config

package
v0.0.0-...-9f38e0b Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertPaths

type CertPaths struct {
	Certfile string
	Keyfile  string
}

Description of cert file locations

type Config

type Config struct {
	CreateMissingCerts bool
	HostCertMap        map[string]CertPaths
	HostEndpointMap    map[string]Endpoint
}

General structure of our configuration

func EmptyConfig

func EmptyConfig() *Config

Function to produce an empty config map

func FromJson

func FromJson(data []byte) (*Config, error)

Parse a Config from a []byte as json

func ReadFile

func ReadFile(path string) (*Config, error)

Read a Config from a File

func (*Config) ToJson

func (c *Config) ToJson() []byte

Serialize a Config to a []byte as json

func (*Config) WriteFile

func (c *Config) WriteFile(path string) error

Write a Config to a File

type Endpoint

type Endpoint struct {
	Addr string
	Port string
}

Endpoint to connect to for a given domain name suffix

Jump to

Keyboard shortcuts

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