ic

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	EC *cmd.ExecutionContext

	// APIServer is the inventory api server endpoint
	APIServer string

	// APIClient is an inventory server api client
	APIClient apiclient.ClientWithResponsesInterface

	// OIDC is the OIDC settings
	OIDC OIDCConfig

	// OIDC is the OIDC provider settings
	OIDCProvider *oidc.Provider

	// Authenticator is the Authenticator
	Authenticator authentication.Authenticator

	// TokenCache is the token cache
	TokenCache tokencache.Cache

	// Quiet is a flag indicating whether to suppress CLI-output
	Quiet bool
}

func NewContext

func NewContext() *Context

func (*Context) SetupDefaultAPIClient

func (ac *Context) SetupDefaultAPIClient(token string) (err error)

SetupDefaultAPIClient sets up ec.APIClient from flags if it's not already set

func (*Context) SetupDefaultAuthenticator

func (ac *Context) SetupDefaultAuthenticator()

SetupDefaultAuthenticator sets up ec.Authenticator from flags if it's not already set It should be called from rootCmd.PersistentPreRunE

func (*Context) SetupDefaultOIDCProvider

func (ac *Context) SetupDefaultOIDCProvider()

SetupDefaultOIDCProvider sets up ec.OIDCProvider from flags if it's not already set It should be called from rootCmd.PersistentPreRunE

func (*Context) SetupDefaultTokenCache

func (ac *Context) SetupDefaultTokenCache() (err error)

SetupDefaultTokenCache sets up ec.TokenCache from flags if it's not already set It should be called from rootCmd.PersistentPreRunE

type OIDCConfig

type OIDCConfig struct {
	IssuerURL                   string
	ClientID                    string
	GrantType                   string
	RedirectURLHostname         string
	RedirectURIAuthCodeKeyboard string
	AuthBindAddr                string
	TokenCacheDir               string
}

OIDCConfig holds flag values for OIDC settings

Jump to

Keyboard shortcuts

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