cmd

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func LogAuditIDTransportWrapper added in v0.36.0

func LogAuditIDTransportWrapper(rt http.RoundTripper) http.RoundTripper

func SetLogLevel added in v0.8.0

func SetLogLevel(ctx context.Context, lookupEnv func(string) (string, bool)) (plog.Logger, error)

Types

type OIDCClientOptions added in v0.31.0

type OIDCClientOptions interface {
	WithContext(ctx context.Context) oidcclient.Option
	WithLoginLogger(logger oidcclient.Logger) oidcclient.Option
	WithListenPort(port uint16) oidcclient.Option
	WithSkipBrowserOpen() oidcclient.Option
	WithSkipListen() oidcclient.Option
	WithSkipPrintLoginURL() oidcclient.Option
	WithSessionCache(cache oidcclient.SessionCache) oidcclient.Option
	WithClient(httpClient *http.Client) oidcclient.Option
	WithScopes(scopes []string) oidcclient.Option
	WithRequestAudience(audience string) oidcclient.Option
	WithLoginFlow(loginFlow v1alpha1.IDPFlow, flowSource string) oidcclient.Option
	WithUpstreamIdentityProvider(upstreamName, upstreamType string) oidcclient.Option
}

OIDCClientOptions is an interface that wraps the creation of Options for the purpose of making them more friendly to unit tests. Because the Option type refers to a private struct type, it is hard to create mocks for them in tests of other packages. This provides a seam that can be mocked. No need for this interface to include deprecated options (such as WithLogger), since those should never be invoked.

Jump to

Keyboard shortcuts

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