access

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MPL-2.0 Imports: 27 Imported by: 0

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.

func WithContext

func WithContext(f func(ctx context.Context) error) error

WithContext wraps with CLI context.

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.

Jump to

Keyboard shortcuts

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