storage

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareBuckets

func CompareBuckets(a, b *ServiceBucket) error

func IsNotExistErr

func IsNotExistErr(err error) bool

func IsPermissionDeniedErr added in v0.1.4

func IsPermissionDeniedErr(err error) bool

Types

type Service

type Service interface {
	CreateBucket(ctx context.Context, b *ServiceBucket) (*ServiceBucket, error)
	GetBucket(ctx context.Context, b *ServiceBucket) (*ServiceBucket, error)
	DeleteBucket(ctx context.Context, b *ServiceBucket) error
	SetIAMPolicy(ctx context.Context, obj *ServiceBucket, member, roleName string) error
	CheckBucketExists(ctx context.Context, obj *ServiceBucket) (bool, error)
}

type ServiceBucket

type ServiceBucket struct {
	Project                        string
	Name                           string
	Location                       string
	SizeBytes                      int64
	Labels                         map[string]string
	EnableUniformBucketLevelAccess bool
}

type ServiceManager

type ServiceManager interface {
	SetupService(ctx context.Context, ts oauth2.TokenSource) (Service, error)
	SetupServiceWithDefaultCredential(ctx context.Context) (Service, error)
}

func NewFakeServiceManager

func NewFakeServiceManager() ServiceManager

func NewGCSServiceManager

func NewGCSServiceManager() (ServiceManager, error)

Jump to

Keyboard shortcuts

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