Documentation ¶
Overview ¶
Package access contains commands related to API access for the CLI.
Index ¶
Constants ¶
View Source
const ( // EndpointEnvVar is the name of the environment variable that contains the Omni endpoint. EndpointEnvVar = "OMNI_ENDPOINT" // ServiceAccountKeyEnvVar is the name of the environment variable that contains the base64-encoded service account key JSON. ServiceAccountKeyEnvVar = "OMNI_SERVICE_ACCOUNT_KEY" )
View Source
const ServiceAccountKeyEnvVar = "OMNI_SERVICE_ACCOUNT_KEY"
ServiceAccountKeyEnvVar is the name of the environment variable that contains the base64-encoded service account key JSON.
Variables ¶
View Source
var CmdFlags struct { Omniconfig string Context string }
CmdFlags contains the common CLI flags.
Functions ¶
func WithClient ¶
func WithClient(f func(ctx context.Context, client *client.Client) error, clientOpts ...ClientOption) error
WithClient initializes the Omni API client.
Types ¶
type ClientOption ¶
type ClientOption func(*clientOptions)
ClientOption is a functional option for the client.
func WithSkipAuth ¶
func WithSkipAuth(skipAuth bool) ClientOption
WithSkipAuth configures the client to skip the authentication interception.
type ServiceAccountKey ¶
type ServiceAccountKey struct { // Name is the name (identity) of the service account key. Name string `json:"name"` // PGPKey is the armored PGP private key. PGPKey string `json:"pgp_key"` }
ServiceAccountKey is the JSON representation of a service account key.
Click to show internal directories.
Click to hide internal directories.