Documentation
¶
Index ¶
- type Client
- func (client *Client) AddIngress(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) CreateDeployment(namespace string, deployment model.Deployment) error
- func (client *Client) CreateService(namespace string, service model.Service) (model.Service, error)
- func (client *Client) DeleteAccess(volumeName, username string) error
- func (client *Client) DeleteDeployment(namespace, deployment string) error
- func (client *Client) DeleteIngress(namespace, domain string) error
- func (client *Client) DeleteNamespace(namespace string) error
- func (client *Client) DeleteNamespaceAccess(namespace, username string) error
- func (client *Client) DeletePod(namespace, pod string) error
- func (client *Client) DeleteService(namespace, serviceName string) error
- func (client *Client) DeleteVolume(volumeName string) error
- func (client *Client) ExtendToken(refreshToken string) (model.Tokens, error)
- func (client *Client) GetDeployment(namespace, deployment string) (model.Deployment, error)
- func (client *Client) GetDeploymentList(namespace string) ([]model.Deployment, error)
- func (client *Client) GetIngress(namespace, domain string) (model.Ingress, error)
- func (client *Client) GetIngressList(namespace string) ([]model.Ingress, error)
- func (client *Client) GetNamespace(ns string) (model.Namespace, error)
- func (client *Client) GetNamespaceList(queries map[string]string) ([]model.Namespace, error)
- func (client *Client) GetPod(namespace, pod string) (model.Pod, error)
- func (client *Client) GetPodList(namespace string) ([]model.Pod, error)
- func (client *Client) GetPodLogs(params GetPodLogsParams) (*io.PipeReader, error)
- func (client *Client) GetProfileInfo() (model.User, error)
- func (client *Client) GetService(namespace, serviceName string) (model.Service, error)
- func (client *Client) GetServiceList(namespace string) ([]model.Service, error)
- func (client *Client) GetSolutionList() (model.AvailableSolutionsList, error)
- func (client *Client) GetVolume(volumeName string) (model.Volume, error)
- func (client *Client) GetVolumeList(filter *string) ([]model.Volume, error)
- func (client *Client) Login(login model.Login) (model.Tokens, error)
- func (client *Client) RenameNamespace(namespace, newName string) error
- func (client *Client) RenameVolume(volumeName, newName string) error
- func (client *Client) ReplaceDeployment(namespace string, deployment model.Deployment) error
- func (client *Client) ResourceGetNamespace(namespace string) (model.Namespace, error)
- func (client *Client) ResourceGetNamespaceList(page, perPage uint64) ([]model.Namespace, error)
- func (client *Client) RunSolution(solution model.UserSolution) (model.RunSolutionResponce, error)
- func (client *Client) SetContainerImage(namespace, deployment string, updateImage model.UpdateImage) error
- func (client *Client) SetFingerprint(fingerprint string)
- func (client *Client) SetNamespaceAccess(namespace, username, access string) error
- func (client *Client) SetReplicas(namespace, deployment string, replicas int) error
- func (client *Client) SetToken(token string)
- func (client *Client) SetVolumeAccess(volumeName string, accessData model.ResourceUpdateUserAccess) error
- func (client *Client) UpdateIngress(namespace, domain string, ingress model.Ingress) error
- func (client *Client) UpdateService(namespace string, service model.Service) (model.Service, error)
- type Config
- type GetPodLogsParams
- type ListOptions
- 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) CreateDeployment ¶
func (client *Client) CreateDeployment(namespace string, deployment model.Deployment) error
CreateDeployment -- consumes a namespace, an user ID and a Role, returns nil if OK
func (*Client) CreateService ¶
CreateService -- consumes a namespace name and a Service data, returns the created Service AND nil OR an uninitialized Service AND an error
func (*Client) DeleteAccess ¶
DeleteAccess -- deletes user Volume access
func (*Client) DeleteDeployment ¶
DeleteDeployment -- consumes a namespace, a deployment, an user role and an ID
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) 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) GetDeployment ¶
func (client *Client) GetDeployment(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) GetDeploymentList ¶
func (client *Client) GetDeploymentList(namespace string) ([]model.Deployment, error)
GetDeploymentList -- consumes a namespace and a deployment names, returns a list of Deployments OR nil slice AND an error
func (*Client) GetIngress ¶
GetIngressList -- returns ingress with specified domain.
func (*Client) GetIngressList ¶
GetIngressList -- returns list of ingresses.
func (*Client) GetNamespace ¶
GetNamespace return namespace by Name
func (*Client) GetNamespaceList ¶
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 ¶
GetServiceList -- consumes a namespace name returns a slice of Services OR a nil slice AND an error
func (*Client) GetSolutionList ¶ added in v0.11.3
func (client *Client) GetSolutionList() (model.AvailableSolutionsList, error)
GetSolutionList -- returns list of public solutions
func (*Client) GetVolumeList ¶
GetVolumeList -- get list of volumes, consumes optional user ID and filter parameters. Returns new_access_level as access if user role = user. Should have filters: not deleted, limited, not limited, owner, not owner.
func (*Client) RenameNamespace ¶
RenameNamespace -- renames user namespace Consumes namespace name and new name.
func (*Client) RenameVolume ¶
RenameVolume -- change volume name
func (*Client) ReplaceDeployment ¶
func (client *Client) ReplaceDeployment(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 ¶
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) RunSolution ¶ added in v0.11.3
func (client *Client) RunSolution(solution model.UserSolution) (model.RunSolutionResponce, error)
func (*Client) SetContainerImage ¶
func (client *Client) SetContainerImage(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 ¶
SetNamespaceAccess -- sets/changes access to namespace for provided user
func (*Client) SetReplicas ¶
SetReplicas -- sets or changes deployment replicas
func (*Client) SetVolumeAccess ¶
func (client *Client) SetVolumeAccess(volumeName string, accessData model.ResourceUpdateUserAccess) error
SetVolumeAccess -- sets User Volume access
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