gcs

package
v0.0.0-...-8018a7e Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	S3Client          s3iface.S3API
	GCPClient         func() (s3.GCPClient, error)
	Context           *context.Context
	Config            *viper.Viper
	GCPClientToBucket func(bucket string, client s3.GCPClient) s3.GCPBucket
	GCPBucketToObject func(name string, bucket s3.GCPBucket) s3.GCPObject
	GCPObjectToWriter func(object s3.GCPObject, ctx context.Context) s3.GCPObjectWriter
	GCPClientPerKey   map[string]s3.GCPClient

	GCPClientPool map[string][]s3.GCPClient
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(config *viper.Viper) Handler

func (*Handler) BucketRename

func (handler *Handler) BucketRename(bucket string) string

func (*Handler) GCPRequestSetup

func (handler *Handler) GCPRequestSetup(request *http.Request) (s3.GCPClient, error)

func (*Handler) GetConfig

func (handler *Handler) GetConfig() *viper.Viper

func (*Handler) GetConnection

func (handler *Handler) GetConnection(key string) (s3.GCPClient, error)

func (*Handler) GetContext

func (handler *Handler) GetContext() *context.Context

func (*Handler) ReturnConnection

func (handler *Handler) ReturnConnection(client s3.GCPClient, request *http.Request)

func (*Handler) ReturnConnectionByKey

func (handler *Handler) ReturnConnectionByKey(client s3.GCPClient, key string)

func (*Handler) SetConfig

func (handler *Handler) SetConfig(config *viper.Viper)

func (*Handler) SetContext

func (handler *Handler) SetContext(context *context.Context)

func (*Handler) SetGCPClientFromCreds

func (handler *Handler) SetGCPClientFromCreds(creds *string) (s3.GCPClient, error)

func (*Handler) Shutdown

func (handler *Handler) Shutdown()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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