controller

package
v1.1.0-rc Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Clusters          = "mdsclusters"
	Monitoring        = "mdsmonitoring"
	Services          = "mdsservices"
	Providers         = "provider"
	InstanceTypes     = "instanceTypes"
	Deployments       = "deployments"
	Dashboard         = "dashboard"
	NetworkPolicy     = "networkpolicy"
	MetaData          = "metadata"
	FleetManagement   = "fleet-management"
	Count             = "count"
	SRE_cluster       = "clusters"
	ResourceByService = "resource-by-service"
	Mdsfleets         = "mdsfleets"
	Backup            = "backup"
	Restore           = "restore"
	Versions          = "versions"
	Extensions        = "extensions"
)
View Source
const (
	EndPoint = "controller"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupCreateRequest added in v0.0.6

type BackupCreateRequest struct {
	Name           string `json:"name"`
	Description    string `json:"description"`
	BackupSchedule string `json:"backupSchedule"`
	BackupType     string `json:"backupType"`
}

type BackupsQuery added in v0.0.6

type BackupsQuery struct {
	ServiceType string `schema:"serviceType,omitempty"`
	Name        string `schema:"name,omitempty"`
	ClusterId   string `schema:"clusterId,omitempty"`
	model.PageQuery
}

type ClusterCreateRequest

type ClusterCreateRequest struct {
	Name              string          `json:"name"`
	ServiceType       string          `json:"serviceType"`
	Provider          string          `json:"provider"`
	InstanceSize      string          `json:"instanceSize"`
	Region            string          `json:"region"`
	Dedicated         bool            `json:"dedicated"`
	Shared            bool            `json:"shared,omitempty"`
	Tags              []string        `json:"tags,omitempty"`
	NetworkPolicyIds  []string        `json:"networkPolicyIds,omitempty"`
	DataPlaneId       string          `json:"dataPlaneId,omitempty"`
	Version           string          `json:"version"`
	StoragePolicyName string          `json:"storagePolicyName"`
	ClusterMetadata   ClusterMetadata `json:"clusterMetadata"`
}

type ClusterMetadata

type ClusterMetadata struct {
	Username      string   `json:"username"`
	Password      string   `json:"password"`
	Database      string   `json:"database"`
	RestoreFrom   string   `json:"restoreFrom,omitempty"`
	ObjectStoreId string   `json:"objectStoreId,omitempty"`
	Extensions    []string `json:"extensions"`
}

type ClusterNetworkPoliciesUpdateRequest

type ClusterNetworkPoliciesUpdateRequest struct {
	NetworkPolicyIds []string `json:"networkPolicyIds"`
}

type ClusterUpdateRequest

type ClusterUpdateRequest struct {
	Tags []string `json:"tags"`
}

type ClustersQuery

type ClustersQuery struct {
	ServiceType   string `schema:"serviceType,omitempty"`
	Name          string `schema:"name,omitempty"`
	FullNameMatch bool   `schema:"MATCH_FULL_WORD,omitempty"`
	model.PageQuery
}

type FleetsQuery added in v0.0.4

type FleetsQuery struct {
	model.PageQuery
}

type InstanceTypesQuery

type InstanceTypesQuery struct {
	ServiceType string `schema:"serviceType,omitempty"`
	model.PageQuery
}

type RestoreClusterBackupRequest added in v0.0.6

type RestoreClusterBackupRequest struct {
	Name              string          `json:"name"`
	Tags              []string        `json:"tags"`
	Provider          string          `json:"provider"`
	Version           string          `json:"version"`
	NetworkPolicyIds  []string        `json:"networkPolicyIds"`
	Region            string          `json:"region"`
	InstanceSize      string          `json:"instanceSize"`
	ServiceType       string          `json:"serviceType"`
	Dedicated         bool            `json:"dedicated"`
	Shared            bool            `json:"shared"`
	StoragePolicyName string          `json:"storagePolicyName"`
	ClusterMetadata   ClusterMetadata `json:"clusterMetadata"`
}

type RestoreQuery added in v0.0.5

type RestoreQuery struct {
	ServiceType string `schema:"serviceType,omitempty"`
	model.PageQuery
}

type Service

type Service struct {
	*core.Service
}

func NewService

func NewService(hostUrl *string, root *core.Root) *Service

func (*Service) CreateCluster

func (s *Service) CreateCluster(requestBody *ClusterCreateRequest) (*model.TaskResponse, error)

CreateCluster - Submits a request to create cluster

func (*Service) CreateClusterBackup added in v0.0.6

func (s *Service) CreateClusterBackup(id string, requestBody *BackupCreateRequest) (*model.TaskResponse, error)

CreateClusterBackup creates cluster backup

func (*Service) DeleteCluster

func (s *Service) DeleteCluster(id string) (*model.TaskResponse, error)

DeleteCluster - Submits a request to delete cluster

func (*Service) DeleteClusterBackup added in v0.0.6

func (s *Service) DeleteClusterBackup(id string) (*model.TaskResponse, error)

DeleteClusterBackup Deletes cluster backup

func (*Service) GetAllClusters

func (s *Service) GetAllClusters(query *ClustersQuery) ([]model.Cluster, error)

GetAllClusters - Returns list of all clusters

func (*Service) GetBackup added in v0.0.6

func (s *Service) GetBackup(id string) (*model.ClusterBackup, error)

GetBackup - Returns the Backup by ID

func (*Service) GetCluster

func (s *Service) GetCluster(id string) (*model.Cluster, error)

GetCluster - Returns the cluster by ID

func (*Service) GetClusterBackups added in v0.0.6

func (s *Service) GetClusterBackups(query *BackupsQuery) (model.Paged[model.ClusterBackup], error)

GetClusterBackups - Returns all the Backups

func (*Service) GetClusterCountByService added in v0.0.4

func (s *Service) GetClusterCountByService() ([]model.ClusterCountByService, error)

func (*Service) GetClusterMetaData

func (s *Service) GetClusterMetaData(id string) (*model.ClusterMetaData, error)

GetClusterMetaData - Returns the cluster metadata by ID

func (*Service) GetClusterRestores added in v0.0.5

func (s *Service) GetClusterRestores(query RestoreQuery) (model.Paged[model.ClusterRestore], error)

GetClusterRestores - Returns all the Restore

func (*Service) GetClusters

func (s *Service) GetClusters(query *ClustersQuery) (model.Paged[model.Cluster], error)

GetClusters - Returns page of clusters

func (*Service) GetFleetDetails added in v0.0.4

func (s *Service) GetFleetDetails(query *FleetsQuery) (model.Paged[model.SreCustomerInfo], error)

func (*Service) GetResourceByService added in v0.0.4

func (s *Service) GetResourceByService() ([]model.ResourceByService, error)

func (*Service) GetServiceExtensions added in v0.0.7

func (s *Service) GetServiceExtensions(query *ServiceExtensionsQuery) (model.Paged[model.Extension], error)

GetServiceExtensions - Returns all the extensions available

func (*Service) GetServiceInstanceTypes

func (s *Service) GetServiceInstanceTypes(serviceTypeQuery *InstanceTypesQuery) (model.InstanceTypeList, error)

GetServiceInstanceTypes - Returns list of clusters

func (*Service) GetServiceVersions added in v0.0.6

func (s *Service) GetServiceVersions(query *ServiceVersionsQuery) ([]string, error)

GetServiceVersions - Returns all the versions available for provisioning

func (*Service) RestoreClusterBackup added in v0.0.6

func (s *Service) RestoreClusterBackup(request *RestoreClusterBackupRequest) (model.TaskResponse, error)

RestoreClusterBackup - Restores a cluster backup

func (*Service) UpdateCluster

func (s *Service) UpdateCluster(id string, requestBody *ClusterUpdateRequest) (*model.Cluster, error)

UpdateCluster - Submits a request to update cluster

func (*Service) UpdateClusterNetworkPolicies

func (s *Service) UpdateClusterNetworkPolicies(id string, requestBody *ClusterNetworkPoliciesUpdateRequest) (*model.TaskResponse, error)

UpdateClusterNetworkPolicies - Submits a request to update cluster network policies

type ServiceExtensionsQuery added in v0.0.7

type ServiceExtensionsQuery struct {
	ServiceType string `schema:"serviceType,omitempty"`
}

type ServiceVersionsQuery added in v0.0.6

type ServiceVersionsQuery struct {
	ServiceType  string `schema:"serviceType,omitempty"`
	Provider     string `schema:"provider,omitempty"`
	Action       string `schema:"action,omitempty"`
	TemplateType string `schema:"templateType,omitempty"`
}

Jump to

Keyboard shortcuts

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