Documentation ¶
Index ¶
- Variables
- func Update(p *Printer, opts ...Option)
- type Option
- func CustomValueLength(length int) Option
- func OnlyKeys(b bool) Option
- func OnlyPaths(b bool) Option
- func ShowMetadata(b bool) Option
- func ShowValues(b bool) Option
- func ShowVersion(b bool) Option
- func ToFormat(format OutputFormat) Option
- func WithEnginePath(path string) Option
- func WithHyperLinks(b bool) Option
- func WithTemplate(str, path string) Option
- func WithVaultClient(v *vault.Vault) Option
- func WithWriter(w io.Writer) Option
- type OutputFormat
- type Printer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidFormat invalid output format. ErrInvalidFormat = errors.New("invalid format (valid options: base, yaml, json, export, markdown, template, policy)") )
Functions ¶
Types ¶
type Option ¶
type Option func(*Printer)
Option list of available options for modifying the output.
func CustomValueLength ¶
CustomValueLength option for trimming down the output of secrets.
func ShowMetadata ¶
ShowMetadata flag for unmasking secrets in output.
func ShowValues ¶
ShowValues flag for displaying the secrets version.
func ShowVersion ¶
ShowVersion flag for unmasking secrets in output.
func ToFormat ¶
func ToFormat(format OutputFormat) Option
ToFormat sets the output format of the printer.
func WithEnginePath ¶ added in v0.7.1
func WithHyperLinks ¶ added in v0.7.0
WithHyperLinks for enabling hyperlinks.
func WithVaultClient ¶
WithVaultClient inject a vault client.
func WithWriter ¶
WithWriter option for passing a custom io.Writer.
type OutputFormat ¶
type OutputFormat int
OutputFormat enum of valid output formats.
const ( // MaxValueLength maximum length of passwords. MaxValueLength = 12 // Base prints the secrets in the default format. Base OutputFormat = iota // YAML prints the secrets in yaml format. YAML // JSON prints the secrets in json format. JSON // Export prints the secrets in export (export "key=value") format. Export // Markdown prints the secrets in markdowntable format. Markdown // Template renders a given template string or file. Template // Policy displays the current token policy capabilities for each path in a matrix. Policy )
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer struct that holds all options used for displaying the secrets.
func NewSecretPrinter ¶ added in v0.7.1
NewPrinter return a new printer struct.
Click to show internal directories.
Click to hide internal directories.