Documentation
¶
Index ¶
Constants ¶
View Source
const ( FromRemote = "remote" FromLocal = "local" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigCmd ¶
type ConfigCmd struct {
Use UseConfigCmd `cmd:"" help:"set active configuration"`
New NewConfigCmd `cmd:"" help:"create new configuration"`
List ListConfigCmd `cmd:"" help:"list configurations"`
Rename RenameConfigCmd `cmd:"" help:"rename configuration"`
Delete DeleteConfigCmd `cmd:"" help:"delete configuration"`
Info InfoConfigCmd `cmd:"" help:"display configuration information"`
Edit EditConfigCmd `cmd:"" help:"edit config file (defaults to active)" hidden:"" type:"fflag.Editor"`
}
type ConfigName ¶
type ConfigName string
func (ConfigName) AfterApply ¶
func (c ConfigName) AfterApply(ctx *kong.Context) error
func (ConfigName) String ¶
func (c ConfigName) String() string
type DeleteConfigCmd ¶
type DeleteConfigCmd struct {
Name ConfigName `arg:"" required:"" help:"topaz config name"`
ConfigDir string `flag:"" required:"false" default:"${topaz_cfg_dir}" help:"path to config folder" `
}
type EditConfigCmd ¶
type EditConfigCmd struct {
Name ConfigName `arg:"" required:"" default:"${active_config}" help:"topaz config name"`
ConfigDir string `flag:"" default:"${topaz_cfg_dir}" help:"path to config folder"`
}
type Info ¶
type Info struct {
Environment struct {
Home string `json:"home"`
XdgConfigHome string `json:"xdg_config_home"`
XdgDataHome string `json:"xdg_data_home"`
} `json:"environment"`
Config struct {
TopazCfgDir string `json:"topaz_cfg_dir"`
TopazCertsDir string `json:"topaz_certs_dir"`
TopazDataDir string `json:"topaz_db_dir"`
TopazDecisionsDir string `json:"topaz_decisions_dir"`
TopazTemplateDir string `json:"topaz_tmpl_dir"`
TopazDir string `json:"topaz_dir"`
} `json:"config"`
Runtime struct {
ActiveConfigurationName string `json:"active_configuration_name"`
ActiveConfigurationFile string `json:"active_configuration_file"`
RunningConfigurationName string `json:"running_configuration_name"`
RunningConfigurationFile string `json:"running_configuration_file"`
RunningContainerName string `json:"running_container_name"`
TopazConfigFile string `json:"topaz_json"`
} `json:"runtime"`
Default struct {
ContainerRegistry string `json:"container_registry"`
ContainerImage string `json:"container_image"`
ContainerTag string `json:"container_tag"`
ContainerPlatform string `json:"container_platform"`
NoCheck bool `json:"topaz_no_check"`
NoColor bool `json:"topaz_no_color"`
} `json:"default"`
Directory struct {
DirectorySvc string `json:"topaz_directory_svc"`
DirectorySvcHttp string `json:"topaz_directory_svc_http"`
DirectoryKey string `json:"topaz_directory_key"`
DirectoryToken string `json:"topaz_directory_token"`
Insecure bool `json:"topaz_insecure"`
Plaintext bool `json:"topaz_plaintext"`
Timeout string `json:"timeout"`
} `json:"directory"`
Authorizer struct {
AuthorizerSvc string `json:"topaz_authorizer_svc"`
AuthorizerSvcHttp string `json:"topaz_authorizer_svc_http"`
AuthorizerKey string `json:"topaz_authorizer_key"`
AuthorizerToken string `json:"topaz_authorizer_token"`
Insecure bool `json:"topaz_insecure"`
Plaintext bool `json:"topaz_plaintext"`
Timeout string `json:"timeout"`
} `json:"authorizer"`
OpenAPI struct {
Directory string `json:"directory_svc"`
Access string `json:"access_svc"`
Authorizer string `json:"authorizer_svc"`
} `json:"open_api_endpoints"`
Access struct {
WellKnownConfigURL string `json:"wellknown_config_url"`
} `json:"access"`
}
type InfoConfigCmd ¶
type InfoConfigCmd struct {
Var string `arg:"" optional:"" help:"configuration variable"`
Raw bool `flag:"" short:"r" help:"output raw strings"`
}
func (InfoConfigCmd) GetInfo ¶ added in v0.33.21
func (cmd InfoConfigCmd) GetInfo() *Info
type ListConfigCmd ¶
type ListConfigCmd struct {
ConfigDir string `flag:"" required:"false" default:"${topaz_cfg_dir}" help:"path to config folder" `
}
type NewConfigCmd ¶
type NewConfigCmd struct {
Name ConfigName `flag:"" short:"n" required:"" help:"config name"`
Resource string `flag:"" short:"r" required:"" help:"policy uri (e.g. ghcr.io/org/policy:tag)"`
From string `flag:"" short:"F" required:"" default:"remote" enum:"remote,local" help:"load policy from remote or local image"`
Policy string `flag:"" short:"P" help:"policy name"`
Stdout bool `flag:"" short:"p" default:"false" help:"print to stdout"`
EdgeDirectory bool `flag:"" short:"d" default:"false" hidden:"" help:"enable edge directory"`
Force bool `flag:"" short:"f" default:"false" help:"skip confirmation prompt"`
}
type RenameConfigCmd ¶
type RenameConfigCmd struct {
Name ConfigName `arg:"" required:"" help:"topaz config name"`
NewName ConfigName `arg:"" required:"" help:"topaz new config name"`
ConfigDir string `flag:"" required:"false" default:"${topaz_cfg_dir}" help:"path to config folder" `
}
type UseConfigCmd ¶
type UseConfigCmd struct {
Name ConfigName `arg:"" required:"" help:"topaz config name"`
ConfigDir string `flag:"" required:"false" default:"${topaz_cfg_dir}" help:"path to config folder" `
}
Click to show internal directories.
Click to hide internal directories.