Documentation
¶
Index ¶
- func Fatal(v ...any)
- func Fatalf(format string, v ...any)
- func Print(v ...any) (int, error)
- func Printf(format string, v ...any) (int, error)
- func Println(v ...any) (int, error)
- type Buffer
- func (b *Buffer) Sprint(v ...any) *Buffer
- func (b *Buffer) Sprintf(format string, v ...any) *Buffer
- func (b *Buffer) Sprintln(v ...any) *Buffer
- func (b *Buffer) String() string
- func (b *Buffer) Stylef(style tui.Style, format string, v ...any) *Buffer
- func (b *Buffer) Styleln(style tui.Style, v ...any) *Buffer
- func (b *Buffer) Write(p []byte) (int, error)
- func (b *Buffer) WriteByte(v byte) error
- func (b *Buffer) WriteRune(r rune) (int, error)
- func (b *Buffer) WriteString(s string) (int, error)
- type InitConfig
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 ¶
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
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.
Types ¶
type Buffer ¶ added in v0.23.0
type Buffer struct {
// contains filtered or unexported fields
}
A Buffer is used to efficiently build a string to display on a terminal.
func (*Buffer) Sprint ¶ added in v0.23.0
Sprint appends to the Buffer. Arguments are handled in the manner of fmt.Print.
func (*Buffer) Sprintf ¶ added in v0.23.0
Sprintf appends to the Buffer. Arguments are handled in the manner of fmt.Printf.
func (*Buffer) Sprintln ¶ added in v0.23.0
Sprintln appends to the Buffer. Arguments are handled in the manner of fmt.Println.
func (*Buffer) Stylef ¶ added in v0.23.0
Stylef appends the styled string to the Buffer. Arguments are handled in the manner of fmt.Printf before styling.
func (*Buffer) Styleln ¶ added in v0.23.0
Styleln appends the styled string to the Buffer. Arguments are handled in the manner of fmt.Println before styling.
func (*Buffer) Write ¶ added in v0.23.0
Write appends the contents of p to b's buffer. Write always returns len(p), nil.
func (*Buffer) WriteByte ¶ added in v0.23.0
WriteByte appends the byte c to b's buffer. The returned error is always nil.
type InitConfig ¶ added in v0.20.0
type InitConfig struct {
Version string `yaml:"version"`
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.