gcputil

package
v0.0.0-...-d0e585f Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RESecretHeader = regexp.MustCompile(`(?m:^([^:]*(Auth|Security)[^:]*):.*$)`)
)

Functions

func DumpRequest

func DumpRequest(r *http.Request) string

func DumpResponse

func DumpResponse(r *http.Response) string

func HideSecureHeaders

func HideSecureHeaders(dump []byte) []byte

Types

type CloudSQLClient

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

func NewSQLClient

func NewSQLClient(ctx context.Context, opts ...option.ClientOption) (c *CloudSQLClient, err error)

func (*CloudSQLClient) Close

func (c *CloudSQLClient) Close() error

func (*CloudSQLClient) GetOperation

func (c *CloudSQLClient) GetOperation(ctx context.Context, project, operation string) (*cloudsql.Operation, error)

func (*CloudSQLClient) List

func (*CloudSQLClient) Remove

func (c *CloudSQLClient) Remove(ctx context.Context, project, dbInstance string) (*cloudsql.Operation, error)

type Credentials

type Credentials struct {
	Keyfile string
	Project string
}

func (*Credentials) GetNewClientOptions

func (c *Credentials) GetNewClientOptions() (options []option.ClientOption)

func (*Credentials) UseAppDefaultCreds

func (c *Credentials) UseAppDefaultCreds() bool

func (*Credentials) Validate

func (c *Credentials) Validate() error

type ErrSkipRequest

type ErrSkipRequest string

func (ErrSkipRequest) Error

func (err ErrSkipRequest) Error() string

type ErrUnknownEndpoint

type ErrUnknownEndpoint string

func (ErrUnknownEndpoint) Error

func (err ErrUnknownEndpoint) Error() string

type GCPClient

type GCPClient interface {
	Close() error
}

type IAMClient

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

func NewIAMClient

func NewIAMClient(ctx context.Context, opts ...option.ClientOption) (c *IAMClient, err error)

func (*IAMClient) Close

func (c *IAMClient) Close() error

func (IAMClient) GetIAMService

func (c IAMClient) GetIAMService() *iam.Service

type Project

type Project struct {
	Name string

	Creds     *Credentials
	Locations []string
	// contains filtered or unexported fields
}

func NewProject

func NewProject(creds *Credentials) *Project

func (*Project) AddClient

func (p *Project) AddClient(resourceType string, client GCPClient)

func (*Project) CloseClients

func (p *Project) CloseClients()

func (*Project) GetClient

func (p *Project) GetClient(resourceType string) (GCPClient, bool)

func (*Project) GetContext

func (p *Project) GetContext() context.Context

Jump to

Keyboard shortcuts

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