Documentation ¶
Index ¶
- type BanzaiResponse
- type BucketInfo
- type CloudInfoFilter
- type CloudInfoRequest
- type ClusterDetailsResponse
- type ClusterProfileRequest
- type ClusterProfileResponse
- type CreateBucketRequest
- type CreateBucketResponse
- type CreateClusterRequest
- type CreateClusterResponse
- type DeleteClusterResponse
- type ErrorResponse
- type GetCloudInfoResponse
- type GetClusterConfigResponse
- type GetClusterStatusResponse
- type ImageFilter
- type InstallSecretsToClusterRequest
- type InstanceFilter
- type KubernetesFilter
- type ListSecretsQuery
- type MachineType
- type NodePoolStatus
- type SecretK8SSourceMeta
- type SecretSourcingMethod
- type SupportedClusterItem
- type SupportedClustersResponse
- type UpdateClusterRequest
- type UpdateClusterResponse
- type UpdateProperties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BanzaiResponse ¶
type BanzaiResponse struct { StatusCode int `json:"status_code,omitempty"` Message string `json:"message,omitempty"` }
BanzaiResponse describes Pipeline's responses
type BucketInfo ¶
type BucketInfo struct { Name string `json:"name" binding:"required"` Managed bool `json:"managed" binding:"required"` Azure *azure.BlobStoragePropsForAzure `json:"azure,omitempty"` }
BucketInfo desribes a storage bucket
type CloudInfoFilter ¶
type CloudInfoFilter struct { Fields []string `json:"fields,omitempty"` InstanceType *InstanceFilter `json:"instanceType,omitempty"` KubernetesFilter *KubernetesFilter `json:"k8sVersion,omitempty"` ImageFilter *ImageFilter `json:"image,omitempty"` }
CloudInfoFilter describes a filter in cloud info
type CloudInfoRequest ¶
type CloudInfoRequest struct { OrganizationId uint `json:"-"` SecretId string `json:"secret_id,omitempty"` Filter *CloudInfoFilter `json:"filter,omitempty"` }
CloudInfoRequest describes Cloud info requests
type ClusterDetailsResponse ¶
type ClusterDetailsResponse struct { // todo expand with more fields Name string `json:"name"` Id uint `json:"id"` }
ClusterDetailsResponse describes Pipeline's GetClusterDetails API response
type ClusterProfileRequest ¶
type ClusterProfileRequest struct { Name string `json:"name" binding:"required"` Location string `json:"location" binding:"required"` Cloud string `json:"cloud" binding:"required"` Properties struct { Amazon *amazon.ClusterProfileAmazon `json:"amazon,omitempty"` Azure *azure.ClusterProfileAzure `json:"azure,omitempty"` Google *google.ClusterProfileGoogle `json:"google,omitempty"` } `json:"properties" binding:"required"` }
ClusterProfileRequest describes CreateClusterProfile request
type ClusterProfileResponse ¶
type ClusterProfileResponse struct { Name string `json:"name" binding:"required"` Location string `json:"location" binding:"required"` Cloud string `json:"cloud" binding:"required"` Properties struct { Amazon *amazon.ClusterProfileAmazon `json:"amazon,omitempty"` Azure *azure.ClusterProfileAzure `json:"azure,omitempty"` Google *google.ClusterProfileGoogle `json:"google,omitempty"` } `json:"properties" binding:"required"` }
ClusterProfileResponse describes Pipeline's ClusterProfile API responses
func (*ClusterProfileResponse) CreateClusterRequest ¶
func (p *ClusterProfileResponse) CreateClusterRequest(createRequest *CreateClusterRequest) (*CreateClusterRequest, error)
CreateClusterRequest creates a CreateClusterRequest model from profile
type CreateBucketRequest ¶
type CreateBucketRequest struct { SecretId string `json:"secret_id" binding:"required"` Name string `json:"name" binding:"required"` Properties struct { CreateAmazonObjectStoreBucketProperties *amazon.CreateAmazonObjectStoreBucketProperties `json:"amazon,omitempty"` CreateAzureObjectStoreBucketProperties *azure.CreateAzureObjectStoreBucketProperties `json:"azure,omitempty"` CreateGoogleObjectStoreBucketProperties *google.CreateGoogleObjectStoreBucketProperties `json:"google,omitempty"` } `json:"properties" binding:"required"` }
CreateBucketRequest describes a storage bucket creation
type CreateBucketResponse ¶
type CreateBucketResponse struct {
Name string `json:"BucketName"`
}
CreateBucketResponse describes a storage bucket creation response
type CreateClusterRequest ¶
type CreateClusterRequest struct { Name string `json:"name" binding:"required"` Location string `json:"location"` Cloud string `json:"cloud" binding:"required"` SecretId string `json:"secret_id" binding:"required"` ProfileName string `json:"profile_name"` PostHookFunctions []string `json:"postHooks"` Properties struct { CreateClusterAmazon *amazon.CreateClusterAmazon `json:"amazon,omitempty"` CreateClusterAzure *azure.CreateClusterAzure `json:"azure,omitempty"` CreateClusterGoogle *google.CreateClusterGoogle `json:"google,omitempty"` CreateClusterDummy *dummy.CreateClusterDummy `json:"dummy,omitempty"` CreateKubernetes *kubernetes.CreateKubernetes `json:"kubernetes,omitempty"` } `json:"properties" binding:"required"` }
CreateClusterRequest describes a create cluster request
func (*CreateClusterRequest) AddDefaults ¶
func (r *CreateClusterRequest) AddDefaults() error
AddDefaults puts default values to optional field(s)
func (*CreateClusterRequest) Validate ¶
func (r *CreateClusterRequest) Validate() error
Validate checks the request fields
type CreateClusterResponse ¶
CreateClusterResponse describes Pipeline's CreateCluster API response
type DeleteClusterResponse ¶
type DeleteClusterResponse struct { Status int `json:"status"` Name string `json:"name"` Message string `json:"message"` ResourceID uint `json:"id"` }
DeleteClusterResponse describes Pipeline's DeleteCluster API response
type ErrorResponse ¶
type ErrorResponse struct { Code int `json:"code"` Message string `json:"message"` Error string `json:"error"` }
ErrorResponse describes Pipeline's responses when an error occurred
type GetCloudInfoResponse ¶
type GetCloudInfoResponse struct { Type string `json:"type" binding:"required"` NameRegexp string `json:"nameRegexp,omitempty"` Locations []string `json:"locations,omitempty"` NodeInstanceType map[string]MachineType `json:"instanceType,omitempty"` KubernetesVersions interface{} `json:"kubernetes_versions,omitempty"` Image map[string][]string `json:"image,omitempty"` }
GetCloudInfoResponse describes Pipeline's Cloud info API response
type GetClusterConfigResponse ¶
GetClusterConfigResponse describes Pipeline's GetConfig API response
type GetClusterStatusResponse ¶
type GetClusterStatusResponse struct { Status string `json:"status"` StatusMessage string `json:"status_message,omitempty"` Name string `json:"name"` Location string `json:"location"` Cloud string `json:"cloud"` ResourceID uint `json:"id"` NodePools map[string]*NodePoolStatus `json:"nodePools,omitempty"` }
GetClusterStatusResponse describes Pipeline's GetClusterStatus API response
type ImageFilter ¶
type ImageFilter struct { Location string `json:"location,omitempty"` Tags []*string `json:"tags,omitempty"` }
ImageFilter describes image filter of cloud info
type InstallSecretsToClusterRequest ¶
type InstallSecretsToClusterRequest struct { Namespace string `json:"namespace" binding:"required"` Query ListSecretsQuery `json:"query" binding:"required"` }
InstallSecretsToClusterRequest describes an InstallSecretToCluster request
type InstanceFilter ¶
type InstanceFilter struct {
Location string `json:"location,omitempty"`
}
InstanceFilter describes instance filter of cloud info
type KubernetesFilter ¶
type KubernetesFilter struct {
Location string `json:"location,omitempty"`
}
KubernetesFilter describes K8S version filter of cloud info
type ListSecretsQuery ¶
type ListSecretsQuery struct { Type string `form:"type" json:"type"` Tag string `form:"tag" json:"tag"` Values bool `form:"values" json:"values"` }
ListSecretsQuery represent a secret listing filter
type MachineType ¶
type MachineType []string
MachineType describes an string slice which contains machine types
type NodePoolStatus ¶
type NodePoolStatus struct { Count int `json:"count,omitempty"` InstanceType string `json:"instanceType,omitempty"` ServiceAccount string `json:"service_account,omitempty"` SpotPrice string `json:"spot_price,omitempty"` MinCount int `json:"min_count,omitempty"` MaxCount int `json:"max_count,omitempty"` Image string `json:"image,omitempty"` }
NodePoolStatus describes cluster's node status
type SecretK8SSourceMeta ¶
type SecretK8SSourceMeta struct { Name string `json:"name"` Sourcing SecretSourcingMethod `json:"sourcing"` }
SecretK8SSourceMeta describes which and how installed Secret should be sourced into a Pod in K8S
type SecretSourcingMethod ¶
type SecretSourcingMethod string
SecretSourcingMethod describes how an installed Secret should be sourced into a Pod in K8S
const ( // EnvVar means the secret has to be sources an an env var EnvVar SecretSourcingMethod = "env" // Volume means the secret has to be mounted an a volume Volume SecretSourcingMethod = "volume" )
type SupportedClusterItem ¶
type SupportedClusterItem struct { Name string `json:"name" binding:"required"` Key string `json:"key" binding:"required"` Enabled bool `json:"enabled"` Icon string `json:"icon"` }
SupportedClusterItem describes a supported cloud provider
type SupportedClustersResponse ¶
type SupportedClustersResponse struct {
Items []SupportedClusterItem `json:"items"`
}
SupportedClustersResponse describes the supported cloud providers
type UpdateClusterRequest ¶
type UpdateClusterRequest struct { Cloud string `json:"cloud" binding:"required"` UpdateProperties `json:"properties"` }
UpdateClusterRequest describes an update cluster request
func (*UpdateClusterRequest) String ¶
func (r *UpdateClusterRequest) String() string
String method prints formatted update request fields
func (*UpdateClusterRequest) Validate ¶
func (r *UpdateClusterRequest) Validate() error
Validate checks the request fields
type UpdateClusterResponse ¶
type UpdateClusterResponse struct {
Status int `json:"status"`
}
UpdateClusterResponse describes Pipeline's UpdateCluster API response
type UpdateProperties ¶
type UpdateProperties struct { Amazon *amazon.UpdateClusterAmazon `json:"amazon,omitempty"` Azure *azure.UpdateClusterAzure `json:"azure,omitempty"` Google *google.UpdateClusterGoogle `json:"google,omitempty"` Dummy *dummy.UpdateClusterDummy `json:"dummy,omitempty"` }
UpdateProperties describes Pipeline's UpdateCluster request properties