model

package
v0.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 4 Imported by: 118

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLevel added in v0.13.2

type AccessLevel string
const (
	Owner      AccessLevel = "owner"
	Write      AccessLevel = "write"
	ReadDelete AccessLevel = "read-delete"
	Read       AccessLevel = "read"
	None       AccessLevel = "none"
)

func LevelFromString added in v0.13.2

func LevelFromString(str string) (AccessLevel, error)

func Levels added in v0.13.2

func Levels() []AccessLevel

func (AccessLevel) MarshalText added in v0.13.2

func (lvl AccessLevel) MarshalText() ([]byte, error)

func (AccessLevel) String added in v0.13.2

func (lvl AccessLevel) String() string

func (*AccessLevel) UnmarshalText added in v0.13.2

func (lvl *AccessLevel) UnmarshalText(p []byte) error

type AvailableSolution added in v0.11.3

type AvailableSolution struct {
	ID     string          `json:"id,omitempty"`
	Name   string          `json:"name"`
	Limits *SolutionLimits `json:"limits"`
	Images []string        `json:"images"`
	URL    string          `json:"url"`
	Active bool            `json:"active,omitempty"`
}

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 (AvailableSolutionsList) Filter added in v0.11.3

func (AvailableSolutionsList) Get added in v0.11.3

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 ConfigFile struct {
	Name string `json:"config_file"`
	Type string `json:"type"`
}

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 ConfigMapData `json:"data"`
}

ConfigMap -- model for config map

swagger:model

type ConfigMapData added in v0.12.0

type ConfigMapData map[string]string

ConfigMapData -- model for config map data

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"`
	PersistentVolumeClaimName *string `json:"pvc_name,omitempty"`
}

ContainerVolume -- volume (or config map) mounted in container

swagger:model

type CreateVolume

type CreateVolume struct {
	TariffID string `json:"tariff-id"`
	Label    string `json:"label"`
}

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"`
	UnavailableReplicas int    `json:"unavailable_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 environment 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"`
	ID        string  `json:"id,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

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 Permission added in v0.13.2

type Permission struct {
	TariffID      string       `json:"tariff_id"`
	Label         string       `json:"label"`
	Access        string       `json:"access"`
	RAM           int          `json:"ram"`
	CPU           int          `json:"cpu"`
	MaxExtService int          `json:"max_ext_service"`
	MaxIntService int          `json:"max_int_service"`
	Users         []UserAccess `json:"users"`
}

func (Permission) GetAccess added in v0.13.2

func (perm Permission) GetAccess(username string) (UserAccess, bool)

func (Permission) HasAccess added in v0.13.2

func (perm Permission) HasAccess(username string) bool

type PersistentVolumeAccessMode added in v0.14.3

type PersistentVolumeAccessMode string
const (
	// can be mounted read/write mode to exactly 1 host
	ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce"
	// can be mounted in read-only mode to many hosts
	ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany"
	// can be mounted in read/write mode to many hosts
	ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany"
)

type PersistentVolumeClaim added in v0.14.3

type PersistentVolumeClaim struct {
	// required: true
	Name string `json:"name"`
	//creation date in RFC3339 format
	CreatedAt *string `json:"created_at,omitempty"`
	// required: true
	StorageClass string `json:"storage_class"`
	// required: true
	AccessMode PersistentVolumeAccessMode `json:"access_mode"`
	// required: true
	Capacity uint `json:"capacity"`
}

PersistentVolumeClaim -- persistent volume claim representation

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 Protocol

type Protocol string

represents port protocol type (TCP or UDP)

swagger:model

const (
	// UDP net protocol
	UDP Protocol = "UDP"
	// TCP net protocol
	TCP Protocol = "TCP"
)

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 -- contains new resource name

type ResourceUpdateUserAccess

type ResourceUpdateUserAccess struct {
	Username string `json:"username"`
	Access   string `json:"access,omitempty"`
}

ResourceUpdateUserAccess -- contains 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 RunSolutionResponse added in v0.15.0

type RunSolutionResponse struct {
	Created    int      `json:"created"`
	NotCreated int      `json:"not_created"`
	Errors     []string `json:"errors,omitempty"`
}

RunSolutionResponse -- response 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 ServiceType

type ServiceType string

represents service type

swagger:model

type SolutionEnv added in v0.11.3

type SolutionEnv struct {
	Env map[string]string `json:"env"`
}

SolutionEnv -- solution environment variables

swagger:model

type SolutionLimits added in v0.11.3

type SolutionLimits struct {
	CPU string `json:"cpu"`
	RAM string `json:"ram"`
}

SolutionLimits -- solution resources limits

swagger:model

type SolutionResources added in v0.11.3

type SolutionResources struct {
	Resources map[string]int `json:"resources"`
}

SolutionResources -- list of solution resources

swagger:model

func (SolutionResources) Copy added in v0.11.3

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 UserAccess added in v0.13.2

type UserAccess struct {
	Username    string      `json:"username"`
	AccessLevel AccessLevel `json:"access_level"`
}

func (UserAccess) String added in v0.13.2

func (access UserAccess) String() string

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 AccessLevel `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 {
	ID     string            `json:"id,omitempty"`
	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 (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 {
	ID               string    `json:"id"`
	CreateTime       time.Time `json:"create_time"`
	Label            string    `json:"label"`
	Access           string    `json:"access"`
	AccessChangeTime time.Time `json:"access_change_time"`
	Capacity         int       `json:"capacity"`
	Replicas         int       `json:"replicas"`
}

Volume -- volume representation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL