access

package
v0.37.5 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MPL-2.0 Imports: 14 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"
)

Variables

View Source
var CmdFlags struct {
	Omniconfig            string
	Context               string
	InsecureSkipTLSVerify bool
}

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.

Jump to

Keyboard shortcuts

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