subscription

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package subscription contains functions to call endpoints in the JSCP subscription API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleServiceAccount

type GoogleServiceAccount struct {
	ID          string `json:"id"`
	DisplayName string `json:"displayName"`
}

GoogleServiceAccount is the base type for Google Service Account data returned by the subscription API

type GoogleServiceAccountKey

type GoogleServiceAccountKey struct {
	// PrivateData is the service account credentials encoded in base64
	PrivateData string `json:"privateData"`
	// DockerConfig is a base64 encoded dockerconfig file using the service account credentials to access Jetstack's enterprise registries.
	DockerConfig string `json:"dockerConfig"`
}

GoogleServiceAccountKey represents the type of for the GCP SA key and docker config as returned by the subscription API

type GoogleServiceAccountWithKey

type GoogleServiceAccountWithKey struct {
	GoogleServiceAccount
	Key GoogleServiceAccountKey `json:"key"`
}

GoogleServiceAccountWithKey adds the key to GoogleServiceAccount

func CreateGoogleServiceAccount

func CreateGoogleServiceAccount(ctx context.Context, httpClient HTTPClient, organization, name string) ([]GoogleServiceAccountWithKey, error)

CreateGoogleServiceAccount calls the subscription API to create a new Google Service Account for GCR access

type HTTPClient

type HTTPClient interface {
	Do(ctx context.Context, method, uri string, body, out interface{}) error
}

The HTTPClient interface describes types that perform HTTP requests.

Jump to

Keyboard shortcuts

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