vpc

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultIBMCloudIAMApiEndpoint = "https://iam.cloud.ibm.com"
	KeyIBMCloudIAMApiEndpoint     = "IBMCLOUD_IAM_API_ENDPOINT"
	KeyIBMCloudApiKey             = "IBMCLOUD_API_KEY" // #nosec
)
View Source
const (
	DefaultRegion     = "us-south"
	KeyIBMCloudRegion = "IBMCLOUD_REGION"
)
View Source
const (
	KeyIBMCloudGsApiEndpoint     = "IBMCLOUD_GS_API_ENDPOINT"
	DefaultIBMCloudGsApiEndpoint = globalsearchv2.DefaultServiceURL
)
View Source
const (
	KeyIBMCloudGtApiEndpoint     = "IBMCLOUD_GT_API_ENDPOINT"
	DefaultIBMCloudGtApiEndpoint = globaltaggingv1.DefaultServiceURL
)
View Source
const (
	KeyIBMCloudIsApiEndpoint = "IBMCLOUD_IS_API_ENDPOINT"
)

Variables

View Source
var ErrorStockImageNotFound = errors.New("stock image was not found")
View Source
var InstanceNotFound = errors.New("instance was not found")

Functions

func CreateAuthenticator

func CreateAuthenticator(apiKey string, isIAMApiEndpoint string) (core.Authenticator, error)

func CreateAuthenticatorFromEnv added in v0.0.5

func CreateAuthenticatorFromEnv(env E.Environment) (core.Authenticator, error)

func CreateGlobalSearchService added in v0.0.5

func CreateGlobalSearchService(auth core.Authenticator, globalSearchEndpoint string) (*globalsearchv2.GlobalSearchV2, error)

func CreateGlobalSearchServiceFromEnv added in v0.0.5

func CreateGlobalSearchServiceFromEnv(auth core.Authenticator, env E.Environment) (*globalsearchv2.GlobalSearchV2, error)

func CreateGlobalTaggingService added in v0.0.5

func CreateGlobalTaggingService(auth core.Authenticator, globalTaggingEndpoint string) (*globaltaggingv1.GlobalTaggingV1, error)

func CreateTaggingServiceFromEnv

func CreateTaggingServiceFromEnv(auth core.Authenticator, env E.Environment) (*globaltaggingv1.GlobalTaggingV1, error)

func CreateVpcService

func CreateVpcService(auth core.Authenticator, isApiEndpoint string) (*vpcv1.VpcV1, error)

func CreateVpcServiceFromEnv

func CreateVpcServiceFromEnv(auth core.Authenticator, env E.Environment) (*vpcv1.VpcV1, error)

func CreateVpcServiceFromEnvAndRegion added in v0.0.5

func CreateVpcServiceFromEnvAndRegion(auth core.Authenticator, region string, env E.Environment) (*vpcv1.VpcV1, error)

func EnvFromDotEnv

func EnvFromDotEnv(root string) (env.Environment, error)

func FindInstance

func FindInstance(service *vpcv1.VpcV1, name string) (*vpcv1.Instance, error)

func FindLatestStockImage

func FindLatestStockImage(service *vpcv1.VpcV1) (string, error)

func FindRegionFromSubnet added in v0.0.5

func FindRegionFromSubnet(search *globalsearchv2.GlobalSearchV2) func(subnetID string) (string, error)

FindRegionFromSubnet locates the region from a subnet

func Findimage

func Findimage(service *vpcv1.VpcV1, name string) (string, error)

func GetDefaultIBMCloudApiEndpoint

func GetDefaultIBMCloudApiEndpoint(region string) string

func GetGlobalSearchEndpoint added in v0.0.5

func GetGlobalSearchEndpoint(env E.Environment) string

GetGlobalSearchEndpoint returns the configured endpoint URL for the search API

func GetIBMCloudApiEndpoint

func GetIBMCloudApiEndpoint(env E.Environment, defEndpoint string) string

GetIBMCloudApiEndpoint returns the configured endpoint URL for the VPC APIs

func GetIBMCloudApiKey

func GetIBMCloudApiKey(env E.Environment) (string, error)

func GetIBMCloudGtApiEndpoint

func GetIBMCloudGtApiEndpoint(env E.Environment) string

func GetIBMCloudIAMApiEndpoint

func GetIBMCloudIAMApiEndpoint(env E.Environment) string

func GetRegion

func GetRegion(env E.Environment) string

Types

type Image

type Image struct {
	ID      string
	Version *semver.Version
}

func FindStockImages

func FindStockImages(service *vpcv1.VpcV1) ([]Image, error)

Jump to

Keyboard shortcuts

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