Documentation
¶
Index ¶
- type CheckTokenResponse
- 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 Secret
- type Service
- type ServicePort
- type ServiceType
- type Tokens
- type UpdateImage
- type UpdateNamespaceName
- type UpdateReplicas
- type User
- type UserData
- type UserHeaderData
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckTokenResponse ¶
type CheckTokenResponse struct {
Access struct {
Namespace []Resource `json:"namespace"`
Volume []Resource `json:"volume"`
} `json:"access"`
}
CheckTokenResponse --
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 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 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 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