Documentation
¶
Overview ¶
Package transcoder is used for API related object transformations
Package transcoder is used for API related object transformations
Index ¶
- func DecodeDatacenterFromProviderID(providerID string) (string, error)
- func DecodeProviderSpecFromMachineClass(machineClass *v1alpha1.MachineClass, secret *corev1.Secret) (*apis.ProviderSpec, error)
- func DecodeServerIDAsStringFromProviderID(providerID string) (string, error)
- func DecodeServerIDFromProviderID(providerID string) (int, error)
- func EncodeProviderID(datacenter string, serverID int) string
- type ServerData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeDatacenterFromProviderID ¶
DecodeDatacenterFromProviderID decodes the given ProviderID to extract the server ID.
PARAMETERS providerID string Provider ID to parse
func DecodeProviderSpecFromMachineClass ¶
func DecodeProviderSpecFromMachineClass(machineClass *v1alpha1.MachineClass, secret *corev1.Secret) (*apis.ProviderSpec, error)
DecodeProviderSpecFromMachineClass decodes the given MachineClass to receive the ProviderSpec.
PARAMETERS machineClass *v1alpha1.MachineClass MachineClass backing the machine object secret *corev1.Secret Kubernetes secret that contains any sensitive data/credentials
func DecodeServerIDAsStringFromProviderID ¶
DecodeServerIDAsStringFromProviderID decodes the given ProviderID to extract the server ID.
PARAMETERS providerID string Provider ID to parse
func DecodeServerIDFromProviderID ¶
DecodeServerIDFromProviderID decodes the given ProviderID to extract the server ID.
PARAMETERS providerID string Provider ID to parse
func EncodeProviderID ¶
EncodeProviderID encodes the ProviderID string based on the given datacenter and server ID.
PARAMETERS providerID string Provider ID to parse
Types ¶
type ServerData ¶
ProviderSpec is the spec to be used while parsing the calls.
func DecodeServerDataFromProviderID ¶
func DecodeServerDataFromProviderID(providerID string) (*ServerData, error)
DecodeServerDataFromProviderID decodes the given provider ID to extract the server specific data.
PARAMETERS providerID string Provider ID to parse