gcpshared

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinProviderID

func JoinProviderID(project, zone, instanceName string) string

JoinProviderID builds a k8s provider ID for GCP instances. A providerID is build after the schema 'gce://<project-id>/<zone>/<instance-name>'

func SplitProviderID

func SplitProviderID(providerID string) (project, zone, instance string, err error)

SplitProviderID splits a provider's id into core components. A providerID is build after the schema 'gce://<project-id>/<zone>/<instance-name>'

Types

type ServiceAccountKey

type ServiceAccountKey struct {
	Type                    string `json:"type"`
	ProjectID               string `json:"project_id"`
	PrivateKeyID            string `json:"private_key_id"`
	PrivateKey              string `json:"private_key"`
	ClientEmail             string `json:"client_email"`
	ClientID                string `json:"client_id"`
	AuthURI                 string `json:"auth_uri"`
	TokenURI                string `json:"token_uri"`
	AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url"`
	ClientX509CertURL       string `json:"client_x509_cert_url"`
}

ServiceAccountKey is a GCP service account key.

func ServiceAccountKeyFromURI

func ServiceAccountKeyFromURI(serviceAccountURI string) (ServiceAccountKey, error)

func (ServiceAccountKey) ToCloudServiceAccountURI

func (k ServiceAccountKey) ToCloudServiceAccountURI() string

ToCloudServiceAccountURI converts the ServiceAccountKey into a cloud service account URI.

Jump to

Keyboard shortcuts

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