client

package
v1.1.1-0...-9418116 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const TokenEndpoint = "/auth/token"

TokenEndpoint is the endpoint where to get a token from

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreatePublicCluster(name, server, caCert, adminToken string) (int, error)
	CreateUserCluster(name, server, caCert, encryptedToken string, networkPolicyEnabled bool) (int, error)
	CreateSpace(name, key string, projectID int, cluster *latest.Cluster) (int, error)
	CreateProject(projectName string) (int, error)

	DeleteCluster(cluster *latest.Cluster, key string, deleteServices, deleteKubeContexts bool) error
	DeleteSpace(space *latest.Space, key string) (bool, error)

	GetRegistries() ([]*latest.Registry, error)
	GetClusterByName(clusterName string) (*latest.Cluster, error)
	GetClusters() ([]*latest.Cluster, error)
	GetProjects() ([]*latest.Project, error)
	GetClusterUser(clusterID int) (*latest.ClusterUser, error)
	GetServiceAccount(space *latest.Space, key string) (*latest.ServiceAccount, error)
	GetSpaces() ([]*latest.Space, error)
	GetSpace(spaceID int) (*latest.Space, error)
	GetSpaceByName(spaceName string) (*latest.Space, error)
	VerifyKey(clusterID int, key string) (bool, error)
	Settings(encryptToken string) ([]Setting, error)

	GetToken() (string, error)

	UseDefaultClusterDomain(clusterID int, key string) (string, error)
	UpdateClusterDomain(clusterID int, domain string) error
	DeployIngressController(clusterID int, key string, useHostNetwork bool) error
	DeployAdmissionController(clusterID int, key string) error
	DeployGatekeeper(clusterID int, key string) error
	DeployGatekeeperRules(clusterID int, key string) error
	DeployCertManager(clusterID int, key string) error
	InitCore(clusterID int, key string, enablePodPolicy bool) error
	UpdateUserClusterUser(clusterUserID int, encryptedToken []byte) error
	ResumeSpace(spaceID int, key string, cluster *latest.Cluster) (bool, error)
}

Client can communicate with the graphql-server of the cloud

func NewClient

func NewClient(providerName, host, accessKey, token string) Client

NewClient creates a new instance of the interface Client

type Setting

type Setting struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

Setting is a setting object in a server response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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