apiclient

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetaDataTokenKey = "token"
	// EnvArgoCDServer is the environment variable to look for an Argo CD server address
	EnvArgoCDServer = "ARGOCD_SERVER"
	// EnvArgoCDAuthToken is the environment variable to look for an Argo CD auth token
	EnvArgoCDAuthToken = "ARGOCD_AUTH_TOKEN"
	// MaxGRPCMessageSize contains max grpc message size
	MaxGRPCMessageSize = 100 * 1024 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.4.2

type Client interface {
	ClientOptions() ClientOptions
	HTTPClient() (*http.Client, error)
	OIDCConfig(context.Context, *settings.Settings) (*oauth2.Config, *oidc.Provider, error)
	NewRepoClient() (io.Closer, repository.RepositoryServiceClient, error)
	NewRepoClientOrDie() (io.Closer, repository.RepositoryServiceClient)
	NewClusterClient() (io.Closer, cluster.ClusterServiceClient, error)
	NewClusterClientOrDie() (io.Closer, cluster.ClusterServiceClient)
	NewApplicationClient() (io.Closer, application.ApplicationServiceClient, error)
	NewApplicationClientOrDie() (io.Closer, application.ApplicationServiceClient)
	NewSessionClient() (io.Closer, session.SessionServiceClient, error)
	NewSessionClientOrDie() (io.Closer, session.SessionServiceClient)
	NewSettingsClient() (io.Closer, settings.SettingsServiceClient, error)
	NewSettingsClientOrDie() (io.Closer, settings.SettingsServiceClient)
	NewVersionClient() (io.Closer, version.VersionServiceClient, error)
	NewVersionClientOrDie() (io.Closer, version.VersionServiceClient)
	NewProjectClient() (io.Closer, project.ProjectServiceClient, error)
	NewProjectClientOrDie() (io.Closer, project.ProjectServiceClient)
	NewAccountClient() (io.Closer, account.AccountServiceClient, error)
	NewAccountClientOrDie() (io.Closer, account.AccountServiceClient)
	WatchApplicationWithRetry(ctx context.Context, appName string) chan *argoappv1.ApplicationWatchEvent
}

Client defines an interface for interaction with an Argo CD server.

func NewClient

func NewClient(opts *ClientOptions) (Client, error)

NewClient creates a new API client from a set of config options.

func NewClientOrDie

func NewClientOrDie(opts *ClientOptions) Client

NewClientOrDie creates a new API client from a set of config options, or fails fatally if the new client creation fails.

type ClientOptions

type ClientOptions struct {
	ServerAddr string
	PlainText  bool
	Insecure   bool
	CertFile   string
	AuthToken  string
	ConfigPath string
	Context    string
	UserAgent  string
	GRPCWeb    bool
}

ClientOptions hold address, security, and other settings for the API client.

Jump to

Keyboard shortcuts

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