Documentation ¶
Index ¶
- Constants
- func HandleErrorRetry(client *Client, err error) (bool, error)
- func WithCommonAPI(config model.Config) (*kubeClient.Client, error)
- func WithMock(config model.Config) (*kubeClient.Client, error)
- func WithTestAPI(config model.Config) (*kubeClient.Client, error)
- type Client
- func (client *Client) Auth() error
- func (client *Client) CreateConfigMap(ns string, config configmap.ConfigMap) error
- func (client *Client) CreateDeployment(ns string, depl deployment.Deployment) error
- func (client *Client) CreateDeploymentContainer(ns, deplName string, cont container.Container) error
- func (client *Client) CreateIngress(ns string, ingr ingress.Ingress) error
- func (client *Client) CreateService(ns string, serv service.Service) error
- func (client *Client) DeleteAccess(ns, username string) error
- func (client *Client) DeleteConfigmap(namespace, cm string) error
- func (client *Client) DeleteDeployment(namespace, deplName string) error
- func (client *Client) DeleteDeploymentContainer(ns, deplName, cont string) error
- func (client *Client) DeleteIngress(ns, domain string) error
- func (client *Client) DeleteNamespace(ID string) error
- func (client *Client) DeletePod(namespace, pod string) error
- func (client *Client) DeleteService(namespace, service string) error
- func (client *Client) DeleteSolution(namespace, solutionName string) error
- func (client *Client) DeleteVolume(namespaceID, volumeName string) error
- func (client *Client) Extend() error
- func (client *Client) GetAccess(nsName string) (access.AccessList, error)
- func (client *Client) GetConfigmap(namespace, cmName string) (configmap.ConfigMap, error)
- func (client *Client) GetConfigmapList(namespace string) (configmap.ConfigMapList, error)
- func (client *Client) GetDeployment(namespace, deplName string) (deployment.Deployment, error)
- func (client *Client) GetDeploymentList(namespace string) (deployment.DeploymentList, error)
- func (client *Client) GetDeploymentVersions(namespaceID, deploymentName string) (deployment.DeploymentList, error)
- func (client *Client) GetIngress(ns, domain string) (ingress.Ingress, error)
- func (client *Client) GetIngressList(ns string) (ingress.IngressList, error)
- func (client *Client) GetNamespace(ID string) (namespace.Namespace, error)
- func (client *Client) GetNamespaceList() (namespace.NamespaceList, error)
- func (client *Client) GetPod(ns, podname string) (pod.Pod, error)
- func (client *Client) GetPodList(ns string) (pod.PodList, error)
- func (client *Client) GetPodLogs(params client.GetPodLogsParams) (io.ReadCloser, error)
- func (client *Client) GetProfile() (user.User, error)
- func (client *Client) GetRunningSolution(namespace, solutionName string) (solution.Solution, error)
- func (client *Client) GetRunningSolutionsList(namespace string) (solution.SolutionsList, error)
- func (client *Client) GetService(namespace, serviceName string) (service.Service, error)
- func (client *Client) GetServiceList(namespace string) (service.ServiceList, error)
- func (client *Client) GetSolutionDeployments(namespace, solutionName string) (deployment.DeploymentList, error)
- func (client *Client) GetSolutionServices(namespace, solutionName string) (service.ServiceList, error)
- func (client *Client) GetSolutionsTemplatesEnvs(template, branch string) (model.SolutionEnv, error)
- func (client *Client) GetSolutionsTemplatesList() (solution.TemplatesList, error)
- func (client *Client) GetVolume(namespaceID, volumeName string) (volume.Volume, error)
- func (client *Client) GetVolumeList(namespaceID string) (volume.VolumeList, error)
- func (client *Client) Init(setup KubeAPIclientSetup) error
- func (client *Client) IsInitialized() bool
- func (client *Client) Login() error
- func (client *Client) ReInit() error
- func (client *Client) RenameNamespace(ID, newName string) error
- func (client *Client) ReplaceConfigmap(namespaceID string, cm configmap.ConfigMap) error
- func (client *Client) ReplaceDeployment(ns string, newDepl deployment.Deployment) error
- func (client *Client) ReplaceDeploymentContainer(ns, deplName string, cont container.Container) error
- func (client *Client) ReplaceIngress(ns string, ingr ingress.Ingress) error
- func (client *Client) ReplaceService(ns string, serv service.Service) error
- func (client *Client) RunSolution(sol solution.Solution) error
- func (client *Client) SetAccess(ns, username string, acc model.AccessLevel) error
- func (client *Client) SetContainerImage(ns, depl string, image kubeModels.UpdateImage) error
- func (client *Client) SetReplicas(ns, depl string, n uint64) error
- type GetPodLogsParams
- type KubeAPIclientSetup
Constants ¶
View Source
const ( // ErrUnableToLogin -- unable to login ErrUnableToLogin chkitErrors.Err = "unable to login" // ErrUnableToRefreshToken -- unable to refresh token ErrUnableToRefreshToken chkitErrors.Err = "unable to refresh token" // ErrWrongPasswordLoginCombination -- wrong login-password combination ErrWrongPasswordLoginCombination chkitErrors.Err = "wrong login-password combination" // ErrUserNotExist -- user doesn't not exist ErrUserNotExist chkitErrors.Err = "user doesn't not exist" ErrInternalError chkitErrors.Err = "internal server error" )
View Source
const ( ErrYouDoNotHaveAccessToResource chkitErrors.Err = "you don't have access to resource" ErrResourceNotExists chkitErrors.Err = "resource not exists" ErrFatalError chkitErrors.Err = "fatal error" )
View Source
const ( ErrUnableToRunAllSolutionComponents chkitErrors.Err = "unable to run all solution components" ErrSolutionNotExists chkitErrors.Err = "solution not exists\n" )
View Source
const (
ErrContainerAlreadyExists chkitErrors.Err = "container already exists in deployment"
)
View Source
const ( // ErrUnableToInitClient -- unable to init client ErrUnableToInitClient chkitErrors.Err = "unable to init client" )
Variables ¶
This section is empty.
Functions ¶
func WithCommonAPI ¶
func WithCommonAPI(config model.Config) (*kubeClient.Client, error)
WithCommonAPI -- creates kube-client for production api
func WithMock ¶
func WithMock(config model.Config) (*kubeClient.Client, error)
WithMock -- creates kube-client with mock API
func WithTestAPI ¶
func WithTestAPI(config model.Config) (*kubeClient.Client, error)
WithTestAPI -- creates kube-client for test api
Types ¶
type Client ¶
Client -- chkit core client
func (*Client) Auth ¶
Auth -- refreshes tokens, on invalid token uses Login method to get new tokens
func (*Client) CreateConfigMap ¶
func (*Client) CreateDeployment ¶
func (client *Client) CreateDeployment(ns string, depl deployment.Deployment) error
func (*Client) CreateDeploymentContainer ¶
func (*Client) CreateIngress ¶
func (*Client) CreateService ¶
func (*Client) DeleteAccess ¶
func (*Client) DeleteConfigmap ¶
func (*Client) DeleteDeployment ¶
func (*Client) DeleteDeploymentContainer ¶
func (*Client) DeleteIngress ¶
func (*Client) DeleteNamespace ¶
func (*Client) DeleteService ¶
func (*Client) DeleteSolution ¶
func (*Client) DeleteVolume ¶
func (*Client) GetAccess ¶
func (client *Client) GetAccess(nsName string) (access.AccessList, error)
func (*Client) GetConfigmap ¶
func (*Client) GetConfigmapList ¶
func (client *Client) GetConfigmapList(namespace string) (configmap.ConfigMapList, error)
func (*Client) GetDeployment ¶
func (client *Client) GetDeployment(namespace, deplName string) (deployment.Deployment, error)
func (*Client) GetDeploymentList ¶
func (client *Client) GetDeploymentList(namespace string) (deployment.DeploymentList, error)
func (*Client) GetDeploymentVersions ¶
func (client *Client) GetDeploymentVersions(namespaceID, deploymentName string) (deployment.DeploymentList, error)
func (*Client) GetIngress ¶
func (*Client) GetIngressList ¶
func (client *Client) GetIngressList(ns string) (ingress.IngressList, error)
func (*Client) GetNamespace ¶
GetNamespace -- returns info of namespace with given label. Returns:
- ErrNamespaceNotExists
- ErrWrongPasswordLoginCombination
- ErrUserNotExist
func (*Client) GetNamespaceList ¶
func (client *Client) GetNamespaceList() (namespace.NamespaceList, error)
func (*Client) GetPodLogs ¶
func (client *Client) GetPodLogs(params client.GetPodLogsParams) (io.ReadCloser, error)
func (*Client) GetRunningSolution ¶
func (*Client) GetRunningSolutionsList ¶
func (client *Client) GetRunningSolutionsList(namespace string) (solution.SolutionsList, error)
func (*Client) GetService ¶
func (*Client) GetServiceList ¶
func (client *Client) GetServiceList(namespace string) (service.ServiceList, error)
func (*Client) GetSolutionDeployments ¶
func (client *Client) GetSolutionDeployments(namespace, solutionName string) (deployment.DeploymentList, error)
func (*Client) GetSolutionServices ¶
func (client *Client) GetSolutionServices(namespace, solutionName string) (service.ServiceList, error)
func (*Client) GetSolutionsTemplatesEnvs ¶
func (client *Client) GetSolutionsTemplatesEnvs(template, branch string) (model.SolutionEnv, error)
func (*Client) GetSolutionsTemplatesList ¶
func (client *Client) GetSolutionsTemplatesList() (solution.TemplatesList, error)
func (*Client) GetVolumeList ¶
func (client *Client) GetVolumeList(namespaceID string) (volume.VolumeList, error)
func (*Client) Init ¶
func (client *Client) Init(setup KubeAPIclientSetup) error
func (*Client) IsInitialized ¶
func (*Client) RenameNamespace ¶
func (*Client) ReplaceConfigmap ¶
func (*Client) ReplaceDeployment ¶
func (client *Client) ReplaceDeployment(ns string, newDepl deployment.Deployment) error
func (*Client) ReplaceDeploymentContainer ¶
func (*Client) ReplaceIngress ¶
func (*Client) ReplaceService ¶
func (*Client) SetAccess ¶
func (client *Client) SetAccess(ns, username string, acc model.AccessLevel) error
func (*Client) SetContainerImage ¶
func (client *Client) SetContainerImage(ns, depl string, image kubeModels.UpdateImage) error
type GetPodLogsParams ¶
type GetPodLogsParams = client.GetPodLogsParams
type KubeAPIclientSetup ¶
type KubeAPIclientSetup func(model.Config) (*kubeClient.Client, error)
KubeAPIclientSetup -- creates new kube-client with provided config
Click to show internal directories.
Click to hide internal directories.