client

package
v0.0.0-...-80edec6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCertificate is raised when a supplied certificate isn't
	// in the right format etc.
	ErrCertificate = errors.New("certificate error")

	// ErrAuthentication is raised when something goes wrong with authentication.
	ErrAuthentication = errors.New("authentication error")
)

Functions

func New

func New(ctx context.Context, options *Options) (*api.APIClient, error)

New returns a new ArgoCD client initialized with a service token.

Types

type Options

type Options struct {
	// Host is the hostname to connect to.
	Host string

	// Username is the user to connect as.
	Username string

	// Password is the user's password.
	Password string

	// CA is the certificate to verify the connection against.
	// This is a single PEM encoded X.509 certificate.
	CA []byte

	// UserAgent allows the user agent to be overridden.
	UserAgent string
}

Options define client options to define the connection.

Jump to

Keyboard shortcuts

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