client

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyResourceClient = emptyResourceClient{}

EmptyResourceClient is a ResourceClient with always exists and dose nothing

Functions

This section is empty.

Types

type AppClient

type AppClient interface {
	ResourceClient
	Data() (projectModel.App, error)
	SetData(app projectModel.App) error
}

AppClient interacts with a Rancher app resource

type CatalogClient added in v1.3.0

type CatalogClient interface {
	ResourceClient
	Data() (rancherModel.Catalog, error)
	SetData(catalog rancherModel.Catalog) error
}

CatalogClient interacts with a Rancher catalog resource

type CertificateClient

type CertificateClient interface {
	NamespacedResourceClient
	Data() (projectModel.Certificate, error)
	SetData(certificate projectModel.Certificate) error
}

CertificateClient interacts with a Rancher certificate resource

type ClusterClient

type ClusterClient interface {
	ResourceClient
	Project(projectName string) (ProjectClient, error)
	Projects() ([]ProjectClient, error)
	StorageClass(name string) (StorageClassClient, error)
	StorageClasses() ([]StorageClassClient, error)
	PersistentVolume(name string) (PersistentVolumeClient, error)
	PersistentVolumes() ([]PersistentVolumeClient, error)
	Namespace(name, projectName string) (NamespaceClient, error)
	Namespaces(projectName string) ([]NamespaceClient, error)
	Catalog(string) (CatalogClient, error)
	Catalogs() ([]CatalogClient, error)
	// contains filtered or unexported methods
}

ClusterClient interacts with a Rancher cluster resource

type ConfigMapClient

type ConfigMapClient interface {
	NamespacedResourceClient
	Data() (projectModel.ConfigMap, error)
	SetData(configMap projectModel.ConfigMap) error
}

ConfigMapClient interacts with a Rancher config map or secret resource

type CronJobClient

type CronJobClient interface {
	NamespacedResourceClient
	Data() (projectModel.CronJob, error)
	SetData(job projectModel.CronJob) error
}

CronJobClient interacts with a Rancher cron job resource

type DaemonSetClient

type DaemonSetClient interface {
	NamespacedResourceClient
	Data() (projectModel.DaemonSet, error)
	SetData(daemonSet projectModel.DaemonSet) error
}

DaemonSetClient interacts with a Rancher daemon set resource

type DeploymentClient

type DeploymentClient interface {
	NamespacedResourceClient
	Data() (projectModel.Deployment, error)
	SetData(deployment projectModel.Deployment) error
}

DeploymentClient interacts with a Rancher deployment resource

type DockerCredentialClient

type DockerCredentialClient interface {
	NamespacedResourceClient
	Data() (projectModel.DockerCredential, error)
	SetData(dockerCredential projectModel.DockerCredential) error
}

DockerCredentialClient interacts with a Rancher docker credential resource

type JobClient

type JobClient interface {
	NamespacedResourceClient
	Data() (projectModel.Job, error)
	SetData(job projectModel.Job) error
}

JobClient interacts with a Rancher job resource

type NamespaceClient

type NamespaceClient interface {
	ResourceClient
	HasProject() (bool, error)
	Data() (projectModel.Namespace, error)
	SetData(namespace projectModel.Namespace) error
}

NamespaceClient interacts with a Rancher namespace resource

type NamespacedResourceClient

type NamespacedResourceClient interface {
	ResourceClient
	NamespaceID() (string, error)
	Namespace() (string, error)
}

NamespacedResourceClient is a client to any Rancher resource belonging to a namespace

type PersistentVolumeClient

type PersistentVolumeClient interface {
	ResourceClient
	Data() (projectModel.PersistentVolume, error)
	SetData(persistentVolume projectModel.PersistentVolume) error
}

PersistentVolumeClient interacts with a Rancher persistent volume resource

type ProjectClient

type ProjectClient interface {
	ResourceClient
	ClusterID() (string, error)
	Namespace(name string) (NamespaceClient, error)
	Namespaces() ([]NamespaceClient, error)
	GlobalCertificate(name string) (CertificateClient, error)
	GlobalCertificates() ([]CertificateClient, error)
	Certificate(name, namespaceName string) (CertificateClient, error)
	Certificates(namespaceName string) ([]CertificateClient, error)
	ConfigMap(name, namespaceName string) (ConfigMapClient, error)
	ConfigMaps(namespaceName string) ([]ConfigMapClient, error)
	GlobalDockerCredential(name string) (DockerCredentialClient, error)
	GlobalDockerCredentials() ([]DockerCredentialClient, error)
	DockerCredential(name, namespaceName string) (DockerCredentialClient, error)
	DockerCredentials(namespaceName string) ([]DockerCredentialClient, error)
	GlobalSecret(name string) (ConfigMapClient, error)
	GlobalSecrets() ([]ConfigMapClient, error)
	Secret(name, namespaceName string) (ConfigMapClient, error)
	Secrets(namespaceName string) ([]ConfigMapClient, error)
	App(name string) (AppClient, error)
	Apps() ([]AppClient, error)
	Job(name, namespaceName string) (JobClient, error)
	Jobs(namespaceName string) ([]JobClient, error)
	CronJob(name, namespaceName string) (CronJobClient, error)
	CronJobs(namespaceName string) ([]CronJobClient, error)
	Deployment(name, namespaceName string) (DeploymentClient, error)
	Deployments(namespaceName string) ([]DeploymentClient, error)
	DaemonSet(name, namespaceName string) (DaemonSetClient, error)
	DaemonSets(namespaceName string) ([]DaemonSetClient, error)
	StatefulSet(name, namespaceName string) (StatefulSetClient, error)
	StatefulSets(namespaceName string) ([]StatefulSetClient, error)
	Catalog(string) (CatalogClient, error)
	Catalogs() ([]CatalogClient, error)
	// contains filtered or unexported methods
}

ProjectClient interacts with a Rancher project resource

type RancherClient

type RancherClient interface {
	Cluster(clusterName string) (ClusterClient, error)
	Clusters() ([]ClusterClient, error)
	Catalog(string) (CatalogClient, error)
	Catalogs() ([]CatalogClient, error)
	// contains filtered or unexported methods
}

RancherClient is comunicating with the Rancher server

func NewRancherClient

func NewRancherClient(config RancherConfig) (RancherClient, error)

NewRancherClient creates a new rancher client

type RancherConfig

type RancherConfig struct {
	RancherURL   string
	AccessKey    string
	SecretKey    string
	Insecure     bool
	CACerts      string
	MergeAnswers bool
}

RancherConfig holds the configuration data to interact with a rancher server

type ResourceClient

type ResourceClient interface {
	ID() (string, error)
	Name() (string, error)
	Exists() (bool, error)
	Create() error
	Upgrade() error
	Delete() error
}

ResourceClient is a client to any Rancher resource

type StatefulSetClient

type StatefulSetClient interface {
	NamespacedResourceClient
	Data() (projectModel.StatefulSet, error)
	SetData(statefulSet projectModel.StatefulSet) error
}

StatefulSetClient interacts with a Rancher stateful set resource

type StorageClassClient

type StorageClassClient interface {
	ResourceClient
	Data() (projectModel.StorageClass, error)
	SetData(storageClass projectModel.StorageClass) error
}

StorageClassClient interacts with a Rancher storage class resource

Jump to

Keyboard shortcuts

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