apis

package
v0.0.0-...-264ff9f Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterDefinition

type ClusterDefinition struct {
	Nodes []ClusterNode `form:"nodes" json:"nodes" binding:"required"`
}

ClusterDefinition storing the information of a cluster

type ClusterNode

type ClusterNode struct {
	Id           int               `form:"id" json:"id" binding:"required"`
	InstanceType string            `form:"instanceType" json:"instanceType" binding:"required"`
	Labels       map[string]string `form:"labels" json:"labels" binding:"required"`
}

type Deployment

type Deployment struct {
	UserId      string `form:"userId" json:"userId"`
	Name        string `form:"name" json:"name" binding:"required"`
	Region      string `form:"region" json:"region" binding:"required"`
	ClusterType string `form:"clusterType" json:"clusterType"`
	Files       []struct {
		FileId  string `json:"fileId"`
		FileUrl string `json:"fileUrl"`
		Path    string `json:"path"`
	} `form:"files" json:"files"`
	AllowedPorts      []int             `form:"allowedPorts" json:"allowedPorts"`
	ClusterDefinition ClusterDefinition `form:"clusterDefinition" json:"clusterDefinition" binding:"required"`
	NodeMapping       NodeMappings      `form:"nodeMapping" json:"nodeMapping" binding:"required"`
	IamRole           `form:"iamRole" json:"iamRole" binding:"required"`

	*ECSDeployment        `form:"ecs" json:"ecs,omitempty"`
	*KubernetesDeployment `form:"kubernetes" json:"kubernetes,omitempty"`

	*VPCPeering `json:"vpcPeering,omitempty"`

	ShutDownTime string `form:"shutDownTime" json:"shutDownTime,omitempty"`
}

type ECSDeployment

type ECSDeployment struct {
	TaskDefinitions []ecs.RegisterTaskDefinitionInput `form:"taskDefinitions" json:"taskDefinitions" binding:"required"`
}

ECSDeployment storing the information of a ECS deployment

type GCPDefinition

type GCPDefinition struct {
	ClusterVersion string `form:"clusterVersion" json:"clusterVersion"`
}

type IamRole

type IamRole struct {
	PolicyDocument string `form:"policyDocument" json:"policyDocument"`
}

IamRole store the information of iam role

type KubernetesDeployment

type KubernetesDeployment struct {
	Kubernetes          []KubernetesTask `form:"taskDefinitions" json:"taskDefinitions" binding:"required"`
	Secrets             []v1.Secret      `form:"secrets" json:"secrets"`
	SkipDeleteOnFailure bool             `form:"skipdDeleteOnFailure" json:"skipDeleteOnFailure"`
	GCPDefinition       *GCPDefinition   `form:"gcpDefinition" json:"gcpDefinition"`
}

KubernetesDeployment storing the information of a Kubernetes deployment

type KubernetesTask

type KubernetesTask struct {
	DaemonSet   *v1beta1.DaemonSet       `form:"daemonset" json:"daemonset,omitempty"`
	StatefulSet *appsv1beta1.StatefulSet `form:"statefulset" json:"statefulset,omitempty"`
	Deployment  *v1beta1.Deployment      `form:"deployment" json:"deployment,omitempty"`
	Family      string                   `form:"family" json:"family" binding:"required"`

	// Type of each port opened by a container: 0 - private, 1 - public
	PortTypes []int `form:"portTypes" json:"portTypes"`
}

func (*KubernetesTask) GetPorts

func (task *KubernetesTask) GetPorts() []v1.ContainerPort

type NodeMapping

type NodeMapping struct {
	Id   int    `json:"id"`
	Task string `json:"task"`
}

func (NodeMapping) ImageIdAttribute

func (mapping NodeMapping) ImageIdAttribute() string

ImageIdAttribute return imageId for putAttribute function

func (NodeMapping) Service

func (mapping NodeMapping) Service() string

Service return a string with suffix "-service"

type NodeMappings

type NodeMappings []NodeMapping

func (NodeMappings) Len

func (d NodeMappings) Len() int

func (NodeMappings) Less

func (d NodeMappings) Less(i, j int) bool

func (NodeMappings) Swap

func (d NodeMappings) Swap(i, j int)

type ServiceAddress

type ServiceAddress struct {
	Host string `bson:"host,omitempty" json:"host,omitempty"`
	Port int32  `bson:"port,omitempty" json:"port,omitempty"`
}

ServiceAddress object that stores the information of service container

type VPCPeering

type VPCPeering struct {
	TargetOwnerId string `json:"targetOwnerId"`
	TargetVpcId   string `json:"targetVpcId"`
}

Jump to

Keyboard shortcuts

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