cmd

package
v0.32.55 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	BearerToken = `Bearer `
	ConfigFlag  = `config`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizerCmd

type AuthorizerCmd struct {
	authorizer.AuthorizerCmd
}

func (*AuthorizerCmd) AfterApply added in v0.8.0

func (cmd *AuthorizerCmd) AfterApply(context *kong.Context, c *topazCC.CommonCtx) error

func (*AuthorizerCmd) Run

func (cmd *AuthorizerCmd) Run(c *cc.CommonCtx) error

type AuthorizerOptions added in v0.8.0

type AuthorizerOptions struct {
	AddressOverride string `name:"authorizer" env:"ADDRESS" help:"authorizer override" default:""`

	ConnectionOptions
}

type CLI

type CLI struct {
	Login        user.LoginCmd      `cmd:"" help:"login to aserto.com"`
	Logout       user.LogoutCmd     `cmd:"" help:"logout from aserto.com"`
	Start        topaz.StartCmd     `cmd:"" help:"start a topaz instance"`
	Stop         topaz.StopCmd      `cmd:"" help:"stop a topaz instance"`
	Restart      topaz.RestartCmd   `cmd:"" help:"restart topaz instance"`
	Status       topaz.StatusCmd    `cmd:"" help:"status of topaz instance"`
	RunCmd       topaz.RunCmd       `cmd:"" name:"run" help:"run topaz instance in interactive mode"`
	Console      topaz.ConsoleCmd   `cmd:"" help:"launch web console"`
	Config       ConfigCmd          `cmd:"" help:"configuration commands"`
	Directory    DirectoryCmd       `cmd:"" aliases:"ds" help:"directory commands"`
	Authorizer   AuthorizerCmd      `cmd:"" aliases:"az" help:"authorizer commands"`
	DecisionLogs DecisionLogsCmd    `cmd:"" aliases:"dl" help:"decision logs commands"`
	ControlPlane ControlPlaneCmd    `cmd:"" aliases:"cp" help:"control plane commands"`
	Tenant       TenantCmd          `cmd:"" aliases:"tn" help:"tenant commands"`
	User         UserCmd            `cmd:"" help:"user commands"`
	Certs        certs.CertsCmd     `cmd:"" help:"certificate management"`
	Install      topaz.InstallCmd   `cmd:"" help:"install topaz"`
	Uninstall    topaz.UninstallCmd `cmd:"" help:"uninstall topaz, removes all locally installed artifacts"`
	Update       topaz.UpdateCmd    `cmd:"" help:"update topaz container version"`
	Version      VersionCmd         `cmd:"" help:"version information"`

	// ConfigFileMapper implements the `type:"conf"` tag.
	Cfg            string `name:"config" short:"c" type:"conf" help:"name or path of configuration file"`
	Verbosity      int    `short:"v" type:"counter" help:"Use to increase output verbosity."`
	TenantOverride string `name:"tenant" env:"ASERTO_TENANT_ID" help:"tenant id override"`
}

func (*CLI) ConfigOverrider added in v0.8.6

func (cli *CLI) ConfigOverrider(conf *config.Config)

type ConfigCmd

type ConfigCmd struct {
	Use    config.UseConfigCmd         `cmd:"" help:"set active configuration"`
	New    dev.ConfigureCmd            `cmd:"" help:"create new configuration"`
	List   config.ListConfigCmd        `cmd:"" help:"list configurations"`
	Rename topazConfig.RenameConfigCmd `cmd:"" help:"rename configuration"`
	Delete topazConfig.DeleteConfigCmd `cmd:"" help:"delete configuration"`
	Info   topazConfig.InfoConfigCmd   `cmd:"" help:"display configuration information"`
}

func (*ConfigCmd) Run

func (cmd *ConfigCmd) Run(c *cc.CommonCtx) error

type ConnectionOptions added in v0.8.0

type ConnectionOptions struct {
	APIKey   string `env:"KEY" help:"service api key" placeholder:"key"`
	NoAuth   bool   `help:"do not provide any credentials"`
	Insecure bool   `help:"skip TLS verification" default:"false"`
}

func (*ConnectionOptions) Address added in v0.8.0

func (so *ConnectionOptions) Address() string

func (*ConnectionOptions) IsAnonymous added in v0.8.0

func (so *ConnectionOptions) IsAnonymous() bool

func (*ConnectionOptions) IsInsecure added in v0.8.0

func (so *ConnectionOptions) IsInsecure() bool

func (*ConnectionOptions) Key added in v0.8.0

func (so *ConnectionOptions) Key() string

type ControlPlaneCmd added in v0.8.10

type ControlPlaneCmd struct {
	Get  ControlPlaneGetCmd  `cmd:"" help:"certificates"`
	List ControlPlaneListCmd `cmd:"" help:"list connections | instances"`
	Exec ControlPlaneExecCmd `cmd:"" help:"exec discovery | edge-sync"`
}

func (*ControlPlaneCmd) BeforeApply added in v0.20.6

func (cmd *ControlPlaneCmd) BeforeApply(context *kong.Context) error

func (*ControlPlaneCmd) Run added in v0.8.10

func (cmd *ControlPlaneCmd) Run(c *cc.CommonCtx) error

type ControlPlaneExecCmd added in v0.20.7

