transcoder

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0, BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package transcoder is used for API related object transformations

Package transcoder is used for API related object transformations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeDatacenterIDFromProviderID

func DecodeDatacenterIDFromProviderID(providerID string) (string, error)

DecodeDatacenterIDFromProviderID decodes the given ProviderID to extract the datacenter 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 DecodeServerIDFromProviderID

func DecodeServerIDFromProviderID(providerID string) (string, error)

DecodeServerIDAsStringFromProviderID decodes the given ProviderID to extract the server ID.

PARAMETERS providerID string Provider ID to parse

func EncodeProviderID

func EncodeProviderID(datacenterID string, serverID string) string

EncodeProviderID encodes the ProviderID string based on the given zone and server UUID.

PARAMETERS providerID string Provider ID to parse

Types

type ServerData

type ServerData struct {
	DatacenterID string
	ID           string
}

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

Jump to

Keyboard shortcuts

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