cloud

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewSession = func(ctx context.Context, opt config.Cloud) (*storage.Client, error) {
	options := make([]option.ClientOption, 0)
	if opt.EndPoint != "" {
		options = append(options, option.WithEndpoint(opt.EndPoint))
	}
	if opt.WithoutAuthentication {
		options = append(options, option.WithoutAuthentication())
	}
	if opt.GRPCInsecure {
		options = append(options, option.WithGRPCDialOption(grpc.WithInsecure()))
	}
	return newClient(ctx, options...)
}

NewSession method

Functions

func NewExtendStorageDatabase

func NewExtendStorageDatabase(logger *zap.Logger, opt config.Cloud) (*storage.Client, func(), error)

Types

type ISession

type ISession interface {
	Bucket(name string) *storage.BucketHandle
	Buckets(ctx context.Context, projectID string) *storage.BucketIterator
	HMACKeyHandle(projectID, accessID string) *storage.HMACKeyHandle
	CreateHMACKey(ctx context.Context, projectID, serviceAccountEmail string, opts ...storage.HMACKeyOption) (*storage.HMACKey, error)
	ListHMACKeys(ctx context.Context, projectID string, opts ...storage.HMACKeyOption) *storage.HMACKeysIterator
	Close() error
	ServiceAccount(ctx context.Context, projectID string) (string, error)
}

ISession interface

Jump to

Keyboard shortcuts

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