gcp

package module
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MPL-2.0 Imports: 11 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCPAuth

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

func NewGCPAuth

func NewGCPAuth(roleName string, opts ...LoginOption) (*GCPAuth, error)

NewGCPAuth initializes a new GCP auth method interface to be passed as a parameter to the client.Auth().Login method.

Supported options: WithMountPath, WithIAMAuth, WithGCEAuth

func (*GCPAuth) Login

func (a *GCPAuth) Login(ctx context.Context, client *api.Client) (*api.Secret, error)

Login sets up the required request body for the GCP auth method's /login endpoint, and performs a write to it. This method defaults to the "gce" auth type unless NewGCPAuth is called with WithIAMAuth().

type LoginOption

type LoginOption func(a *GCPAuth) error

func WithGCEAuth

func WithGCEAuth() LoginOption

func WithIAMAuth

func WithIAMAuth(serviceAccountEmail string) LoginOption

func WithMountPath

func WithMountPath(mountPath string) LoginOption

Jump to

Keyboard shortcuts

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