config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(configDir, configNameLayout string) (*config, error)

New return interface for work with config.

Types

type AppRole

type AppRole struct {
	Name              string `yaml:"name"`
	Path              string `yaml:"path"`
	RoleIDLocalPath   string `yaml:"roleIDLocalPath"`
	SecretIDLocalPath string `yaml:"secretIDLocalPath"`
}

type Auth

type Auth struct {
	TLSInsecure bool      `yaml:"tlsInsecure"`
	CABundle    string    `yaml:"caBundle"`
	Bootstrap   Bootstrap `yaml:"bootstrap"`
	AppRole     AppRole   `yaml:"appRole"`
}

type Bootstrap

type Bootstrap struct {
	Token string `yaml:"token"`
	File  string `yaml:"file"`
}

type CA

type CA struct {
	ExportedKey bool `yaml:"exportedKey"`
	Generate    bool `yaml:"generate"`
}

type Certificate

type Certificate struct {
	Name        string        `yaml:"name"`
	IssuerRef   IssuerRef     `yaml:"issuerRef"`
	IsCA        bool          `yaml:"isCa"`
	CA          CA            `yaml:"ca"`
	Spec        Spec          `yaml:"spec"`
	HostPath    string        `yaml:"hostPath"`
	WithUpdate  bool          `yaml:"withUpdate"`
	RenewBefore time.Duration `yaml:"renewBefore"`
	Trigger     [][]string    `yaml:"trigger"`
}

type Config

type Config struct {
	Issuers  []Issuer  `yaml:"issuers"`
	Resource Resources `yaml:",inline"`
}

type IPAddresses

type IPAddresses struct {
	Static     []string `yaml:"static"`
	Interfaces []string `yaml:"interfaces"`
	DNSLookup  []string `yaml:"dnsLookup"`
}

type Issuer

type Issuer struct {
	Name  string `yaml:"name"`
	Vault Vault  `yaml:"vault"`
}

type IssuerRef

type IssuerRef struct {
	Name string `yaml:"name"`
}

type KV

type KV struct {
	Path string `yaml:"path"`
}

type PrivateKey

type PrivateKey struct {
	Algorithm string `yaml:"algorithm"`
	Encoding  string `yaml:"encoding"`
	Size      int    `yaml:"size"`
}

type Resource

type Resource struct {
	Role       string `yaml:"role"`
	CAPath     string `yaml:"CAPath"`
	RootCAPath string `yaml:"rootCAPath"`
	KV         KV     `yaml:"kv"`
}

type Resources

type Resources struct {
	Certificates []Certificate `yaml:"certificates"`
	Secrets      []Secret      `yaml:"secrets"`
}

type Secret

type Secret struct {
	Name      string    `yaml:"name"`
	IssuerRef IssuerRef `yaml:"issuerRef"`
	Key       string    `yaml:"key"`
	HostPath  string    `yaml:"hostPath"`
}

type Spec

type Spec struct {
	Subject     Subject     `yaml:"subject"`
	PrivateKey  PrivateKey  `yaml:"privateKey"`
	Hostnames   []string    `yaml:"hostnames"`
	IPAddresses IPAddresses `yaml:"ipAddresses"`
	TTL         string      `yaml:"ttl"`
}

type Subject

type Subject struct {
	CommonName         string   `yaml:"commonName"`
	Country            []string `yaml:"country"`
	Locality           []string `yaml:"locality"`
	Organization       []string `yaml:"organization"`
	OrganizationalUnit []string `yaml:"organizationalUnit"`
	Province           []string `yaml:"province"`
	PostalCode         []string `yaml:"postalCode"`
	StreetAddress      []string `yaml:"streetAddress"`
	SerialNumber       string   `yaml:"serialNumber"`
}

type Vault

type Vault struct {
	Server   string   `yaml:"server"`
	Auth     Auth     `yaml:"auth"`
	Resource Resource `yaml:"resource"`
}

Jump to

Keyboard shortcuts

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