gcp

package
v0.10.3-0...-54aaeda Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const GcsDefaultAddress = "storage.googleapis.com"

Variables

This section is empty.

Functions

func NewMinioClient

func NewMinioClient(address string, opts *minio.Options) (*minio.Client, error)

NewMinioClient returns a minio.Client which is compatible for GCS

Types

type WrapHTTPTransport

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

WrapHTTPTransport wraps http.Transport, add an auth header to support GCP native auth

func NewWrapHTTPTransport

func NewWrapHTTPTransport(secure bool) (*WrapHTTPTransport, error)

NewWrapHTTPTransport constructs a new WrapHTTPTransport

func (*WrapHTTPTransport) RoundTrip

func (t *WrapHTTPTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip wraps original http.RoundTripper by Adding a Bearer token acquired from tokenSrc

Jump to

Keyboard shortcuts

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