type ControlPlaneExecCmd struct {
	Discovery cp.DiscoveryCmd   `cmd:"" help:"run discovery on a registered instance"`
	EdgeSync  cp.EdgeDirSyncCmd `cmd:"" help:"sync the directory on an edge authorizer"`
}

type ControlPlaneGetCmd added in v0.20.7

type ControlPlaneGetCmd struct {
	Certificates cp.ClientCertCmd `cmd:"" help:"get client certificates for an edge authorizer connection"`
}

type ControlPlaneListCmd added in v0.20.7

type ControlPlaneListCmd struct {
	Connections cp.ListConnectionsCmd           `cmd:"" help:"list edge authorizer connections"`
	Instances   cp.ListInstanceRegistrationsCmd `cmd:"" help:"list instance registrations"`
}

type DecisionLogsCmd added in v0.8.0

type DecisionLogsCmd struct {
	List    dl.ListCmd        `cmd:"list" help:"list available decision log files"`
	Get     dl.GetCmd         `cmd:"get" help:"download one or more decision log files"`
	Stream  dl.StreamCmd      `cmd:"stream" help:"stream decision log events to stdout"`
	SvcOpts ConnectionOptions `embed:"" envprefix:"ASERTO_DECISION_LOGS_"`
}

func (*DecisionLogsCmd) AfterApply added in v0.8.0

func (cmd *DecisionLogsCmd) AfterApply(so ServiceOptions) error

func (*DecisionLogsCmd) BeforeApply added in v0.20.6

func (cmd *DecisionLogsCmd) BeforeApply(context *kong.Context) error

func (*DecisionLogsCmd) Run added in v0.8.0

func (cmd *DecisionLogsCmd) Run(c *cc.CommonCtx) error

type DirectoryCmd

type DirectoryCmd struct {
	directory.DirectoryCmd
}

func (*DirectoryCmd) AfterApply added in v0.8.0

func (cmd *DirectoryCmd) AfterApply(context *kong.Context, c *topazCC.CommonCtx) error

func (*DirectoryCmd) Run

func (cmd *DirectoryCmd) Run(c *cc.CommonCtx) error

type ServiceOptions added in v0.8.4

type ServiceOptions interface {
	Override(svc x.Service, overrides clients.Overrides)
	RequireToken()
}

type TenantCmd

type TenantCmd struct {
	Get  TenantGetCmd  `cmd:"" help:""`
	List TenantListCmd `cmd:"" help:""`
	Exec TenantExecCmd `cmd:"" help:""`
}

func (*TenantCmd) BeforeApply

func (cmd *TenantCmd) BeforeApply(context *kong.Context) error

func (*TenantCmd) Run

func (cmd *TenantCmd) Run(c *cc.CommonCtx) error

type TenantExecCmd added in v0.20.7

type TenantExecCmd struct {
	Update tenant.UpdateConnectionCmd `cmd:"" help:"update connection configuration fields"`
	Verify tenant.VerifyConnectionCmd `cmd:"" help:"verify connection settings"`
	Sync   tenant.SyncConnectionCmd   `cmd:"" help:"trigger sync of IDP connection"`
}

type TenantGetCmd added in v0.20.7

type TenantGetCmd struct {
	Account    tenant.GetAccountCmd    `cmd:"" help:"get account info"`
	Connection tenant.GetConnectionCmd `cmd:"" help:"get connection instance info"`
	Provider   tenant.GetProviderCmd   `cmd:"" help:"get provider info"`
}

type TenantListCmd added in v0.20.7

type TenantListCmd struct {
	Connections      tenant.ListConnectionsCmd      `cmd:"" help:"list connections"`
	PolicyReferences tenant.ListPolicyReferencesCmd `cmd:"" help:"list policy references"`
	ProviderKinds    tenant.ListProviderKindsCmd    `cmd:"" help:"list provider kinds"`
	Providers        tenant.ListProvidersCmd        `cmd:"" help:"list providers"`
}

type UserCmd

type UserCmd struct {
	Get UserGetCmd `cmd:"" help:"get info | token |"`
}

func (*UserCmd) BeforeApply

func (cmd *UserCmd) BeforeApply(so ServiceOptions) error

func (*UserCmd) Run

func (cmd *UserCmd) Run(c *cc.CommonCtx) error

type UserGetCmd added in v0.20.7

type UserGetCmd struct {
	Profile           user.InfoCmd `cmd:"" help:"user profile"`
	AccessToken       user.GetCmd  `cmd:"" help:"access token"`
	TenantID          user.GetCmd  `cmd:"" help:"tenant ID"`
	AuthorizerKey     user.GetCmd  `cmd:"" help:"authorizer key"`
	DirectoryReadKey  user.GetCmd  `cmd:"" help:"directory read key"`
	DirectoryWriteKey user.GetCmd  `cmd:"" help:"directory write key"`
	DiscoveryKey      user.GetCmd  `cmd:"" help:"discovery key"`
	RegistryReadKey   user.GetCmd  `cmd:"" help:"registry read key"`
	RegistryWriteKey  user.GetCmd  `cmd:"" help:"registry write key"`
	DecisionLogsKey   user.GetCmd  `cmd:"" help:"decision logs key"`
	Token             user.GetCmd  `cmd:"" help:"token" hidden:""`
}

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (cmd *VersionCmd) Run(c *cc.CommonCtx) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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