config

package
v0.1.63 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoogleCredentials

func GoogleCredentials(ctx context.Context, scopes ...string) (*google.Credentials, error)

func NewDockerClient

func NewDockerClient() (*dockerclient.Client, error)

func NewGCPCloudResourceManagerClient added in v0.1.58

func NewGCPCloudResourceManagerClient(ctx context.Context, cred *google.Credentials) (*cloudresourcemanager.Service, error)

func NewGCPComputeClient

func NewGCPComputeClient(ctx context.Context, cred *google.Credentials) (*compute.Service, error)

func NewGCPIAMClient added in v0.1.58

func NewGCPIAMClient(ctx context.Context, cred *google.Credentials) (*iam.Service, error)

func NewGCPRunClient

func NewGCPRunClient(ctx context.Context, cred *google.Credentials, region string) (*run.APIService, error)

func NewGCPSQLAdminClient added in v0.1.58

func NewGCPSQLAdminClient(ctx context.Context, cred *google.Credentials) (*sqladmin.Service, error)

func NewGCPServiceUsageClient added in v0.1.58

func NewGCPServiceUsageClient(ctx context.Context, cred *google.Credentials) (*serviceusage.Service, error)

func NewStorageClient

func NewStorageClient(ctx context.Context, cred *google.Credentials) (*storage.Client, error)

Types

type PluginContext

type PluginContext struct {
	// contains filtered or unexported fields
}

func NewPluginContext

func NewPluginContext(e env.Enver, gcred *google.Credentials, settings *Settings) *PluginContext

func (*PluginContext) DockerClient

func (c *PluginContext) DockerClient() (*dockerclient.Client, error)

func (*PluginContext) Env

func (c *PluginContext) Env() env.Enver

func (*PluginContext) FuncCache

func (c *PluginContext) FuncCache(key string, f func() (interface{}, error)) (interface{}, error)

func (*PluginContext) GCPComputeClient

func (c *PluginContext) GCPComputeClient(ctx context.Context) (*compute.Service, error)

func (*PluginContext) GCPRunClient

func (c *PluginContext) GCPRunClient(ctx context.Context, region string) (*run.APIService, error)

func (*PluginContext) GCPSQLAdminClient added in v0.1.19

func (c *PluginContext) GCPSQLAdminClient(ctx context.Context) (*sqladmin.Service, error)

func (*PluginContext) GCPServiceUsageClient

func (c *PluginContext) GCPServiceUsageClient(ctx context.Context) (*serviceusage.Service, error)

func (*PluginContext) GoogleCredentials

func (c *PluginContext) GoogleCredentials() *google.Credentials

func (*PluginContext) Settings

func (c *PluginContext) Settings() *Settings

func (*PluginContext) StorageClient

func (c *PluginContext) StorageClient(ctx context.Context) (*storage.Client, error)

type Settings

type Settings struct {
	ProjectID     string
	ProjectNumber int64
	Region        string
}

Jump to

Keyboard shortcuts

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