cli

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(v ...any)

Fatal writes an error prefix and the operands to OS stderr. Then, Fatal terminates the program by calling os.Exit(1).

func Fatalf

func Fatalf(format string, v ...any)

Fatalf writes an error prefix and the operands, formated according to the format specifier, to OS stderr. Then, Fatalf terminates the program by calling os.Exit(1).

func Print added in v0.20.0

func Print(v ...any) (int, error)

Print formats using the default formats for its operands and writes to standard output. Spaces are added between operands when neither is a string. It returns the number of bytes written and any write error encountered.

func Printf added in v0.20.0

func Printf(format string, v ...any) (int, error)

Printf formats according to a format specifier and writes to standard output. It returns the number of bytes written and any write error encountered.

func Println added in v0.20.0

func Println(v ...any) (int, error)

Println formats using the default formats for its operands and writes to standard output. Spaces are always added between operands and a newline is appended. It returns the number of bytes written and any write error encountered.

Types

type InitConfig added in v0.20.0

type InitConfig struct {
	Address yml.String `yaml:"address"`

	System struct {
		Admin struct {
			Identity yml.Identity `yaml:"identity"`
		} `yaml:"admin"`
	} `yaml:"system"`

	TLS struct {
		PrivateKey  yml.String `yaml:"key"`
		Certificate yml.String `yaml:"cert"`
		Password    yml.String `yaml:"password"`

		Proxy struct {
			Identity []yml.Identity `yaml:"identity"`
			Header   struct {
				ClientCert yml.String `yaml:"cert"`
			} `yaml:"header"`
		} `yaml:"proxy"`

		Client struct {
			VerifyCerts yml.Bool `yaml:"verify_cert"`
		} `yaml:"client"`
	} `yaml:"tls"`

	Unseal struct {
		Environment struct {
			Name string `yaml:"name"`
		} `yaml:"environment"`
	} `yaml:"unseal"`

	Enclave map[string]struct {
		Admin struct {
			Identity yml.Identity `yaml:"identity"`
		} `yaml:"admin"`

		Policy map[string]struct {
			Allow    []string       `yaml:"allow"`
			Deny     []string       `yaml:"deny"`
			Identity []yml.Identity `yaml:"identities"`
		} `yaml:"policy"`
	} `yaml:"enclave"`
}

InitConfig is a structure containing all possible KES initialization configuration fields.

func ReadInitConfig added in v0.20.0

func ReadInitConfig(filename string) (*InitConfig, error)

ReadInitConfig reads and parses the InitConfig YAML representation from the given file.

Jump to

Keyboard shortcuts

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