storage

package
v1.7.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudStorage

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

func NewCloudStorage

func NewCloudStorage(storageRepo repo.Storage) *CloudStorage

func NewCloudStorageWithProviderConstructor

func NewCloudStorageWithProviderConstructor(storageRepo repo.Storage, providerConstructor provider.Constructor) *CloudStorage

func (*CloudStorage) Create

func (s *CloudStorage) Create(ctx context.Context, storage *entity.Storage) error

func (*CloudStorage) Get

func (s *CloudStorage) Get(ctx context.Context, sid int64) (*entity.Storage, error)

func (*CloudStorage) GetProvider

func (s *CloudStorage) GetProvider(ctx context.Context, sid int64) (provider.Provider, error)

func (*CloudStorage) GetProviderByStorage

func (s *CloudStorage) GetProviderByStorage(storage *entity.Storage) (provider.Provider, error)

type Storage

type Storage interface {
	Create(ctx context.Context, storage *entity.Storage) error
	Get(ctx context.Context, sid int64) (*entity.Storage, error)
	GetProvider(ctx context.Context, id int64) (provider.Provider, error)
}

Jump to

Keyboard shortcuts

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