Documentation
¶
Index ¶
- type Client
- type ClientOption
- type ClusterRegistrationOperations
- func (op ClusterRegistrationOperations) CreateK8sRegistration(ctx context.Context, createRequest *K8sCreateClusterRegistrationRequest) (*K8sCreateClusterRegistrationResponse, error)
- func (op ClusterRegistrationOperations) DeleteK8sRegistration(ctx context.Context, k8sClusterUUID string, params DeleteK8sRegistrationParams) (*K8sClusterRegistrationDeleteResponse, error)
- func (op ClusterRegistrationOperations) DeleteK8sRegistrationKubeconfig(ctx context.Context, k8sClusterUUID string, ...) (*K8sClusterKubeconfigDeleteResponse, error)
- func (op ClusterRegistrationOperations) GetK8sClusterRegistrationKubeconfig(ctx context.Context, k8sClusterUUID string) (*K8sClusterKubeconfigResponse, error)
- func (op ClusterRegistrationOperations) GetK8sRegistration(ctx context.Context, k8sClusterUUID string) (*K8sClusterRegistration, error)
- func (op ClusterRegistrationOperations) GetK8sRegistrationList(ctx context.Context) (*K8sClusterRegistrationList, error)
- func (op ClusterRegistrationOperations) UpdateK8sRegistration(ctx context.Context, updaetRequest *PatchK8sClusterRegistrationParams) (*K8sClusterKubeconfigUpdateResponse, error)
- func (op ClusterRegistrationOperations) UpdateK8sRegistrationAddonInfo(ctx context.Context, k8sClusterUUID, addonName string, ...) (*K8sUpdateClusterRegistrationAddonInfoResponse, error)
- func (op ClusterRegistrationOperations) UpdateK8sRegistrationAddonMetrics(ctx context.Context, k8sClusterUUID uuid.UUID, addonName string, ...) (*K8sUpdateClusterRegistrationAddonMetricsResponse, error)
- func (op ClusterRegistrationOperations) UpdateK8sRegistrationInfo(ctx context.Context, k8sClusterUUID string, ...) (*K8sUpdateClusterRegistrationInfoResponse, error)
- func (op ClusterRegistrationOperations) UpdateK8sRegistrationMetrics(ctx context.Context, k8sClusterUUID uuid.UUID, ...) (*K8sUpdateClusterRegistrationMetricsResponse, error)
- type ClusterRegistrationService
- type DeleteK8sRegistrationKubeconfigParams
- type DeleteK8sRegistrationParams
- type K8sClusterAddonInfo
- type K8sClusterAddonInfoMapping
- type K8sClusterAddonMetrics
- type K8sClusterCategoriesMapping
- type K8sClusterInfoMapping
- type K8sClusterKubeconfigDeleteResponse
- type K8sClusterKubeconfigResponse
- type K8sClusterKubeconfigUpdateRequest
- type K8sClusterKubeconfigUpdateResponse
- type K8sClusterMetrics
- type K8sClusterRegistration
- type K8sClusterRegistrationDeleteResponse
- type K8sClusterRegistrationList
- type K8sClusterResource
- type K8sClusterResourceList
- type K8sCreateClusterRegistrationRequest
- type K8sCreateClusterRegistrationResponse
- type K8sUpdateClusterRegistrationAddonInfoRequest
- type K8sUpdateClusterRegistrationAddonInfoResponse
- type K8sUpdateClusterRegistrationAddonMetricsRequest
- type K8sUpdateClusterRegistrationAddonMetricsResponse
- type K8sUpdateClusterRegistrationInfoRequest
- type K8sUpdateClusterRegistrationInfoResponse
- type K8sUpdateClusterRegistrationMetricsRequest
- type K8sUpdateClusterRegistrationMetricsResponse
- type MetaOperations
- type MetaSemanticVersionResponse
- type MetaService
- type MetaVersionResponse
- type Metadata
- type PatchK8sClusterRegistrationParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Meta MetaService
ClusterRegistrationOperations ClusterRegistrationOperations
// contains filtered or unexported fields
}
Client manages the Konnector API
func NewKonnectorAPIClient ¶
func NewKonnectorAPIClient(credentials prismgoclient.Credentials, opts ...ClientOption) (*Client, error)
NewKonnectorAPIClient return a internal to operate Konnector resources
type ClientOption ¶
ClientOption is a type alias for functional options for Client
func WithCertificate ¶
func WithCertificate(certificate *x509.Certificate) ClientOption
WithCertificate sets the certificate for the client
func WithPEMEncodedCertBundle ¶
func WithPEMEncodedCertBundle(certBundle []byte) ClientOption
WithPEMEncodedCertBundle sets the certificates for the client
func WithRoundTripper ¶
func WithRoundTripper(transport http.RoundTripper) ClientOption
WithRoundTripper overrides the transport for the underlying http client Overriding transport is useful for testing against API Mocks This is not recommended for production use
type ClusterRegistrationOperations ¶
type ClusterRegistrationOperations struct {
// contains filtered or unexported fields
}
ClusterRegistrationOperations ...
func (ClusterRegistrationOperations) CreateK8sRegistration ¶
func (op ClusterRegistrationOperations) CreateK8sRegistration(ctx context.Context, createRequest *K8sCreateClusterRegistrationRequest) (*K8sCreateClusterRegistrationResponse, error)
CreateK8sRegistration creates the k8s registration
func (ClusterRegistrationOperations) DeleteK8sRegistration ¶
func (op ClusterRegistrationOperations) DeleteK8sRegistration(ctx context.Context, k8sClusterUUID string, params DeleteK8sRegistrationParams) (*K8sClusterRegistrationDeleteResponse, error)
DeleteK8sRegistration deletes the k8s registration with UUID
func (ClusterRegistrationOperations) DeleteK8sRegistrationKubeconfig ¶
func (op ClusterRegistrationOperations) DeleteK8sRegistrationKubeconfig(ctx context.Context, k8sClusterUUID string, params DeleteK8sRegistrationKubeconfigParams) (*K8sClusterKubeconfigDeleteResponse, error)
DeleteK8sRegistrationKubeconfig deletes the kubeconfig of the cluster
func (ClusterRegistrationOperations) GetK8sClusterRegistrationKubeconfig ¶
func (op ClusterRegistrationOperations) GetK8sClusterRegistrationKubeconfig(ctx context.Context, k8sClusterUUID string) (*K8sClusterKubeconfigResponse, error)
GetK8sClusterRegistrationKubeconfig gets the k8s cluster registration kubeconfig
func (ClusterRegistrationOperations) GetK8sRegistration ¶
func (op ClusterRegistrationOperations) GetK8sRegistration(ctx context.Context, k8sClusterUUID string) (*K8sClusterRegistration, error)
GetK8sRegistration gets the k8s registration with UUID
func (ClusterRegistrationOperations) GetK8sRegistrationList ¶
func (op ClusterRegistrationOperations) GetK8sRegistrationList(ctx context.Context) (*K8sClusterRegistrationList, error)
GetK8sRegistrationList gets the k8s registration list
func (ClusterRegistrationOperations) UpdateK8sRegistration ¶
func (op ClusterRegistrationOperations) UpdateK8sRegistration(ctx context.Context, updaetRequest *PatchK8sClusterRegistrationParams) (*K8sClusterKubeconfigUpdateResponse, error)
func (ClusterRegistrationOperations) UpdateK8sRegistrationAddonInfo ¶
func (op ClusterRegistrationOperations) UpdateK8sRegistrationAddonInfo(ctx context.Context, k8sClusterUUID, addonName string, updateAddonInfoRequest *K8sUpdateClusterRegistrationAddonInfoRequest) (*K8sUpdateClusterRegistrationAddonInfoResponse, error)
UpdateK8sRegistrationAddonInfo updates k8s info
func (ClusterRegistrationOperations) UpdateK8sRegistrationAddonMetrics ¶
func (op ClusterRegistrationOperations) UpdateK8sRegistrationAddonMetrics(ctx context.Context, k8sClusterUUID uuid.UUID, addonName string, updateAddonInfoRequest *K8sUpdateClusterRegistrationAddonMetricsRequest) (*K8sUpdateClusterRegistrationAddonMetricsResponse, error)
UpdateK8sRegistrationAddonInfo updates k8s info
func (ClusterRegistrationOperations) UpdateK8sRegistrationInfo ¶
func (op ClusterRegistrationOperations) UpdateK8sRegistrationInfo(ctx context.Context, k8sClusterUUID string, updateInfoRequest *K8sUpdateClusterRegistrationInfoRequest) (*K8sUpdateClusterRegistrationInfoResponse, error)
UpdateK8sRegistrationInfo updates k8s info
func (ClusterRegistrationOperations) UpdateK8sRegistrationMetrics ¶
func (op ClusterRegistrationOperations) UpdateK8sRegistrationMetrics(ctx context.Context, k8sClusterUUID uuid.UUID, updateInfoRequest *K8sUpdateClusterRegistrationMetricsRequest) (*K8sUpdateClusterRegistrationMetricsResponse, error)
UpdateK8sRegistrationInfo updates k8s info
type ClusterRegistrationService ¶
type ClusterRegistrationService interface {
// Cluster Registration
CreateK8sRegistration(ctx context.Context, createRequest *K8sCreateClusterRegistrationRequest) (*K8sCreateClusterRegistrationResponse, error)
UpdateK8sRegistration(ctx context.Context, updaetRequest *PatchK8sClusterRegistrationParams) (*K8sClusterKubeconfigUpdateResponse, error)
DeleteK8sRegistration(ctx context.Context, uuid string, params DeleteK8sRegistrationParams) (*K8sClusterRegistrationDeleteResponse, error)
DeleteK8sRegistrationKubeconfig(ctx context.Context, uuid string, params DeleteK8sRegistrationKubeconfigParams) (*K8sClusterKubeconfigDeleteResponse, error)
GetK8sRegistration(ctx context.Context, UUID string) (*K8sClusterRegistration, error)
GetK8sRegistrationList(ctx context.Context) (*K8sClusterRegistrationList, error)
UpdateK8sRegistrationInfo(ctx context.Context, k8sClusterUUID string, updateInfoRequest *K8sUpdateClusterRegistrationInfoRequest) (*K8sUpdateClusterRegistrationInfoResponse, error)
UpdateK8sRegistrationAddonInfo(ctx context.Context, k8sClusterUUID, addonName string, updateAddonInfoRequest *K8sUpdateClusterRegistrationAddonInfoRequest) (*K8sUpdateClusterRegistrationAddonInfoResponse, error)
GetK8sClusterRegistrationKubeconfig(ctx context.Context, k8sClusterUUID string) (*K8sClusterKubeconfigResponse, error)
}
type DeleteK8sRegistrationKubeconfigParams ¶
type DeleteK8sRegistrationKubeconfigParams struct {
Force bool `url:"force,omitempty"`
}
DeleteK8sRegistrationKubeconfigParams parameters for DeleteK8sRegistrationKubeconfig
type DeleteK8sRegistrationParams ¶
type DeleteK8sRegistrationParams struct {
Force bool `url:"force,omitempty"`
}
DeleteK8sRegistrationParams parameters for DeleteK8sRegistration
type K8sClusterAddonInfo ¶
K8sClusterAddonInfo Addons information for this k8s cluster. This allows setting up multiple values from a single key.
type K8sClusterAddonInfoMapping ¶
type K8sClusterAddonInfoMapping map[string]K8sClusterAddonInfo
K8sClusterAddonInfoMapping Addons information for this k8s cluster. This allows setting up multiple values from a single key.
type K8sClusterAddonMetrics ¶
type K8sClusterAddonMetrics map[string]K8sClusterResourceList
K8sClusterAddonMetrics addon metrics information gathered for resources under k8s cluster
type K8sClusterCategoriesMapping ¶
K8sClusterCategoriesMapping Categories for this k8s cluster. This allows setting up multiple values from a single key.
type K8sClusterInfoMapping ¶
K8sClusterInfoMapping Cluster information for this k8s cluster. This allows setting up multiple values from a single key.
type K8sClusterKubeconfigDeleteResponse ¶
type K8sClusterKubeconfigDeleteResponse struct {
// The UUID of the task tracking the Kubernetes cluster kubeconfig deletion.
// Required: true
TaskUUID *string `json:"task_uuid"`
}
type K8sClusterKubeconfigResponse ¶
type K8sClusterKubeconfigResponse struct {
// SHA-256 hash of the kubernetes cluster's kubeconfig content
// Required: true
KubeconfigChecksum *string `json:"kubeconfig_checksum"`
// Kubernetes cluster kubeconfig update status.
TaskStatus string `json:"task_status,omitempty"`
// The UUID of the task tracking the kubeconfig update.
TaskUUID string `json:"task_uuid,omitempty"`
}
K8sClusterKubeconfigResponse k8s cluster kubeconfig response
type K8sClusterKubeconfigUpdateRequest ¶
type K8sClusterKubeconfigUpdateRequest struct {
// Base64 encoded kubeconfig YAML content
// Required: true
Kubeconfig *string `json:"kubeconfig"`
}
type K8sClusterKubeconfigUpdateResponse ¶
type K8sClusterKubeconfigUpdateResponse struct {
// task uuid
// Required: true
TaskUUID *string `json:"task_uuid"`
}
type K8sClusterMetrics ¶
type K8sClusterMetrics map[string]K8sClusterResourceList
K8sClusterMetrics metrics information gathered for resources under k8s cluster.
type K8sClusterRegistration ¶
type K8sClusterRegistration struct {
// addons info
AddonsInfo K8sClusterAddonInfoMapping `json:"addons_info,omitempty"`
// categories mapping
CategoriesMapping K8sClusterCategoriesMapping `json:"categories_mapping,omitempty"`
// cluster info
ClusterInfo K8sClusterInfoMapping `json:"cluster_info,omitempty"`
// The type of 3rd party k8s cluster.
// Enum: [Openshift NKP CAPX]
K8sDistribution string `json:"k8s_distribution,omitempty"`
// K8s cluster name.
// Required: true
// Max Length: 40
// Min Length: 1
Name *string `json:"name"`
// K8s cluster registration status.
Status string `json:"status,omitempty"`
// The universally unique identifier (UUID) of the k8s cluster.
// Pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
UUID string `json:"uuid,omitempty"`
}
K8sClusterRegistration K8s cluster registration details.
type K8sClusterRegistrationDeleteResponse ¶
type K8sClusterRegistrationDeleteResponse struct {
// Name of the k8s cluster being deleted.
ClusterName string `json:"cluster_name,omitempty"`
// UUID of the k8s cluster being deleted.
ClusterUUID string `json:"cluster_uuid,omitempty"`
// UUID of the task tracking the k8s cluster deletion.
// Required: true
TaskUUID *string `json:"task_uuid"`
}
type K8sClusterRegistrationList ¶
type K8sClusterRegistrationList []*K8sClusterRegistration
type K8sClusterResource ¶
type K8sClusterResource struct {
// child resource
ChildResource map[string]K8sClusterResourceList `json:"ChildResource,omitempty"`
// metadata
Metadata map[string]string `json:"Metadata,omitempty"`
// name
Name string `json:"Name,omitempty"`
// UUID
UUID string `json:"UUID,omitempty"`
}
K8sClusterResource k8s cluster resource includes name, UUID, metadata and children resources
type K8sClusterResourceList ¶
type K8sClusterResourceList []*K8sClusterResource
K8sClusterResourceList list of the resources gathered under k8s cluster
type K8sCreateClusterRegistrationRequest ¶
type K8sCreateClusterRegistrationRequest struct {
// categories mapping
// Required: true
CategoriesMapping K8sClusterCategoriesMapping `json:"categories_mapping"`
// The type of 3rd party k8s cluster.
// Required: true
// Enum: [Openshift NKP CAPX EKSA]
K8sDistribution *string `json:"k8s_distribution"`
// metadata
// Required: true
Metadata *Metadata `json:"metadata"`
// Unique name of the k8s cluster.
// Example: prod-cluster
// Required: true
// Max Length: 40
// Min Length: 1
// Pattern: [a-z0-9]([-a-z0-9]*[a-z0-9])?
Name *string `json:"name"`
// The universally unique identifier (UUID) of the k8s cluster.
// Required: true
// Pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
UUID *string `json:"uuid"`
}
type K8sUpdateClusterRegistrationAddonInfoRequest ¶
type K8sUpdateClusterRegistrationAddonInfoRequest struct {
// cluster addon info
// Required: true
ClusterAddonInfo K8sClusterAddonInfo `json:"cluster_addon_info"`
}
K8sUpdateClusterRegistrationAddonInfoRequest k8s update cluster registration addon info request
type K8sUpdateClusterRegistrationAddonInfoResponse ¶
type K8sUpdateClusterRegistrationAddonInfoResponse struct {
// cluster name
ClusterName string `json:"cluster_name,omitempty"`
// cluster uuid
ClusterUUID string `json:"cluster_uuid,omitempty"`
}
K8sUpdateClusterRegistrationAddonInfoResponse k8s update cluster registration addon info response
type K8sUpdateClusterRegistrationAddonMetricsRequest ¶
type K8sUpdateClusterRegistrationAddonMetricsRequest struct {
// cluster addon metrics
ClusterAddonMetrics K8sClusterAddonMetrics `json:"cluster_addon_metrics"`
}
K8sUpdateClusterRegistrationAddonMetricsRequest k8s update cluster registration addon metrics request
type K8sUpdateClusterRegistrationAddonMetricsResponse ¶
type K8sUpdateClusterRegistrationAddonMetricsResponse struct {
// cluster name
ClusterName string `json:"cluster_name,omitempty"`
// cluster uuid
ClusterUUID string `json:"cluster_uuid,omitempty"`
}
K8sUpdateClusterRegistrationAddonMetricsResponse k8s update cluster registration addon metrics response
type K8sUpdateClusterRegistrationInfoRequest ¶
type K8sUpdateClusterRegistrationInfoRequest struct {
// cluster info
// Required: true
ClusterInfo K8sClusterInfoMapping `json:"cluster_info"`
}
K8sUpdateClusterRegistrationInfoRequest k8s update cluster registration info request
type K8sUpdateClusterRegistrationInfoResponse ¶
type K8sUpdateClusterRegistrationInfoResponse struct {
// cluster name
ClusterName string `json:"cluster_name,omitempty"`
// cluster uuid
ClusterUUID string `json:"cluster_uuid,omitempty"`
}
K8sUpdateClusterRegistrationInfoResponse k8s update cluster registration info response
type K8sUpdateClusterRegistrationMetricsRequest ¶
type K8sUpdateClusterRegistrationMetricsRequest struct {
// cluster metrics
ClusterMetrics K8sClusterMetrics `json:"cluster_metrics"`
}
K8sUpdateClusterRegistrationMetricsRequest k8s update cluster registration metrics request
type K8sUpdateClusterRegistrationMetricsResponse ¶
type K8sUpdateClusterRegistrationMetricsResponse struct {
// cluster name
ClusterName string `json:"cluster_name,omitempty"`
// cluster uuid
ClusterUUID string `json:"cluster_uuid,omitempty"`
}
K8sUpdateClusterRegistrationMetricsResponse k8s update cluster registration metrics response
type MetaOperations ¶
type MetaOperations struct {
// contains filtered or unexported fields
}
MetaOperations wrap the internal http client and provide the implementation for the MetaService interface
func (MetaOperations) GetSemanticVersion ¶
func (op MetaOperations) GetSemanticVersion(ctx context.Context) (*MetaSemanticVersionResponse, error)
GetSemanticVersion is a wrapper on GetVersion and returns the konnector semantic version
func (MetaOperations) GetVersion ¶
func (op MetaOperations) GetVersion(ctx context.Context) (*MetaVersionResponse, error)
GetVersion returns the konnector version
type MetaService ¶
type MetaService interface {
GetVersion(ctx context.Context) (*MetaVersionResponse, error)
GetSemanticVersion(ctx context.Context) (*MetaSemanticVersionResponse, error)
}
MetaService provides the interface for the konnector metadata e.g. Versions Konnector v2.1
type MetaVersionResponse ¶
type Metadata ¶
type Metadata struct {
// Konnector API version.
// Required: true
// Pattern: ^v?(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
APIVersion *string `json:"api_version"`
}
type PatchK8sClusterRegistrationParams ¶
type PatchK8sClusterRegistrationParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*Update the cluster registration parameters
Required: true
In: body
*/
Body *K8sClusterKubeconfigUpdateRequest
/*Kubernetes cluster registration UUID.
Required: true
In: path
*/
ID string
}