config

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 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"`
	ValidDays  int    `yaml:"valid"`
	Encrypt    bool   `yaml:"encrypt"`
	Issuer     string `yaml:"issuer"`
	Subject    SubjectType
	Hosts      []string `yaml:"hosts"`
	RSABits    int      `yaml:"rsabits"`
	// 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 ConfigT added in v0.2.3

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

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

var Config ConfigT

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

type KeyFile added in v0.2.8

type KeyFile struct {
}

KeyFile type represents a request for a keyfile, which is a random 32 binary bytes converted to base64 text

type OptionsT added in v0.2.3

type OptionsT struct {
	ReplaceFiles bool
}

OptionsT type represents the options for this run

var Options OptionsT

Options is the global variable for the specified options for this run

type SSHKeyPair added in v0.2.8

type SSHKeyPair struct {
	RSABits int `yaml:"rsabits"`
}

SSHKeyPair type represents a request for SSH keys.

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

Jump to

Keyboard shortcuts

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