storage

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProviderType

func GetProviderType(p *storage.Config) (string, error)

Types

type Service

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

func NewService

func NewService(logger *zap.Logger, ps project.Service, rs repository.Storage, rsec repository.Secret) *Service

func (*Service) CopyObject

func (s *Service) CopyObject(ctx context.Context, dstBucket, dstPath, srcBucket, srcPath string) error

func (*Service) CreateBucket

func (s *Service) CreateBucket(ctx context.Context, name, providerName, region string, providerID uuid.UUID) error

func (*Service) CreateProvider

func (s *Service) CreateProvider(ctx context.Context, name string, config *storage.Config, linkBuckets bool) (uuid.UUID, *storage.Provider, error)

func (*Service) DeleteBucket

func (s *Service) DeleteBucket(ctx context.Context, bucketName string) error

func (*Service) DeleteObject

func (s *Service) DeleteObject(ctx context.Context, bucketName, path string) error

func (*Service) DeleteProvider

func (s *Service) DeleteProvider(ctx context.Context, providerID uuid.UUID) error

func (*Service) DownloadObject

func (s *Service) DownloadObject(ctx context.Context, bucketName, path string) (io.ReadSeekCloser, error)

func (*Service) GetBucket

func (s *Service) GetBucket(ctx context.Context, bucketName string) (*storage.Bucket, error)

func (*Service) GetObject

func (s *Service) GetObject(ctx context.Context, bucketName, path string) (*storage.Object, error)

func (*Service) GetProvider

func (s *Service) GetProvider(ctx context.Context, providerID uuid.UUID) (*storage.Provider, error)

func (*Service) GetSettings

func (s *Service) GetSettings(ctx context.Context) (*settings.Settings, error)

func (*Service) ListBuckets

func (s *Service) ListBuckets(ctx context.Context) (iterator.Iterator[*storage.Bucket], error)

func (*Service) ListObjects

func (s *Service) ListObjects(ctx context.Context, bucketName, token, prefix, startpath, endpath string, recursive bool, limit uint32) (string, iterator.Iterator[*storage.ListObjectsResponse_Result], error)

func (*Service) ListProviders

func (s *Service) ListProviders(ctx context.Context, pagination *model.Pagination) (iterator.Iterator[*storage.ProviderEntry], uint64, error)

func (*Service) LookupProvider

func (s *Service) LookupProvider(ctx context.Context, name string) (uuid.UUID, *storage.Provider, error)

func (*Service) UnlinkBucket

func (s *Service) UnlinkBucket(ctx context.Context, bucket string) error

func (*Service) UploadObject

func (s *Service) UploadObject(ctx context.Context, reader io.Reader, metadata *storage.UploadObjectRequest_Metadata) (string, uint64, error)

Jump to

Keyboard shortcuts

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