Documentation
¶
Index ¶
- type AvailableSolution
- type AvailableSolutionsList
- type CheckTokenResponse
- type ConfigFile
- type ConfigMap
- type Container
- type ContainerPort
- type ContainerVolume
- type CreateVolume
- type Deployment
- type DeploymentStatus
- type Env
- type Ingress
- type Login
- type Namespace
- type Path
- type Pod
- type PodStatus
- type Protocol
- type Resource
- type ResourceUpdateName
- type ResourceUpdateUserAccess
- type Resources
- type Rule
- type RunSolutionResponce
- type Secret
- type Service
- type ServicePort
- type ServiceType
- type SolutionEnv
- type SolutionLimits
- type SolutionResources
- type Tokens
- type UpdateImage
- type UpdateNamespaceName
- type UpdateReplicas
- type User
- type UserData
- type UserHeaderData
- type UserSolution
- type UserSolutionsList
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailableSolution ¶ added in v0.11.3
type AvailableSolution struct {
Name string `json:"name"`
Limits *SolutionLimits `json:"limits"`
Images []string `json:"images"`
URL string `json:"url"`
Active bool
}
AvailableSolution -- solution which user can run
swagger:model
func (AvailableSolution) Copy ¶ added in v0.11.3
func (solution AvailableSolution) Copy() AvailableSolution
type AvailableSolutionsList ¶ added in v0.11.3
type AvailableSolutionsList struct {
Solutions []AvailableSolution `json:"solutions"`
}
AvailableSolutionsList -- list of available solutions
swagger:model
func (AvailableSolutionsList) Copy ¶ added in v0.11.3
func (list AvailableSolutionsList) Copy() AvailableSolutionsList
func (AvailableSolutionsList) Filter ¶ added in v0.11.3
func (list AvailableSolutionsList) Filter(pred func(AvailableSolution) bool) AvailableSolutionsList
func (AvailableSolutionsList) Get ¶ added in v0.11.3
func (list AvailableSolutionsList) Get(i int) AvailableSolution
func (AvailableSolutionsList) Len ¶ added in v0.11.3
func (list AvailableSolutionsList) Len() int
type CheckTokenResponse ¶
type CheckTokenResponse struct {
Access struct {
Namespace []Resource `json:"namespace"`
Volume []Resource `json:"volume"`
} `json:"access"`
}
CheckTokenResponse --
type ConfigFile ¶ added in v0.11.3
type ConfigMap ¶
type ConfigMap struct {
// required: true
Name string `json:"name"`
//creation date in RFC3339 format
CreatedAt *string `json:"created_at,omitempty"`
// key-value data
//
// required: true
Data map[string]string `json:"data"`
}
ConfigMap -- model for config map
swagger:model
type Container ¶
type Container struct {
// required: true
Image string `json:"image"`
// required: true
Name string `json:"name"`
// required: true
Limits Resource `json:"limits"`
Env []Env `json:"env,omitempty"`
Commands []string `json:"commands,omitempty"`
Ports []ContainerPort `json:"ports,omitempty"`
VolumeMounts []ContainerVolume `json:"volume_mounts,omitempty"`
ConfigMaps []ContainerVolume `json:"config_maps,omitempty"`
}
Container -- model for container in deployment
swagger:model
type ContainerPort ¶
type ContainerPort struct {
// required: true
Name string `json:"name"`
// required: true
Port int `json:"port"`
// required: true
Protocol Protocol `json:"protocol"`
}
ContainerPort -- model for port in container
swagger:model
type ContainerVolume ¶
type ContainerVolume struct {
// required: true
Name string `json:"name"`
Mode *string `json:"mode,omitempty"`
// required: true
MountPath string `json:"mount_path"`
SubPath *string `json:"sub_path,omitempty"`
}
ContainerVolume -- volume (or config map) mounted in container
swagger:model
type CreateVolume ¶
CreateVolume --
type Deployment ¶
type Deployment struct {
Status *DeploymentStatus `json:"status,omitempty"`
// required: true
Containers []Container `json:"containers"`
// required: true
Name string `json:"name"`
// required: true
Replicas int `json:"replicas"`
//total CPU usage by all containers in this deployment
TotalCPU uint `json:"total_cpu,omitempty"`
//total RAM usage by all containers in this deployment
TotalMemory uint `json:"total_memory,omitempty"`
}
Deployment -- model for deployments
swagger:model
type DeploymentStatus ¶
type DeploymentStatus struct {
//creation date in RFC3339 format
CreatedAt string `json:"created_at"`
//update date in RFC3339 format
UpdatedAt string `json:"updated_at"`
Replicas int `json:"replicas"`
ReadyReplicas int `json:"ready_replicas"`
AvailableReplicas int `json:"available_replicas"`
UpdatedReplicas int `json:"updated_replicas"`
}
DeploymentStatus -- kubernetes status of deployment
swagger:model
type Env ¶
type Env struct {
// required: true
Value string `json:"value"`
// required: true
Name string `json:"name"`
}
Env -- key-value pair of enviroment variables
swagger:model
type Ingress ¶
type Ingress struct {
// required: true
Name string `json:"name"`
//creation date in RFC3339 format
CreatedAt *string `json:"created_at,omitempty"`
// required: true
Rules []Rule `json:"rules"`
}
Ingress -- model for ingress
swagger:model
type Login ¶
type Login struct {
Login string `json:"login"`
Password string `json:"password"`
Recaptcha *string `json:"recaptcha,omitempty"`
}
Login --
type Namespace ¶
type Namespace struct {
//creation date in RFC3339 format
CreatedAt *string `json:"created_at,omitempty"`
// user-visible label for the namespace
Label string `json:"label,omitempty"`
Access string `json:"access,omitempty"`
MaxExtService *uint `json:"max_ext_service,omitempty"`
MaxIntService *uint `json:"max_int_service,omitempty"`
MaxTraffic *uint `json:"max_traffic,omitempty"`
Volumes []Volume `json:"volumes,omitempty"`
// required: true
Resources Resources `json:"resources"`
}
Namespace -- namespace representation provided by resource-service https://ch.pages.containerum.net/api-docs/modules/resource-service/index.html#get-namespace
swagger:model
type Path ¶
type Path struct {
// required: true
Path string `json:"path"`
// required: true
ServiceName string `json:"service_name"`
// required: true
ServicePort int `json:"service_port"`
}
Path -- ingress path
swagger:model
type Pod ¶
type Pod struct {
Name string `json:"name"`
Containers []Container `json:"containers"`
ImagePullSecret *map[string]string `json:"image_pull_secret,omitempty"`
Status *PodStatus `json:"status,omitempty"`
Hostname *string `json:"hostname,omitempty"`
Deploy *string `json:"deploy,omitempty"`
//total CPU usage by all containers in this pod
TotalCPU uint `json:"total_cpu,omitempty"`
//total RAM usage by all containers in this pod
TotalMemory uint `json:"total_memory,omitempty"`
//creation date in RFC3339 format
CreatedAt *string `json:"created_at,omitempty"`
}
Pod -- model for pod
swagger:model
type PodStatus ¶
type PodStatus struct {
Phase string `json:"phase"`
RestartCount int `json:"restart_count"`
//pod start date in RFC3339 format
StartAt string `json:"start_at"`
}
PodStatus -- kubernetes status of pod
swagger:model
type Resource ¶
type Resource struct {
// CPU in m
//
// required: true
CPU uint `json:"cpu"`
// RAM in Mi
//
// required: true
Memory uint `json:"memory"`
}
Resource -- represents namespace CPU and RAM
swagger:model
type ResourceUpdateName ¶
type ResourceUpdateName struct {
Label string `json:"label"`
}
ResourceUpdateName -- containes new resource name
type ResourceUpdateUserAccess ¶
type ResourceUpdateUserAccess struct {
Username string `json:"username"`
Access string `json:"access,omitempty"`
}
ResourceUpdateUserAccess -- containes user access data
type Resources ¶
type Resources struct {
// Hard resource limits
//
// required: true
Hard Resource `json:"hard"`
Used *Resource `json:"used,omitempty"`
}
Resources -- represents namespace limits and user resources,
swagger:model
type Rule ¶
type Rule struct {
// required: true
Host string `json:"host"`
TLSSecret *string `json:"tls_secret,omitempty"`
// required: true
Path []Path `json:"path"`
}
Rule -- ingress rule
swagger:model
type RunSolutionResponce ¶ added in v0.11.3
type RunSolutionResponce struct {
Created int `json:"created"`
NotCreated int `json:"not_created"`
Errors []string `json:"errors,omitempty"`
}
RunSolutionResponce -- responce to run solution request
swagger:model
type Secret ¶
type Secret struct {
// required: true
Name string `json:"name"`
//creation date in RFC3339 format
CreatedAt *string `json:"created_at,omitempty"`
// required: true
Data map[string]string `json:"data"`
}
model for secret
swagger:model
type Service ¶
type Service struct {
// required: true
Name string `json:"name"`
//creation date in RFC3339 format
CreatedAt *string `json:"created_at,omitempty"`
Deploy string `json:"deploy,omitempty"`
IPs []string `json:"ips,omitempty"`
Domain string `json:"domain,omitempty"`
// required: true
Ports []ServicePort `json:"ports"`
}
represents service
swagger:model
type ServicePort ¶
type ServicePort struct {
// required: true
Name string `json:"name"`
Port *int `json:"port,omitempty"`
// required: true
TargetPort int `json:"target_port"`
// required: true
Protocol Protocol `json:"protocol"`
}
represent service port
swagger:model
type SolutionResources ¶ added in v0.11.3
SolutionResources -- list of solution resources
swagger:model
func (SolutionResources) Copy ¶ added in v0.11.3
func (res SolutionResources) Copy() SolutionResources
type Tokens ¶
type Tokens struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
}
Tokens --
type UpdateImage ¶
type UpdateImage struct {
// required: true
Container string `json:"container_name"`
// required: true
Image string `json:"image"`
}
UpdateImage -- model for update container image request
swagger:model
type UpdateNamespaceName ¶
type UpdateNamespaceName struct {
// required: true
Label string `json:"label"`
}
UpdateNamespaceName -- contains new namespace label
swagger:model
type UpdateReplicas ¶
type UpdateReplicas struct {
// required: true
Replicas int `json:"replicas"`
}
UpdateReplicas -- contains new number of replicas
swagger:model
type User ¶
type User struct {
Login string `json:"login"`
Data UserData `json:"data"`
ID string `json:"id"`
IsActive bool `json:"is_active"`
CreatedAt string `json:"created_at"`
}
User --
type UserData ¶
type UserData struct {
Email string `json:"email"`
Address string `json:"address"`
Phone string `json:"phone"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
IsOrganization bool `json:"is_organization"`
TaxCode string `json:"tax_code"`
Company string `json:"company"`
}
UserData --
type UserHeaderData ¶
type UserHeaderData struct {
// hosting-internal name
// required: true
ID string `json:"id"`
// user-visible label for the object
// required: true
Label string `json:"label"`
// one of: "owner", "read", "write", "read-delete", "none"
// required: true
Access string `json:"access"`
}
represents header data for X-User-Namespace and X-User-Volume headers (encoded in base64)
type UserSolution ¶ added in v0.11.3
type UserSolution struct {
Branch string `json:"branch"`
Env map[string]string `json:"env"`
// required: true
Template string `json:"template"`
// required: true
Name string `json:"name"`
// required: true
Namespace string `json:"namespace"`
}
UserSolution -- running solution
swagger:model
func (UserSolution) Copy ¶ added in v0.11.3
func (solution UserSolution) Copy() UserSolution
type UserSolutionsList ¶ added in v0.11.3
type UserSolutionsList struct {
Solutions []UserSolution `json:"solutions"`
}
UserSolutionsList -- list of running solution
swagger:model
func (UserSolutionsList) Copy ¶ added in v0.11.3
func (list UserSolutionsList) Copy() UserSolutionsList
func (UserSolutionsList) Get ¶ added in v0.11.3
func (list UserSolutionsList) Get(i int) UserSolution
func (UserSolutionsList) Len ¶ added in v0.11.3
func (list UserSolutionsList) Len() int
type Volume ¶
type Volume struct {
CreateTime time.Time `json:"create_time"`
Label string `json:"label"`
Access string `json:"access"`
AccessChangeTime time.Time `json:"access_change_time"`
Storage int `json:"storage"`
Replicas int `json:"replicas"`
}
Volume -- volume representation provided by resource-service https://ch.pages.containerum.net/api-docs/modules/resource-service/index.html#get-namespace