Commit 99045abd authored by Matej Velikonja's avatar Matej Velikonja

add PlatformKubernetesOptions struct

parent 79cd42cc
......@@ -61,6 +61,15 @@ type PlatformKubernetes struct {
AuthorizationType string `json:"authorization_type"`
}
// PlatformKubernetesOptions represents the available PlatformKubernetes options.
type PlatformKubernetesOptions struct {
APIURL *string `url:"api_url,omitempty" json:"api_url,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"`
CaCert *string `url:"ca_cert,omitempty" json:"ca_cert,omitempty"`
Namespace *string `url:"namespace,omitempty" json:"namespace,omitempty"`
AuthorizationType *string `url:"authorization_type,omitempty" json:"authorization_type,omitempty"`
}
// ListClusters gets a list of all clusters in a project.
//
// GitLab API docs:
......@@ -119,7 +128,7 @@ type AddClusterOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"`
Enabled *bool `url:"enabled,omitempty" json:"enabled,omitempty"`
EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"`
PlatformKubernetes *PlatformKubernetes `url:"platform_kubernetes_attributes,omitempty" json:"platform_kubernetes_attributes,omitempty"`
PlatformKubernetes *PlatformKubernetesOptions `url:"platform_kubernetes_attributes,omitempty" json:"platform_kubernetes_attributes,omitempty"`
}
// AddCluster adds an existing cluster to the project.
......@@ -154,7 +163,7 @@ func (s *ProjectClustersService) AddCluster(pid interface{}, opt *AddClusterOpti
type EditClusterOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"`
EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"`
PlatformKubernetes *PlatformKubernetes `url:"platform_kubernetes_attributes,omitempty" json:"platform_kubernetes_attributes,omitempty"`
PlatformKubernetes *PlatformKubernetesOptions `url:"platform_kubernetes_attributes,omitempty" json:"platform_kubernetes_attributes,omitempty"`
}
// EditCluster updates an existing project cluster.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment