client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 25 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TIMEOUT = time.Hour

	DefaultCredentialNamespace = "openshift-machine-api"
	DefaultCredentialSecret    = "powervs-credentials-secret"

	InstanceStateNameShutoff = "SHUTOFF"
	InstanceStateNameActive  = "ACTIVE"
	InstanceStateNameBuild   = "BUILD"

	PowerServiceType = "power-iaas"
)

Variables

View Source
var (
	ErrorInstanceNotFound = errors.New("Instance Not Found")
)

Functions

func FormatProviderID

func FormatProviderID(instanceID string) string

func GetAPIKey

func GetAPIKey(ctrlRuntimeClient client.Client, secretName, namespace string) (apikey string, err error)

Types

type Client

type Client interface {
	CreateInstance(*p_cloud_p_vm_instances.PcloudPvminstancesPostParams) (*models.PVMInstanceList, error)
	GetInstance(id string) (*models.PVMInstance, error)
	GetInstanceByName(name string) (*models.PVMInstance, error)
	GetInstances() (*models.PVMInstances, error)
	DeleteInstance(id string) error
	GetCloudServiceInstances() ([]bluemixmodels.ServiceInstanceV2, error)
}

Client is a wrapper object for actual PowerVS SDK clients to allow for easier testing.

func NewClientMinimal

func NewClientMinimal(apiKey string) (Client, error)

NewClientMinimal is bare minimal client can be used for quarrying the resources

func NewValidatedClient

func NewValidatedClient(ctrlRuntimeClient client.Client, secretName, namespace, cloudInstanceID, region string) (Client, error)

type PowerVSClientBuilderFuncType

type PowerVSClientBuilderFuncType func(client client.Client, secretName, namespace, cloudInstanceID, region string) (Client, error)

type User

type User struct {
	ID      string
	Email   string
	Account string
	// contains filtered or unexported fields
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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