Documentation ¶
Index ¶
- Constants
- type AdvertisedAddress
- type AuthRequestTwoFactor
- type AuthRequestTwoFactorDetails
- type AuthResponse
- type AuthStruct
- type AuthStructWrapper
- type AuthVerificationResult
- type AuthVerifyTwoFactor
- type AuthVerifyTwoFactorDetails
- type CPKubernetes
- type CPMachineImage
- type CPMachineType
- type CPVersion
- type Client
- func (c *Client) AddWorkerGroup(clusterName string, clusterRegion string, clusterProject string, ...) (*ShootClusterResponse, error)
- func (c *Client) CreateShootCluster(clusterRegion string, clusterProject string, ...) (*ShootClusterCreateResponse, error)
- func (c *Client) DeleteShootCluster(clusterName string, clusterRegion string, clusterProject string) (string, error)
- func (c *Client) DeleteWorkerGroup(clusterName string, clusterRegion string, clusterProject string, ...) (*ShootClusterResponse, error)
- func (c *Client) GenerateKubeConfig(clusterRegion string, clusterProject string, clusterName string, ...) ([]byte, error)
- func (c *Client) GetCloudProfile() (*CloudProfile, error)
- func (c *Client) GetShootCluster(clusterName string, clusterRegion string, clusterProject string) (*ShootClusterResponse, error)
- func (c *Client) GetToken() (*AuthResponse, error)
- func (c *Client) GetTokenWith2FA(twoFACodeFromSms int) error
- func (c *Client) HibernateCluster(clusterRegion string, clusterProject string, clusterName string) error
- func (c *Client) ListDomains() (*[]OpenstackDomain, error)
- func (c *Client) ListProjects(domain_id string) (*[]OpenstackProject, error)
- func (c *Client) ListShootClusters(clusterRegion string, clusterProject string) ([]ShootClusterResponse, error)
- func (c *Client) Request2FactorCode() error
- func (c *Client) RevokeToken() error
- func (c *Client) UpdateShootCluster(clusterRegion string, clusterProject string, clusterName string, ...) (*ShootClusterResponse, error)
- func (c *Client) UpdateWorkerGroup(clusterName string, clusterRegion string, clusterProject string, ...) (*ShootClusterResponse, error)
- func (c *Client) ValidateToken() error
- func (c *Client) WakeUpCluster(clusterRegion string, clusterProject string, clusterName string) error
- type CloudProfile
- type CloudProfileSpec
- type Condition
- type HibernationDetails
- type HibernationResponseSchedule
- type HibernationSchedule
- type HibernationSchedules
- type ImageDetails
- type InfrastructureConfigDetails
- type K8sVersion
- type KubernetesDetails
- type LastOperationDetails
- type MachineDetails
- type MetadataFields
- type OpenstackArea
- type OpenstackDomain
- type OpenstackProject
- type OpenstackRegion
- type ProviderDetails
- type RequestAPIError
- type ShootClusterCreateResponse
- type ShootClusterCreateResponseConfig
- type ShootClusterRequest
- type ShootClusterRequestConfig
- type ShootClusterResponse
- type SpecFields
- type StatusFields
- type VolumeDetails
- type Worker
- type WorkerGroupRequest
Constants ¶
View Source
const HostURL string = "https://rest.cleura.cloud"
HostURL - Default Cleura API Endpoint prefix.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvertisedAddress ¶
type AuthRequestTwoFactor ¶
type AuthRequestTwoFactor struct {
Request2FA AuthRequestTwoFactorDetails `json:"request2fa"`
}
type AuthResponse ¶
AuthResponse.
type AuthStruct ¶
type AuthStruct struct { Username string `json:"login"` Password string `json:"password"` TwoFactorMethod string `json:"twofa_method,omitempty"` VerificationCode string `json:"verification,omitempty"` }
AuthStruct.
type AuthStructWrapper ¶
type AuthStructWrapper struct {
Auth AuthStruct `json:"auth"`
}
AuthStruct Wrapper.
type AuthVerificationResult ¶
type AuthVerificationResult struct { Result string `json:"result"` Type string `json:"type"` Verification string `json:"verification"` }
AuthVerificationResult.
type AuthVerifyTwoFactor ¶
type AuthVerifyTwoFactor struct {
Verify2FA AuthVerifyTwoFactorDetails `json:"verify2fa"`
}
type CPKubernetes ¶ added in v0.0.6
type CPKubernetes struct {
Versions []CPVersion `json:"versions"`
}
type CPMachineImage ¶ added in v0.0.6
type CPMachineType ¶ added in v0.0.6
type Client ¶
type Client struct { HostURL string HTTPClient *http.Client Token string Auth AuthStruct }
Client.
func NewClientNoPassword ¶
func (*Client) AddWorkerGroup ¶
func (c *Client) AddWorkerGroup(clusterName string, clusterRegion string, clusterProject string, workerGroupRequest WorkerGroupRequest) (*ShootClusterResponse, error)
func (*Client) CreateShootCluster ¶
func (c *Client) CreateShootCluster(clusterRegion string, clusterProject string, shootClusterRequest ShootClusterRequest) (*ShootClusterCreateResponse, error)
func (*Client) DeleteShootCluster ¶
func (*Client) DeleteWorkerGroup ¶
func (*Client) GenerateKubeConfig ¶
func (*Client) GetCloudProfile ¶ added in v0.0.6
func (c *Client) GetCloudProfile() (*CloudProfile, error)
Get Cloud Profile Data. This can be used get available kubernetes versions,machine types and images suitable for specification in shoot clusters/ worker groups.
func (*Client) GetShootCluster ¶
func (*Client) GetToken ¶
func (c *Client) GetToken() (*AuthResponse, error)
GetToken - Get a new token for the user.
func (*Client) GetTokenWith2FA ¶
Issue token request with two-factor code received via sms.
func (*Client) HibernateCluster ¶ added in v0.0.4
func (c *Client) HibernateCluster(clusterRegion string, clusterProject string, clusterName string) error
Hibernate.
func (*Client) ListDomains ¶
func (c *Client) ListDomains() (*[]OpenstackDomain, error)
func (*Client) ListProjects ¶
func (c *Client) ListProjects(domain_id string) (*[]OpenstackProject, error)
func (*Client) ListShootClusters ¶
func (c *Client) ListShootClusters(clusterRegion string, clusterProject string) ([]ShootClusterResponse, error)
func (*Client) Request2FactorCode ¶
Request verification code if 2-factor auth is enabled.
func (*Client) RevokeToken ¶
RevokeToken - Revoke client token.
func (*Client) UpdateShootCluster ¶
func (c *Client) UpdateShootCluster(clusterRegion string, clusterProject string, clusterName string, shootClusterUpdateRequest ShootClusterRequest) (*ShootClusterResponse, error)
func (*Client) UpdateWorkerGroup ¶
func (c *Client) UpdateWorkerGroup(clusterName string, clusterRegion string, clusterProject string, workerName string, workerGroupRequest WorkerGroupRequest) (*ShootClusterResponse, error)
type CloudProfile ¶ added in v0.0.6
type CloudProfile struct { Name string `json:"name"` Spec CloudProfileSpec `json:"spec"` }
type CloudProfileSpec ¶ added in v0.0.6
type CloudProfileSpec struct { Kubernetes CPKubernetes `json:"kubernetes"` MachineImages []CPMachineImage `json:"machineImages"` MachineTypes []CPMachineType `json:"machineTypes"` }
type HibernationDetails ¶
type HibernationDetails struct { Enabled bool `json:"enabled"` HibernationResponseSchedules []HibernationResponseSchedule `json:"schedules,omitempty"` }
type HibernationSchedule ¶
type HibernationSchedules ¶
type HibernationSchedules struct {
HibernationSchedules []HibernationSchedule `json:"schedules,omitempty"`
}
type ImageDetails ¶
type InfrastructureConfigDetails ¶
type InfrastructureConfigDetails struct {
FloatingPoolName string `json:"floatingPoolName"`
}
type K8sVersion ¶
type K8sVersion struct {
Version string `json:"version"`
}
type KubernetesDetails ¶
type KubernetesDetails struct {
Version string `json:"version"`
}
type LastOperationDetails ¶
type MachineDetails ¶
type MachineDetails struct { Type string `json:"type"` Image ImageDetails `json:"image"` }
type MetadataFields ¶
type OpenstackArea ¶
type OpenstackArea struct { Name string `json:"name"` Tag string `json:"tag"` Regions []OpenstackRegion `json:"regions"` }
type OpenstackDomain ¶
type OpenstackDomain struct { Area OpenstackArea `json:"area"` Id string `json:"id"` Status string `json:"status"` Name string `json:"name"` Enabled bool `json:"enabled"` }
Openstack domains.
type OpenstackProject ¶
type OpenstackProject struct { Id string `json:"id"` Name string `json:"name"` DomainId string `json:"domain_id"` Enabled bool `json:"enabled"` Default bool `json:"default"` Description string `json:"description"` }
Openstack projects.
type OpenstackRegion ¶
type ProviderDetails ¶
type ProviderDetails struct { InfrastructureConfig InfrastructureConfigDetails `json:"infrastructureConfig"` Workers []Worker `json:"workers"` }
type RequestAPIError ¶
Need to know status code for retry.
func (*RequestAPIError) Error ¶
func (r *RequestAPIError) Error() string
type ShootClusterCreateResponse ¶ added in v0.0.10
type ShootClusterCreateResponse struct {
Shoot ShootClusterCreateResponseConfig `json:"shoot"`
}
type ShootClusterCreateResponseConfig ¶ added in v0.0.10
type ShootClusterCreateResponseConfig struct { Name string `json:"name"` UID string `json:"uid"` Kubernetes KubernetesDetails `json:"kubernetes"` Provider ProviderDetails `json:"provider"` Purpose string `json:"purpose"` Region string `json:"region"` Hibernation HibernationDetails `json:"hibernation"` }
type ShootClusterRequest ¶
type ShootClusterRequest struct {
Shoot ShootClusterRequestConfig `json:"shoot"`
}
Shoot cluster request data model.
type ShootClusterRequestConfig ¶
type ShootClusterRequestConfig struct { Name string `json:"name,omitempty"` KubernetesVersion *K8sVersion `json:"kubernetes,omitempty"` Provider *ProviderDetails `json:"provider,omitempty"` Hibernation *HibernationSchedules `json:"hibernation,omitempty"` }
type ShootClusterResponse ¶
type ShootClusterResponse struct { Metadata MetadataFields `json:"metadata"` Spec SpecFields `json:"spec"` Status StatusFields `json:"status"` }
Shoot cluster response data model.
type SpecFields ¶
type SpecFields struct { Purpose string `json:"purpose"` Region string `json:"region"` Provider ProviderDetails `json:"provider"` Kubernetes KubernetesDetails `json:"kubernetes"` Hibernation HibernationDetails `json:"hibernation"` }
type StatusFields ¶
type StatusFields struct { Conditions []Condition `json:"conditions"` Hibernated bool `json:"hibernated"` AdvertisedAddresses []AdvertisedAddress `json:"advertisedAddresses"` LastOperation LastOperationDetails `json:"lastOperation"` }
type VolumeDetails ¶
type VolumeDetails struct {
Size string `json:"size"`
}
type Worker ¶
type Worker struct { Name string `json:"name,omitempty"` Minimum int16 `json:"minimum,omitempty"` Maximum int16 `json:"maximum,omitempty"` MaxSurge int16 `json:"maxSurge,omitempty"` Machine MachineDetails `json:"machine"` Volume VolumeDetails `json:"volume"` }
Worker.
type WorkerGroupRequest ¶
type WorkerGroupRequest struct {
Worker Worker `json:"worker"`
}
Click to show internal directories.
Click to hide internal directories.