azureds

package
v0.0.0-...-693ab57 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureStorage

type AzureStorage struct {
	Config
}

AzureStorage is a storage representation

func NewAzureDatastore

func NewAzureDatastore(conf Config) (*AzureStorage, error)

NewAzureDatastore creates an AzureDatastore

func (*AzureStorage) Batch

func (storage *AzureStorage) Batch(ctx context.Context) (ds.Batch, error)

Batch returns a batch struct that can take more ops or be committed

func (*AzureStorage) Close

func (storage *AzureStorage) Close() error

Close is not implemented

func (*AzureStorage) Delete

func (storage *AzureStorage) Delete(ctx context.Context, k ds.Key) error

Delete deletes the specified key

func (*AzureStorage) Get

func (storage *AzureStorage) Get(ctx context.Context, k ds.Key) ([]byte, error)

Get gets the data from the desired key

func (*AzureStorage) GetBlockURL

func (storage *AzureStorage) GetBlockURL(key string) (*azblob.BlockBlobURL, error)

GetBlockURL returns the block url of a given key

func (*AzureStorage) GetSize

func (storage *AzureStorage) GetSize(ctx context.Context, k ds.Key) (size int, err error)

GetSize gets the size of the specified key

func (*AzureStorage) Has

func (storage *AzureStorage) Has(ctx context.Context, k ds.Key) (exists bool, err error)

Has checks if the given key exists

func (*AzureStorage) Put

func (storage *AzureStorage) Put(ctx context.Context, k ds.Key, value []byte) error

Put adds a key value pair to the storage

func (*AzureStorage) Query

func (storage *AzureStorage) Query(ctx context.Context, q dsq.Query) (dsq.Results, error)

Query returns a dsq result

func (*AzureStorage) Sync

func (storage *AzureStorage) Sync(ctx context.Context, prefix ds.Key) error

Sync is unimplemented

type Config

type Config struct {
	AccountName   string
	AccountKey    string
	ContainerName string
	FolderName    string
}

Config representation for all info needed

Jump to

Keyboard shortcuts

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