gcloud

package
v0.4.0-preview Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthServiceAccount

func AuthServiceAccount() error

AuthServiceAccount authenticates gcloud using application credentials.

func GetKubeConfig

func GetKubeConfig(gcpProjectID string) error

GetKubeConfig gets the kubeconfig.

func NewEnv

func NewEnv(ctx context.Context, gcpProjectID string) (*api.Env, error)

NewEnv returns an api.Env for GCP.

Types

type CloudBuild

type CloudBuild struct {
	GCPProjectID string
}

CloudBuild implements ContainerBuilder for Cloud Build.

func NewCloudBuild

func NewCloudBuild(ctx context.Context, gcpProjectID string) (*CloudBuild, error)

NewCloudBuild returns a new instance of Firestore.

func (*CloudBuild) GetBuildType

func (cb *CloudBuild) GetBuildType() *v1.BuildType

GetBuildType returns the build type for skaffold.

type FirebaseAuth

type FirebaseAuth struct {
	Client *firebaseAuth.Client
}

FirebaseAuth implements api.Auth for Firebase authentication (Cloud IP)

func NewFirebaseAuth

func NewFirebaseAuth(ctx context.Context, gcpProjectID string) (*FirebaseAuth, error)

NewFirebaseAuth returns a new instance of FirebaseAuth.

func (*FirebaseAuth) VerifyIDToken

func (auth *FirebaseAuth) VerifyIDToken(accessToken string) (string, error)

VerifyIDToken verifies ID tokens and returns the token UID.

type Firestore

type Firestore struct {
	FS *firestore.Client
}

Firestore implements api.DB for Firestore.

func NewFirestore

func NewFirestore(ctx context.Context, GCPProjectID string) (*Firestore, error)

NewFirestore returns a new instance of Firestore.

func (*Firestore) GetVersionnedAPI

func (fs *Firestore) GetVersionnedAPI(im api.ImageName) (*api.Version, error)

GetVersionnedAPI retrieves an api version from the DB.

func (*Firestore) IsUserAdminOfNamespace

func (fs *Firestore) IsUserAdminOfNamespace(UID string, namespace string) (bool, error)

IsUserAdminOfNamespace check if the namespace has UID as admin.

func (*Firestore) UpdateAPIMetadata

func (fs *Firestore) UpdateAPIMetadata(imageID string, metadata *map[string]interface{}) error

UpdateAPIMetadata updates API metadata

func (*Firestore) UpdateVersionnedAPI

func (fs *Firestore) UpdateVersionnedAPI(imID string, version string, template *api.Version) error

UpdateVersionnedAPI updates a versioned API.

type GCR

type GCR struct {
	GCPProjectID string
}

GCR implements ContainerRegistry for GCR.

func NewGCR

func NewGCR(ctx context.Context, gcpProjectID string) (*GCR, error)

NewGCR returns a new instance of GCR.

func (*GCR) GetDockerImagePath

func (gcr *GCR) GetDockerImagePath(im api.ImageName) string

GetDockerImagePath returns the fully qualified URL of a docker image on the appropriate registry.

func (*GCR) ListImageTags

func (gcr *GCR) ListImageTags(repoName string) error

ListImageTags lists all tags of an image on gcr.io.

Jump to

Keyboard shortcuts

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