Documentation ¶
Index ¶
- type Client
- func (client *Client) AddIngress(project, namespace string, ingress model.Ingress) error
- func (client *Client) ChangePassword(currentPassword, newPassword string) (model.Tokens, error)
- func (client *Client) CheckToken(token string) (model.CheckTokenResponse, error)
- func (client *Client) CreateConfigMap(project, namespace, name string, data model.ConfigMapData) error
- func (client *Client) CreateDeployment(project, namespace string, deployment model.Deployment) error
- func (client *Client) CreateService(project, namespace string, service model.Service) (model.Service, error)
- func (client *Client) DeleteConfigMap(project, namespace, name string) error
- func (client *Client) DeleteDeployment(project, namespace, deployment string) error
- func (client *Client) DeleteDeploymentVersion(namespace, deployment string, version semver.Version) error
- func (client *Client) DeleteIngress(project, namespace, domain string) error
- func (client *Client) DeleteNamespace(project, namespace string) error
- func (client *Client) DeleteNamespaceAccess(project, namespace, username string) error
- func (client *Client) DeletePod(project, namespace, pod string) error
- func (client *Client) DeleteService(project, namespace, serviceName string) error
- func (client *Client) DeleteSolution(project, namespace, solutionName string) error
- func (client *Client) DeleteVolume(project, namespace, volumeName string) error
- func (client *Client) ExtendToken(refreshToken string) (model.Tokens, error)
- func (client *Client) GetConfigMap(project, namespace, name string) (ret model.ConfigMap, err error)
- func (client *Client) GetConfigMapList(project, namespace string) (ret []model.ConfigMap, err error)
- func (client *Client) GetDeloymentVersionBetweenVersions(namespace, deployment string, leftVersion, rightVersion semver.Version) (string, error)
- func (client *Client) GetDeployment(project, namespace, deployment string) (model.Deployment, error)
- func (client *Client) GetDeploymentDiffWithPreviousVersion(namespace, deployment string, version semver.Version) (string, error)
- func (client *Client) GetDeploymentList(project, namespace string) (model.DeploymentsList, error)
- func (client *Client) GetDeploymentVersions(project, namespace, deplName string) (model.DeploymentsList, error)
- func (client *Client) GetIngress(project, namespace, domain string) (model.Ingress, error)
- func (client *Client) GetIngressList(project, namespace string) (model.IngressesList, error)
- func (client *Client) GetNamespace(project, ns string) (model.Namespace, error)
- func (client *Client) GetNamespaceAccesses(project, namespace string) ([]model.UserAccess, error)
- func (client *Client) GetNamespaceList(project string) (model.NamespacesList, error)
- func (client *Client) GetPod(project, namespace, pod string) (model.Pod, error)
- func (client *Client) GetPodList(project, namespace string) (model.PodsList, error)
- func (client *Client) GetPodLogs(params GetPodLogsParams) (*io.PipeReader, error)
- func (client *Client) GetProfileInfo() (model.User, error)
- func (client *Client) GetService(project, namespace, serviceName string) (model.Service, error)
- func (client *Client) GetServiceList(project, namespace string) (model.ServicesList, error)
- func (client *Client) GetSolution(project, namespace, solutionName string) (model.UserSolution, error)
- func (client *Client) GetSolutionDeployments(project, namespace, solutionName string) (model.DeploymentsList, error)
- func (client *Client) GetSolutionServices(project, namespace, solutionName string) (model.ServicesList, error)
- func (client *Client) GetSolutionsNamespaceList(project, namespace string) (model.UserSolutionsList, error)
- func (client *Client) GetSolutionsTemplateEnv(templateName, branch string) (model.SolutionEnv, error)
- func (client *Client) GetSolutionsTemplateResources(templateName string) (model.SolutionResources, error)
- func (client *Client) GetSolutionsTemplatesList() (model.AvailableSolutionsList, error)
- func (client *Client) GetVolume(project, namespace, volumeName string) (model.Volume, error)
- func (client *Client) GetVolumeList(project, namespace string) (model.VolumesList, error)
- func (client *Client) Login(login model.Login) (model.Tokens, error)
- func (client *Client) RenameNamespace(project, namespace, newName string) error
- func (client *Client) ReplaceDeployment(project, namespace string, deployment model.Deployment) error
- func (client *Client) ResourceGetNamespace(project, namespace string) (model.Namespace, error)
- func (client *Client) ResourceGetNamespaceList(project string, page, perPage uint64) (model.NamespacesList, error)
- func (client *Client) RunDeploymentVersion(project, namespace, deplName string, version semver.Version) error
- func (client *Client) RunSolution(solution model.UserSolution, project, namespace, branch string) (model.RunSolutionResponse, error)
- func (client *Client) SetContainerImage(project, namespace, deployment string, updateImage model.UpdateImage) error
- func (client *Client) SetFingerprint(fingerprint string)
- func (client *Client) SetNamespaceAccess(project, namespace, username string, access model.UserGroupAccess) error
- func (client *Client) SetReplicas(project, namespace, deployment string, replicas int) error
- func (client *Client) SetToken(token string)
- func (client *Client) UpdateConfigMap(project, namespace, name string, data model.ConfigMapData) error
- func (client *Client) UpdateIngress(project, namespace, domain string, ingress model.Ingress) error
- func (client *Client) UpdateService(project, namespace string, service model.Service) (model.Service, error)
- type Config
- type GetPodLogsParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Config
}
Client - rest client
func (*Client) AddIngress ¶
AddIngress -- adds ingress to provided namespace
func (*Client) ChangePassword ¶
ChangePassword -- changes user password, returns access and refresh tokens
func (*Client) CheckToken ¶
func (client *Client) CheckToken(token string) (model.CheckTokenResponse, error)
CheckToken -- consumes JWT token, user fingerprint If they're correct returns user access data: list of namespaces and list of volumes OR uninitialized structure AND error
func (*Client) CreateConfigMap ¶ added in v0.11.5
func (client *Client) CreateConfigMap(project, namespace, name string, data model.ConfigMapData) error
CreateConfigMap -- creates a ConfigMap in provided namespace.
func (*Client) CreateDeployment ¶
func (client *Client) CreateDeployment(project, namespace string, deployment model.Deployment) error
CreateDeployment -- consumes a namespace, an user ID and a Role, returns nil if OK
func (*Client) CreateService ¶
func (client *Client) CreateService(project, namespace string, service model.Service) (model.Service, error)
CreateService -- consumes a namespace name and a Service data, returns the created Service AND nil OR an uninitialized Service AND an error
func (*Client) DeleteConfigMap ¶ added in v0.11.5
DeleteConfigMap -- deletes ConfigMap by name in provided namespace
func (*Client) DeleteDeployment ¶
DeleteDeployment -- consumes a namespace, a deployment, an user role and an ID
func (*Client) DeleteDeploymentVersion ¶ added in v0.23.10
func (*Client) DeleteIngress ¶
DeleteIngress -- deletes ingress on provided domain
func (*Client) DeleteNamespace ¶
DeleteNamespace -- deletes provided namespace
func (*Client) DeleteNamespaceAccess ¶
DeleteNamespaceAccess -- deletes user access to namespace
func (*Client) DeleteService ¶
DeleteService -- consumes a namespace, a servicce name, returns error in case of problem
func (*Client) DeleteSolution ¶ added in v0.22.0
GetSolution -- returns user running solutions
func (*Client) DeleteVolume ¶
DeleteVolume -- deletes Volume with provided volume name
func (*Client) ExtendToken ¶
ExtendToken -- consumes refresh JWT token and user fingerprint If they're correct returns new extended access and refresh token OR void tokens AND error. Old access and refresh token become inactive.
func (*Client) GetConfigMap ¶ added in v0.11.5
func (client *Client) GetConfigMap(project, namespace, name string) (ret model.ConfigMap, err error)
GetConfigMap -- retrieves ConfigMap by name from provided namespace.
func (*Client) GetConfigMapList ¶ added in v0.11.5
func (client *Client) GetConfigMapList(project, namespace string) (ret []model.ConfigMap, err error)
GetConfigMapList -- returns all ConfigMap`s in namespace.
func (*Client) GetDeloymentVersionBetweenVersions ¶ added in v0.23.8
func (*Client) GetDeployment ¶
func (client *Client) GetDeployment(project, namespace, deployment string) (model.Deployment, error)
GetDeployment -- consumes a namespace and a deployment names, returns a Deployment data OR uninitialized struct AND an error
func (*Client) GetDeploymentDiffWithPreviousVersion ¶ added in v0.23.8
func (*Client) GetDeploymentList ¶
func (client *Client) GetDeploymentList(project, namespace string) (model.DeploymentsList, error)
GetDeploymentList -- consumes a namespace and a deployment names, returns a list of Deployments OR nil slice AND an error
func (*Client) GetDeploymentVersions ¶ added in v0.20.2
func (client *Client) GetDeploymentVersions(project, namespace, deplName string) (model.DeploymentsList, error)
Returns list of defferent deployment versions
func (*Client) GetIngress ¶
GetIngressList -- returns ingress with specified domain.
func (*Client) GetIngressList ¶
func (client *Client) GetIngressList(project, namespace string) (model.IngressesList, error)
GetIngressList -- returns list of ingresses.
func (*Client) GetNamespace ¶
GetNamespace return namespace by ID
func (*Client) GetNamespaceAccesses ¶ added in v0.14.1
func (client *Client) GetNamespaceAccesses(project, namespace string) ([]model.UserAccess, error)
func (*Client) GetNamespaceList ¶
func (client *Client) GetNamespaceList(project string) (model.NamespacesList, error)
GetNamespaceList return namespace list. Can use query filters: owner
func (*Client) GetPodList ¶
GetPodList -- returns list of pods in provided namespace
func (*Client) GetPodLogs ¶
func (client *Client) GetPodLogs(params GetPodLogsParams) (*io.PipeReader, error)
func (*Client) GetProfileInfo ¶
GetProfileInfo -- returns user info
func (*Client) GetService ¶
GetService -- consume a namespace id and a service name returns a Service OR an uninitialized Service struct AND an error
func (*Client) GetServiceList ¶
func (client *Client) GetServiceList(project, namespace string) (model.ServicesList, error)
GetServiceList -- consumes a namespace name returns a slice of Services OR a nil slice AND an error
func (*Client) GetSolution ¶ added in v0.22.0
func (client *Client) GetSolution(project, namespace, solutionName string) (model.UserSolution, error)
GetSolution -- returns user running solutions
func (*Client) GetSolutionDeployments ¶ added in v0.22.0
func (client *Client) GetSolutionDeployments(project, namespace, solutionName string) (model.DeploymentsList, error)
GetSolutionDeployments -- returns user solution deployments
func (*Client) GetSolutionServices ¶ added in v0.22.0
func (client *Client) GetSolutionServices(project, namespace, solutionName string) (model.ServicesList, error)
GetSolutionServices -- returns user solution deployments
func (*Client) GetSolutionsNamespaceList ¶ added in v0.23.2
func (client *Client) GetSolutionsNamespaceList(project, namespace string) (model.UserSolutionsList, error)
GetSolutionsList -- returns list of users running solutions in namespace
func (*Client) GetSolutionsTemplateEnv ¶ added in v0.22.0
func (client *Client) GetSolutionsTemplateEnv(templateName, branch string) (model.SolutionEnv, error)
GetSolutionsTemplateEnv -- returns list of public solution template envs
func (*Client) GetSolutionsTemplateResources ¶ added in v0.22.0
func (client *Client) GetSolutionsTemplateResources(templateName string) (model.SolutionResources, error)
GetSolutionsTemplateResources -- returns count of public solution template resources
func (*Client) GetSolutionsTemplatesList ¶ added in v0.22.0
func (client *Client) GetSolutionsTemplatesList() (model.AvailableSolutionsList, error)
GetSolutionsTemplatesList -- returns list of public solutions templates
func (*Client) GetVolumeList ¶
func (client *Client) GetVolumeList(project, namespace string) (model.VolumesList, error)
GetVolumeList -- get list of volumes, consumes optional user ID and filter parameters. Returns new_access_level as access if user role = user.
func (*Client) RenameNamespace ¶
RenameNamespace -- renames user namespace Consumes namespace name and new name.
func (*Client) ReplaceDeployment ¶
func (client *Client) ReplaceDeployment(project, namespace string, deployment model.Deployment) error
ReplaceDeployment -- replaces deployment in provided namespace with new one
func (*Client) ResourceGetNamespace ¶
ResourceGetNamespace -- consumes a namespace returns a namespace data OR an error
func (*Client) ResourceGetNamespaceList ¶
func (client *Client) ResourceGetNamespaceList(project string, page, perPage uint64) (model.NamespacesList, error)
ResourceGetNamespaceList -- consumes a page number parameter, amount of namespaces per page and optional userID, returns a slice of Namespaces OR a nil slice AND an error
func (*Client) RunDeploymentVersion ¶ added in v0.20.2
func (client *Client) RunDeploymentVersion(project, namespace, deplName string, version semver.Version) error
Create pods from deployment with specific version
func (*Client) RunSolution ¶ added in v0.11.3
func (client *Client) RunSolution(solution model.UserSolution, project, namespace, branch string) (model.RunSolutionResponse, error)
RunSolution -- creates new solution
func (*Client) SetContainerImage ¶
func (client *Client) SetContainerImage(project, namespace, deployment string, updateImage model.UpdateImage) error
SetContainerImage -- set or changes deployment container image Consumes namespace, deployment and container data
func (*Client) SetFingerprint ¶
SetFingerprint -- sets fingerprint
func (*Client) SetNamespaceAccess ¶
func (client *Client) SetNamespaceAccess(project, namespace, username string, access model.UserGroupAccess) error
SetNamespaceAccess -- sets/changes access to namespace for provided user
func (*Client) SetReplicas ¶
SetReplicas -- sets or changes deployment replicas
func (*Client) UpdateConfigMap ¶ added in v0.11.5
func (client *Client) UpdateConfigMap(project, namespace, name string, data model.ConfigMapData) error
UpdateConfigMap -- rewrites ConfigMap by name in provided namespace.
func (*Client) UpdateIngress ¶
UpdateIngress -- updates ingress on provided domain with new one
type Config ¶
Config -- provides configuration for Client If APIurl or ResourceAddr is void, trys to get them from envvars