infra_connector

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	K8sCluster       = "k8s-cluster"
	DataPlaneAddSvc  = "dataplane-add-svc"
	Resource         = "resource"
	CloudAccount     = "account"
	Types            = "types"
	CloudProviders   = "cloud-providers"
	TshirtSize       = "t-shirt-size"
	Certificate      = "certificate"
	Internal         = "internal"
	ObjectStore      = "objectstore"
	DNSConfig        = "dnsconfig"
	FleetMangement   = "fleet-management"
	OrgHealth        = "org-health"
	Details          = "details"
	Dataplane        = "dataplane"
	Count            = "count"
	Clusters         = "clusters"
	DataplaneOnboard = "dataplane-onboard"
	Sync             = "sync"
	Eligible         = "eligible"
	HelmRelase       = "dataplane-helm-release"
	Release          = "release"
	AccountMetadata  = "account-metadata"
	StorageClass     = "storage-class"
)
View Source
const (
	EndPoint = "infra-connector"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateCreateRequest

type CertificateCreateRequest struct {
	Name           string   `json:"name"`
	DomainName     string   `json:"domainName"`
	Provider       string   `json:"provider"`
	Certificate    string   `json:"certificate"`
	CertificateCA  string   `json:"certificateCA"`
	CertificateKey string   `json:"certificateKey"`
	Shared         bool     `json:"shared"`
	Tags           []string `json:"tags"`
}

type CertificateUpdateRequest

type CertificateUpdateRequest struct {
	Certificate    string `json:"certificate"`
	CertificateCA  string `json:"certificateCA"`
	CertificateKey string `json:"certificateKey"`
}

type CertificatesQuery added in v0.0.5

type CertificatesQuery struct {
	Name     string `schema:"name,omitempty"`
	Provider string `schema:"provider,omitempty"`
	model.PageQuery
}

type CloudAccountCreateRequest

type CloudAccountCreateRequest struct {
	ProviderType string          `json:"type"`
	Name         string          `json:"name"`
	Shared       bool            `json:"shared"`
	Credentials  CredentialModel `json:"credentials"`
	OrgId        string          `json:"orgId,omitempty"`
	Tags         []string        `json:"tags"`
}

type CloudAccountUpdateRequest

type CloudAccountUpdateRequest struct {
	Credentials CredentialModel `json:"credentials"`
	Tags        []string        `json:"tags"`
}

type CloudAccountsQuery

type CloudAccountsQuery struct {
	AccountType string `schema:"accountType,omitempty"`
	Name        string `schema:"name, omitempty"`
	model.PageQuery
}

type CredentialModel

type CredentialModel struct {
	// gcp credentials
	Type                    string `json:"type,omitempty"`
	ProjectId               string `json:"project_id,omitempty"`
	PrivateKeyId            string `json:"private_key_id,omitempty"`
	PrivateKey              string `json:"private_key,omitempty"`
	ClientEmail             string `json:"client_email,omitempty"`
	ClientId                string `json:"client_id,omitempty"`
	AuthUri                 string `json:"auth_uri,omitempty"`
	TokenUri                string `json:"token_uri,omitempty"`
	AuthProviderX509CertUrl string `json:"auth_provider_x509_cert_url,omitempty"`
	ClientX509CertUrl       string `json:"client_x509_cert_url,omitempty"`

	// aws credentials
	ACCESSKEYID                      string `json:"ACCESS_KEY_ID,omitempty"`
	SECRETACCESSKEY                  string `json:"SECRET_ACCESS_KEY,omitempty"`
	TargetAmazonAccountId            string `json:"targetAmazonAccountId,omitempty"`
	PowerUserRoleNameInTargetAccount string `json:"powerUserRoleNameInTargetAccount,omitempty"`

	// vrli credentials
	ApiEndpoint string `json:"apiEndpoint,omitempty"`
	ApiKey      string `json:"apiKey,omitempty"`

	// TKGS credentials
	Username         string `json:"userName,omitempty"`
	Password         string `json:"password,omitempty"`
	SupervisorMgmtIP string `json:"supervisorManagementIP,omitempty"`
	VsphereNamespace string `json:"vsphereNamespace,omitempty"`

	// TKGM credentials
	KubeConfigBase64 string `json:"kubeconfigBase64,omitempty"`

	// Openshift credentials
	//Username         string `json:"userName,omitempty"`
	//Password         string `json:"password,omitempty"`
	Domain string `json:"domain,omitempty"`

	// TAS credentials
	//Username         string `json:"userName,omitempty"`
	//Password         string `json:"password,omitempty"`
	OperationManagerIP string `json:"operationManagerIp,omitempty"`
	CfUsername         string `json:"cfUserName,omitempty"`
	CfPassword         string `json:"cfPassword,omitempty"`
	CfApiHost          string `json:"cfApiHost,omitempty"`
}

type DNSQuery added in v0.0.4

type DNSQuery struct {
	model.PageQuery
}

type DataPlaneCreateRequest

type DataPlaneCreateRequest struct {
	AccountId             string   `json:"accountId"`
	DataplaneName         string   `json:"dataplaneName"`
	K8sClusterName        string   `json:"k8sClusterName"`
	DataplaneType         string   `json:"dataplaneType"`
	CertificateId         string   `json:"certificateId"`
	StorageClasses        []string `json:"storageClasses"`
	BackupStorageClass    string   `json:"backupStorageClass"`
	ManagedDns            bool     `json:"managedDns"`
	DataPlaneReleaseId    string   `json:"dataPlaneReleaseId"`
	Shared                bool     `json:"shared"`
	OrgId                 string   `json:"orgId"`
	Tags                  []string `json:"tags"`
	AutoUpgrade           bool     `json:"autoUpgrade"`
	Services              []string `json:"services"`
	CpBootstrappedCluster bool     `json:"cpBootstrappedCluster"`
	ConfigureCoreDns      bool     `json:"configureCoreDns"`
	DnsConfigId           string   `json:"dnsConfigId"`
	AvailabilityZone      string   `json:"az,omitempty"`
	Network               string   `json:"network,omitempty"`
}

type DataPlaneRegionsQuery

type DataPlaneRegionsQuery struct {
	Provider  string `schema:"provider,omitempty"`
	CPU       string `schema:"cpu,omitempty"`
	Memory    string `schema:"memory,omitempty"`
	Storage   string `schema:"storage,omitempty"`
	NodeCount string `schema:"nodeCount,omitempty"`
	OrgId     string `schema:"orgId,omitempty"`
}

type DataPlaneUpdateRequest added in v0.0.4

type DataPlaneUpdateRequest struct {
	DataplaneName string   `json:"dataplaneName"`
	Tags          []string `json:"tags"`
	AutoUpgrade   bool     `json:"autoUpgrade"`
	Enable        bool     `json:"enable"`
}

type DataPlaneUpdateServicesRequest added in v1.1.2

type DataPlaneUpdateServicesRequest struct {
	DataPlaneId string   `json:"dataPlaneId"`
	Services    []string `json:"services"`
}

type DataPlanesQuery added in v0.0.5

type DataPlanesQuery struct {
	Name string `schema:"dataplaneName,omitempty"`
	model.PageQuery
}

type EligibleDataPlanesQuery added in v0.0.5

type EligibleDataPlanesQuery struct {
	Provider          string `schema:"provider,omitempty"`
	InfraResourceType string `schema:"infraResourceType,omitempty"`
	OrgId             string `schema:"orgId,omitempty"`
	model.PageQuery
}

type ObjectStorageCreateRequest

type ObjectStorageCreateRequest struct {
	Name            string `json:"name"`
	BucketName      string `json:"bucketName"`
	Endpoint        string `json:"endpoint"`
	Region          string `json:"region"`
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
}

type ObjectStorageUpdateRequest

type ObjectStorageUpdateRequest struct {
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
}

type ObjectStoragesQuery added in v0.0.5

type ObjectStoragesQuery struct {
	model.PageQuery
}

type Service

type Service struct {
	*core.Service
}

func NewService

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

func (*Service) CreateCertificate

func (s *Service) CreateCertificate(requestBody *CertificateCreateRequest) (*model.Certificate, error)

func (*Service) CreateCloudAccount

func (s *Service) CreateCloudAccount(requestBody *CloudAccountCreateRequest) (*model.CloudAccount, error)

func (*Service) CreateDataPlane

func (s *Service) CreateDataPlane(requestBody *DataPlaneCreateRequest) (*model.TaskResponse, error)

CreateDataPlane - Submits a request to create data plane

func (*Service) CreateObjectStorage

func (s *Service) CreateObjectStorage(requestBody *ObjectStorageCreateRequest) (*model.ObjectStorage, error)

func (*Service) DeleteCertificate

func (s *Service) DeleteCertificate(id string) error

DeleteCertificate - Submits a request to delete certificate

func (*Service) DeleteCloudAccount

func (s *Service) DeleteCloudAccount(id string) error

DeleteCloudAccount - Submits a request to delete cloud account

func (*Service) DeleteDataPlane

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

DeleteDataPlane - Submits a request to delete dataplane

func (*Service) DeleteObjectStorage

func (s *Service) DeleteObjectStorage(id string) error

DeleteObjectStorage - Submits a request to delete object storage

func (*Service) GetAccountClusters added in v0.0.5

func (s *Service) GetAccountClusters(id string) ([]model.TKC, error)

func (*Service) GetCertificate

func (s *Service) GetCertificate(id string) (model.Certificate, error)

func (*Service) GetCertificates

func (s *Service) GetCertificates(query *CertificatesQuery) (model.Paged[model.Certificate], error)

func (*Service) GetCloudAccount

func (s *Service) GetCloudAccount(id string) (*model.CloudAccount, error)

GetCloudAccount - Submits a request to fetch cloud account

func (*Service) GetCloudAccounts

func (s *Service) GetCloudAccounts(query *CloudAccountsQuery) (model.Paged[model.CloudAccount], error)

func (*Service) GetDataPlaneById

func (s *Service) GetDataPlaneById(id string) (model.DataPlane, error)

func (*Service) GetDataPlaneRegions

func (s *Service) GetDataPlaneRegions() ([]model.DataPlaneRegion, error)

func (*Service) GetDataPlanes

func (s *Service) GetDataPlanes(query *DataPlanesQuery) (model.Paged[model.DataPlane], error)

func (*Service) GetDataplaneCounts added in v0.0.4

func (s *Service) GetDataplaneCounts() (model.DataplneCounts, error)

func (*Service) GetDnsconfig added in v0.0.4

func (s *Service) GetDnsconfig(query *DNSQuery) (model.Paged[model.Dns], error)

func (*Service) GetEligibleDataPlanes added in v0.0.5

func (s *Service) GetEligibleDataPlanes(query *EligibleDataPlanesQuery) (model.Paged[model.EligibleDataPlane], error)

func (*Service) GetHelmRelease added in v0.0.5

func (s *Service) GetHelmRelease(query *DNSQuery) (model.Paged[model.HelmVersions], error)

func (*Service) GetK8sClusterStorageClasses added in v0.0.5

func (s *Service) GetK8sClusterStorageClasses(query *StorageClassesQuery) ([]model.StorageClass, error)

func (*Service) GetObjectStorage

func (s *Service) GetObjectStorage(id string) (model.ObjectStorage, error)

func (*Service) GetObjectStorages

func (s *Service) GetObjectStorages(query *ObjectStoragesQuery) (model.Paged[model.ObjectStorage], error)

func (*Service) GetOrgHealthDetails added in v0.0.4

func (s *Service) GetOrgHealthDetails() (model.OrgHealthDetails, error)

func (*Service) GetProviderTypes

func (s *Service) GetProviderTypes() ([]string, error)

func (*Service) GetRegionsWithDataPlanes

func (s *Service) GetRegionsWithDataPlanes(regionsQuery *DataPlaneRegionsQuery) (map[string][]string, error)

func (*Service) GetTshirtSizes

func (s *Service) GetTshirtSizes(query *TshirtSizesQuery) (model.Paged[model.TshirtSize], error)

func (*Service) SyncDataPlane added in v1.1.2

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

func (*Service) UpdateCertificate

func (s *Service) UpdateCertificate(id string, requestBody *CertificateUpdateRequest) (*model.Certificate, error)

func (*Service) UpdateCloudAccount

func (s *Service) UpdateCloudAccount(id string, requestBody *CloudAccountUpdateRequest) error

UpdateCloudAccount - To Update the cloud account

func (*Service) UpdateDataPlane added in v0.0.4

func (s *Service) UpdateDataPlane(id string, requestBody *DataPlaneUpdateRequest) error

func (*Service) UpdateDataPlaneServices added in v1.1.2

func (s *Service) UpdateDataPlaneServices(requestBody *DataPlaneUpdateServicesRequest) (*model.TaskResponse, error)

func (*Service) UpdateObjectStore

func (s *Service) UpdateObjectStore(id string, requestBody *ObjectStorageUpdateRequest) (*model.ObjectStorage, error)

type StorageClassesQuery added in v0.0.5

type StorageClassesQuery struct {
	AccountId   string `schema:"accountId,omitempty"`
	ClusterName string `schema:"clusterName,omitempty"`
}

type TshirtSizesQuery

type TshirtSizesQuery struct {
	model.PageQuery
}

Jump to

Keyboard shortcuts

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