Documentation ¶
Index ¶
Constants ¶
const (
// UserAgent is the user agent addition that identifies the Crossplane IONOS Cloud Clients
UserAgent = "crossplane-provider-ionoscloud"
)
Variables ¶
This section is empty.
Functions ¶
func GetCoreResourceState ¶
func GetCoreResourceState(object CoreResource) string
GetCoreResourceState fetches the state of the metadata of the CoreResource If either the metadata is nil, or the state is nil, the empty string is returned
func GetDBaaSPsqlResourceState ¶ added in v1.0.9
func GetDBaaSPsqlResourceState(object DBaaSResource) sdkdbaas.State
GetDBaaSPsqlResourceState fetches the state of the metadata of the CoreResource If either the metadata is nil, or the state is nil, the empty string is returned
func UpdateCondition ¶
func UpdateCondition(cr ResourceWithState, state string)
UpdateCondition will update the condition of the given ResourceWithState to the given state. This function implements the common mapping of ionos cloud states to crossplane conditions
Types ¶
type CoreResource ¶
type CoreResource interface {
GetMetadataOk() (*sdkgo.DatacenterElementMetadata, bool)
}
CoreResource is an ionos cloud API object with metadata
type DBaaSResource ¶
type DBaaSResource interface {
GetMetadataOk() (*sdkdbaas.ClusterMetadata, bool)
}
DBaaSResource is a dbaas cloud API object with metadata
type IonosServices ¶
type IonosServices struct { DBaaSPostgresClient *sdkdbaas.APIClient DBaaSMongoClient *mongo.APIClient ComputeClient *sdkgo.APIClient DataplatformClient *dataplatform.APIClient }
IonosServices contains ionos clients
func ConnectForCRD ¶
func ConnectForCRD(ctx context.Context, mg resource.Managed, client kubeclient.Client, t resource.Tracker) (*IonosServices, error)
ConnectForCRD resolves the referenced ProviderConfig and extracts the connection secret from that ProviderConfig. After that an ionos client is setup with those credentials.
func NewIonosClients ¶
func NewIonosClients(data []byte) (*IonosServices, error)
NewIonosClients creates a IonosService from the given data. The data must be a json struct with the fields `User`, `Password`, `Token`. Both fields must be a string value. The password string must be base64 encoded.
type ResourceWithState ¶
ResourceWithState is a resource which allow to update the conditions