config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(configFilename *string) error

GetConfig is responsible for parsing the YAML file and filling in the global variable Config

Types

type Cert

type Cert struct {
	// Filled in by YAML unmarshalling
	TypeString string `yaml:"type"`
	Issuer     string `yaml:"issuer"`
	Subject    SubjectType
	Hosts      []string `yaml:"hosts"`
	// Created programmatically
	Type         int               `yaml:"-"`
	IsCA         bool              `yaml:"-"`
	IsSelfSigned bool              `yaml:"-"`
	IsOCSPSigner bool              `yaml:"-"`
	PrivateKey   crypto.PrivateKey `yaml:"-"`
	Certificate  *x509.Certificate `yaml:"-"`
	IssuerCert   *Cert             `yaml:"-"`
}

Cert type is an Internal representation of a certificate specification, some filled in from the YAML config file, some calculated

type SubjectType

type SubjectType struct {
	O  string `yaml:"O"`
	OU string `yaml:"OU"`
	CN string `yaml:"CN"`
}

SubjectType is the type for a subject name

type Type

type Type struct {
	// filled in by YAML unmarshalling
	Directories  map[string]string `yaml:"directories"`
	Extensions   map[string]string `yaml:"extensions"`
	Subject      SubjectType
	KeyFiles     []string            `yaml:"keyfiles"`
	Certificates map[string]*Cert    `yaml:"certificates"`
	Combos       map[string][]string `yaml:"combos"`
	// filled in programmatically
	PublicDirectory  string `yaml:"-"`
	PrivateDirectory string `yaml:"-"`
	ExtensionKey     string `yaml:"-"`
	ExtensionCert    string `yaml:"-"`
}

Type type is the internal representation of the entire config file, some filled in from the YAML config files, some calculated

var Config Type

Config is a global variable for "THE CONFIG", there will only be one per run

Jump to

Keyboard shortcuts

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