Documentation ¶
Overview ¶
Package transcoder is used for API related object transformations
Package transcoder is used for API related object transformations
Index ¶
- func DecodeProviderSpecFromMachineClass(machineClass *v1alpha1.MachineClass, secret *corev1.Secret) (*apis.ProviderSpec, error)
- func DecodeServerIDAsStringFromProviderID(providerID string) (string, error)
- func DecodeServerIDFromProviderID(providerID string) (int, error)
- func DecodeZoneFromProviderID(providerID string) (string, error)
- func EncodeProviderID(zone string, serverID int) string
- type ServerData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 DecodeZoneFromProviderID ¶ added in v0.2.0
DecodeZoneFromProviderID decodes the given ProviderID to extract the datacenter zone.
PARAMETERS providerID string Provider ID to parse
func EncodeProviderID ¶
EncodeProviderID encodes the ProviderID string based on the given zone and server ID.
PARAMETERS zone string Datacenter zone serverID string Server ID
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