config

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate added in v0.2.0

type Certificate struct {
	Type    string             `yaml:"type,omitempty"`
	Region  string             `yaml:"region,omitempty"`
	Name    string             `yaml:"name,omitempty"`
	Profile string             `yaml:"profile,omitempty"`
	Paths   CertificatePaths   `yaml:"paths,omitempty"`
	Details CertificateDetails `yaml:"details,omitempty"`
}

Certificate for creating/requesting PKI certificates

type CertificateDetails added in v0.2.0

type CertificateDetails struct {
	Group      string            `yaml:"group,omitempty"`
	CommonName string            `yaml:"commonName,omitempty"`
	Hosts      []string          `yaml:"hosts,omitempty"`
	Type       string            `yaml:"type,omitempty"`
	Region     string            `yaml:"region,omitempty"`
	Name       string            `yaml:"name,omitempty"`
	Paths      map[string]string `yaml:"paths,omitempty"`
}

CertificateDetails defines the Details we should write the certificate components to

type CertificatePaths added in v0.2.0

type CertificatePaths struct {
	Certificate          string `yaml:"cert,omitempty"`
	SigningRequest       string `yaml:"csr,omitempty"`
	Key                  string `yaml:"key,omitempty"`
	CertificateAuthority string `yaml:"ca,omitempty"`
}

CertificatePaths defines the paths we should write the certificate components to

type Config

type Config struct {
	Users        map[string]User  `yaml:"users"`
	Files        map[string]File  `yaml:"files"`
	Groups       map[string]Group `yaml:"groups"`
	Certificates []Certificate    `yaml:"certificates"`
}

Config Headstart config

func Parse

func Parse(configBytes []byte) (*Config, error)

Parse a string into a config struct

type File

type File struct {
	Source          string      `yaml:"source,omitempty"`
	Contents        string      `yaml:"contents,omitempty"`
	EncodedContents string      `yaml:"encoded_contents,omitempty"`
	Hash            string      `yaml:"hash,omitempty"`
	Mode            os.FileMode `yaml:"mode,omitempty"`
	Owner           string      `yaml:"owner,omitempty"`
	Group           string      `yaml:"group,omitempty"`
}

File for creating files on the host

type Group

type Group struct {
	Sudo bool `yaml:"Sudo,omitempty"`
}

Group to be created on the host

type User

type User struct {
	Groups         []string `yaml:"groups,omitempty"`
	AuthorizedKeys []string `yaml:"authorized_keys"`
}

User users to be created on the host

Jump to

Keyboard shortcuts

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