clientcfg

package
v0.0.4-rc6 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoConfig = errors.New("no config found")

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	clientaccess.Info

	ID                 string  `json:"id,omitempty"`
	Checksum           string  `json:"-"`
	Name               string  `json:"name,omitempty"`
	DefaultStackName   string  `json:"defaultStackName,omitempty"`
	DefaultProjectName string  `json:"defaultProjectName,omitempty"`
	Default            bool    `json:"default,omitempty"`
	Config             *Config `json:"-"`

	File string `json:"-"`
	// contains filtered or unexported fields
}

func ListClusters

func ListClusters(dir string) ([]Cluster, error)

func (*Cluster) Client

func (c *Cluster) Client() (*projectclient.Client, error)

func (*Cluster) CreateProject

func (c *Cluster) CreateProject(name string) (*Project, error)

func (*Cluster) Domain

func (c *Cluster) Domain() (string, error)

func (*Cluster) Kubectl

func (c *Cluster) Kubectl(namespace, command string, args ...string) error

func (*Cluster) KubectlCmd

func (c *Cluster) KubectlCmd(namespace, command string, args ...string) (*exec.Cmd, error)

func (*Cluster) Project

func (c *Cluster) Project() (*Project, error)

func (*Cluster) Projects

func (c *Cluster) Projects() ([]Project, error)

type Config

type Config struct {
	Home        string
	ClusterName string
	ProjectName string
	Debug       bool
	Wait        bool
	WaitTimeout int
	WaitState   string
	ServerURL   string
	Token       string
	// contains filtered or unexported fields
}

func (*Config) ClientDir

func (c *Config) ClientDir() string

func (*Config) Cluster

func (c *Config) Cluster() (*Cluster, error)

func (*Config) ClusterClient

func (c *Config) ClusterClient() (*projectclient.Client, error)

func (*Config) ClusterDir

func (c *Config) ClusterDir() string

func (*Config) Clusters

func (c *Config) Clusters() ([]Cluster, error)

func (*Config) DefaultClusterName

func (c *Config) DefaultClusterName() (string, error)

func (*Config) KubeconfigCache

func (c *Config) KubeconfigCache() string

func (*Config) Project

func (c *Config) Project() (*Project, error)

func (*Config) ProjectClient

func (c *Config) ProjectClient() (*client.Client, error)

func (*Config) SaveCluster

func (c *Config) SaveCluster(cluster *Cluster, validate bool) error

func (*Config) Validate

func (c *Config) Validate() error

type Project

type Project struct {
	projectclient.Project
	Cluster *Cluster
	Default bool
	// contains filtered or unexported fields
}

func (*Project) Client

func (w *Project) Client() (*client.Client, error)

Jump to

Keyboard shortcuts

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