cmd

package
v0.20.5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizerCmd

type AuthorizerCmd struct {
	EvalDecision authorizer.EvalDecisionCmd `cmd:"" help:"evaluate policy decision" group:"authorizer"`
	DecisionTree authorizer.DecisionTreeCmd `cmd:"" help:"get decision tree" group:"authorizer"`
	ExecQuery    authorizer.ExecQueryCmd    `cmd:"" help:"execute query" group:"authorizer"`
	Compile      authorizer.CompileCmd      `cmd:"" help:"compile query" group:"authorizer"`
	GetPolicy    authorizer.GetPolicyCmd    `cmd:"" help:"get policy" group:"authorizer"`
	ListPolicies authorizer.ListPoliciesCmd `cmd:"" help:"list policies" group:"authorizer"`

	AuthorizerOverrides AuthorizerOptions `embed:"" envprefix:"ASERTO_AUTHORIZER_"`
}

func (*AuthorizerCmd) AfterApply added in v0.8.0

func (cmd *AuthorizerCmd) AfterApply(so ServiceOptions) 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
}

func (*AuthorizerOptions) Address added in v0.8.0

func (ao *AuthorizerOptions) Address() string

type CLI

type CLI struct {
	Authorizer   AuthorizerCmd   `cmd:"" aliases:"a" help:"authorizer commands"`
	Tenant       TenantCmd       `cmd:"" aliases:"t" help:"tenant commands"`
	DecisionLogs DecisionLogsCmd `cmd:"" aliases:"l" help:"decision logs commands"`
	Developer    DeveloperCmd    `cmd:"" aliases:"x" help:"developer commands"`
	ControlPlane ControlPlaneCmd `cmd:"" aliases:"p" help:"control plane commands"`
	User         UserCmd         `cmd:"" aliases:"u" help:"user commands"`
	Login        user.LoginCmd   `cmd:"" help:"login"`
	Logout       user.LogoutCmd  `cmd:"" help:"logout"`
	Config       ConfigCmd       `cmd:"" aliases:"c" help:"configuration commands"`
	Version      VersionCmd      `cmd:"" help:"version information"`

	// ConfigFileMapper implements the `type:"conf"` tag.
	Cfg            string `name:"config" short:"c" type:"conf" env:"ASERTO_ENV" 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 {
	GetTenant config.GetTenantCmd `cmd:"" help:"get tenant list" group:"config"`
	SetTenant config.SetTenantCmd `cmd:"" help:"set default tenant" group:"config"`
	GetEnv    config.GetEnvCmd    `cmd:"" help:"get environment info" group:"config"`
}

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 {
	ListConnections           controlplane.ListConnectionsCmd           `cmd:"" help:"list edge authorizer connections" group:"control-plane"`
	ClientCert                controlplane.ClientCertCmd                `cmd:"" help:"get client certificates for an edge authorizer connection" group:"control-plane"`
	ListInstanceRegistrations controlplane.ListInstanceRegistrationsCmd `cmd:"" help:"list instance registrations" group:"control-plane"`
	Discovery                 controlplane.DiscoveryCmd                 `cmd:"" help:"run discovery on a registered instance" group:"control-plane"`
	EdgeDirSync               controlplane.EdgeDirSyncCmd               `cmd:"" help:"sync the directory on an edge authorizer" group:"control-plane"`
}

func (*ControlPlaneCmd) Run added in v0.8.10

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

type DecisionLogsCmd added in v0.8.0

type DecisionLogsCmd struct {
	List      decision_logs.ListCmd      `cmd:"" help:"list available decision log files" group:"decision-logs"`
	Get       decision_logs.GetCmd       `cmd:"" help:"download one or more decision log files" group:"decision-logs"`
	ListUsers decision_logs.ListUsersCmd `cmd:"" help:"list available user data files" group:"decision-logs"`
	GetUser   decision_logs.GetUserCmd   `cmd:"" help:"download one or more user data files" group:"decision-logs"`
	Stream    decision_logs.StreamCmd    `cmd:"" help:"stream decision log events to stdout" group:"decision-logs"`

	SvcOpts ConnectionOptions `embed:"" envprefix:"ASERTO_DECISION_LOGS_"`
}

func (*DecisionLogsCmd) AfterApply added in v0.8.0

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

func (*DecisionLogsCmd) Run added in v0.8.0

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

type DeveloperCmd

type DeveloperCmd struct {
	Start             dev.StartCmd          `cmd:"" group:"developer" help:"start sidecar instance"`
	Stop              dev.StopCmd           `cmd:"" group:"developer" help:"stop sidecar instance"`
	Status            dev.StatusCmd         `cmd:"" group:"developer" help:"status of sidecar instance"`
	Update            dev.UpdateCmd         `cmd:"" group:"developer" help:"download the latest aserto sidecar image"`
	Console           dev.ConsoleCmd        `cmd:"" group:"developer" help:"launch web console"`
	Configure         dev.ConfigureCmd      `cmd:"" group:"developer" help:"configure a policy"`
	PolicyFromOpenAPI dev.PolicyFromOpenAPI `cmd:"" group:"developer" help:"generate an open api policy"`
	Install           dev.InstallCmd        `cmd:"" group:"developer" help:"install aserto sidecar"`
	Uninstall         dev.UninstallCmd      `cmd:"" group:"developer" help:"uninstall aserto sidecar, removes all locally installed artifacts"`
}

func (*DeveloperCmd) Run

func (cmd *DeveloperCmd) 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 {
	GetAccount           tenant.GetAccountCmd           `cmd:"" group:"tenant" help:"get account info"`
	ListConnections      tenant.ListConnectionsCmd      `cmd:"" group:"tenant" help:"list connections"`
	GetConnection        tenant.GetConnectionCmd        `cmd:"" group:"tenant" help:"get connection instance info"`
	UpdateConnection     tenant.UpdateConnectionCmd     `cmd:"" group:"tenant" help:"update connection configuration fields"`
	VerifyConnection     tenant.VerifyConnectionCmd     `cmd:"" group:"tenant" help:"verify connection settings"`
	SyncConnection       tenant.SyncConnectionCmd       `cmd:"" group:"tenant" help:"trigger sync of IDP connection"`
	ListPolicyReferences tenant.ListPolicyReferencesCmd `cmd:"" group:"tenant" help:"list policy references"`
	ListProviderKinds    tenant.ListProviderKindsCmd    `cmd:"" group:"tenant" help:"list provider kinds"`
	ListProviders        tenant.ListProvidersCmd        `cmd:"" group:"tenant" help:"list providers"`
	GetProvider          tenant.GetProviderCmd          `cmd:"" group:"tenant" help:"get provider info"`
}

func (*TenantCmd) Run

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

type UserCmd

type UserCmd struct {
	Info user.InfoCmd `cmd:"" group:"user" help:"get user profile information"`
	Get  user.GetCmd  `cmd:"" group:"user" help:"get property"`
}

func (*UserCmd) BeforeApply

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

func (*UserCmd) Run

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

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