flagset

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filters

type Filters struct {
	Name            []string `help:"Filter policies by name"`
	NameRegexp      string   `help:"Filter policies by name, using regular expression"`
	Version         []string `help:"Filter policies by version"`
	VersionRegexp   string   `help:"Filter policies by version, using regular expression"`
	ScopeRegexp     string   `help:"Filter policies by scope, using regular expression"`
	IncludeDisabled bool     `help:"Include disabled policies"`
}

func (Filters) Validate added in v0.14.0

func (f Filters) Validate(kind policy.Kind, listing bool) error

type Format

type Format struct {
	Output    OutputFormat `short:"o" default:"" help:"Output format for the policies; json, yaml, prettyjson formats are supported"`
	NoHeaders bool         `help:"Do not output headers"`
}

func (Format) Validate added in v0.14.0

func (f Format) Validate(listing bool) error

type OutputFormat added in v0.14.0

type OutputFormat string
const (
	OutputFormatNone       OutputFormat = ""
	OutputFormatJSON       OutputFormat = "json"
	OutputFormatYAML       OutputFormat = "yaml"
	OutputFormatPrettyJSON OutputFormat = "prettyjson"
)

type Sort added in v0.13.0

type Sort struct {
	SortBy SortBy `help:"Sort policies by column" default:""`
}

func (Sort) Validate added in v0.14.0

func (s Sort) Validate(kind policy.Kind, listing bool) error

type SortBy added in v0.14.0

type SortBy string
const (
	SortByNone     SortBy = ""
	SortByPolicyID SortBy = "policyId"
	SortByName     SortBy = "name"
	SortByVersion  SortBy = "version"
)

Jump to

Keyboard shortcuts

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