storage

package
v0.0.0-...-77c5d82 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSuchKey        = errors.New("no such key")
	ErrNoSuchBucket     = errors.New("no such bucket")
	ErrKeyAlreadyExists = errors.New("key already exist")

	ErrUnsupportedMethod = errors.New("unsupported method")
)

Functions

This section is empty.

Types

type BlobItemOutput

type BlobItemOutput struct {
	Key          *string
	ETag         *string
	LastModified *time.Time
	Size         uint64
	StorageClass *string
}

func (BlobItemOutput) String

func (b BlobItemOutput) String() string

type BlobPrefixOutput

type BlobPrefixOutput struct {
	Prefix *string
}

func (BlobPrefixOutput) String

func (b BlobPrefixOutput) String() string

type Capabilities

type Capabilities struct {
	NoParallelMultipart bool
	MaxMultipartSize    uint64
	// indicates that the blob store has native support for directories
	DirBlob bool
	Name    string

	Base *CapacityBase
}

type CapacityBase

type CapacityBase struct {
	BlockSize       uint32
	Blocks          uint64
	BlocksFree      uint64
	BlocksAvailable uint64
	IoSize          uint32
	Inodes          uint64
	InodesFree      uint64
}

type CessConfig

type CessConfig struct {
}

TODO

type CessStorage

type CessStorage struct {
}

TODO

func (*CessStorage) Bucket

func (cs *CessStorage) Bucket() string

TODO

func (*CessStorage) Capabilities

func (cs *CessStorage) Capabilities() *Capabilities

TODO

func (*CessStorage) CopyBlob

func (cs *CessStorage) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)

TODO

func (*CessStorage) Delegate

func (cs *CessStorage) Delegate() interface{}

TODO

func (*CessStorage) DeleteBlob

func (cs *CessStorage) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)

TODO

func (*CessStorage) DeleteBlobs

func (cs *CessStorage) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)

TODO

func (*CessStorage) GetBlob

func (cs *CessStorage) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)

TODO

func (*CessStorage) HeadBlob

func (cs *CessStorage) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)

TODO

func (*CessStorage) Init

func (cs *CessStorage) Init(key string) error

TODO

func (*CessStorage) ListBlobs

func (cs *CessStorage) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)

TODO

func (*CessStorage) MakeBucket

func (cs *CessStorage) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)

TODO

func (*CessStorage) MultipartBlobAbort

func (cs *CessStorage) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)

TODO

func (*CessStorage) MultipartBlobAdd

func (cs *CessStorage) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)

TODO

func (*CessStorage) MultipartBlobBegin

func (cs *CessStorage) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)

TODO

func (*CessStorage) MultipartBlobCommit

func (cs *CessStorage) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)

TODO

func (*CessStorage) MultipartExpire

func (cs *CessStorage) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)

TODO

func (*CessStorage) PutBlob

func (cs *CessStorage) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)

TODO

func (*CessStorage) RemoveBucket

func (cs *CessStorage) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)

TODO

func (*CessStorage) RenameBlob

func (cs *CessStorage) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)

TODO

type CopyBlobInput

type CopyBlobInput struct {
	Source      string
	Destination string

	Size         *uint64
	ETag         *string            // if non-nil, do conditional copy
	Metadata     map[string]*string // if nil, copy from Source
	StorageClass *string            // if nil, copy from Source
}

type CopyBlobOutput

type CopyBlobOutput struct {
	RequestId string
}

type Delegator

type Delegator interface {
	Delegate() interface{}
}

type DeleteBlobInput

type DeleteBlobInput struct {
	Key string
}

type DeleteBlobOutput

type DeleteBlobOutput struct {
	RequestId string
}

type DeleteBlobsInput

type DeleteBlobsInput struct {
	Items []string
}

type DeleteBlobsOutput

type DeleteBlobsOutput struct {
	RequestId string
}

type GetBlobInput

type GetBlobInput struct {
	Key     string
	Start   uint64
	Count   uint64
	IfMatch *string
}

type GetBlobOutput

type GetBlobOutput struct {
	HeadBlobOutput

	Body io.ReadCloser

	RequestId string
}

type HeadBlobInput

type HeadBlobInput struct {
	Key string
}

type HeadBlobOutput

type HeadBlobOutput struct {
	BlobItemOutput

	ContentType *string
	Metadata    map[string]*string
	IsDirBlob   bool

	RequestId string
}

type ListBlobsInput

type ListBlobsInput struct {
	Prefix            *string
	Delimiter         *string
	MaxKeys           *uint32
	StartAfter        *string // XXX: not supported by Azure
	ContinuationToken *string
}

type ListBlobsOutput

type ListBlobsOutput struct {
	Prefixes              []BlobPrefixOutput
	Items                 []BlobItemOutput
	NextContinuationToken *string
	IsTruncated           bool

	RequestId string
}

type MakeBucketInput

type MakeBucketInput struct {
}

type MakeBucketOutput

type MakeBucketOutput struct {
	RequestId string
}

type MultipartBlobAbortOutput

type MultipartBlobAbortOutput struct {
	RequestId string
}

type MultipartBlobAddInput

type MultipartBlobAddInput struct {
	Commit     *MultipartBlobCommitInput
	PartNumber uint32

	Body io.ReadSeeker

	Size   uint64 // GCS wants to know part size
	Last   bool   // GCS needs to know if this part is the last one
	Offset uint64 // ADLv2 needs to know offset
}

type MultipartBlobAddOutput

type MultipartBlobAddOutput struct {
	RequestId string
}

type MultipartBlobBeginInput

type MultipartBlobBeginInput struct {
	Key         string
	Metadata    map[string]*string
	ContentType *string
}

type MultipartBlobCommitInput

type MultipartBlobCommitInput struct {
	Key *string

	Metadata map[string]*string
	UploadId *string
	Parts    []*string
	NumParts uint32
	// contains filtered or unexported fields
}

type MultipartBlobCommitOutput

type MultipartBlobCommitOutput struct {
	ETag         *string
	LastModified *time.Time
	StorageClass *string

	RequestId string
}

type MultipartExpireInput

type MultipartExpireInput struct {
}

type MultipartExpireOutput

type MultipartExpireOutput struct {
	RequestId string
}

type ObjectBackend

type ObjectBackend interface {
	Init(key string) error

	Capabilities() *Capabilities
	// typically this would return bucket/prefix
	Bucket() string
	HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
	ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
	DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
	DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
	RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
	CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
	GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
	PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
	MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
	MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
	MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
	MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
	MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
	RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
	MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
	Delegate() interface{}
}

/ Implementations of all the functions here are expected to be / concurrency-safe, except for / / Init() is called exactly once before any other functions are / called.

func NewCessStorage

func NewCessStorage(cfg *CessConfig) (ObjectBackend, error)

TODO

type ObjectBackendInitError

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

func (ObjectBackendInitError) Bucket

func (oe ObjectBackendInitError) Bucket() string

func (ObjectBackendInitError) Capabilities

func (oe ObjectBackendInitError) Capabilities() *Capabilities

func (ObjectBackendInitError) CopyBlob

func (oe ObjectBackendInitError) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)

func (ObjectBackendInitError) Delegate

func (oe ObjectBackendInitError) Delegate() interface{}

func (ObjectBackendInitError) DeleteBlob

func (ObjectBackendInitError) DeleteBlobs

func (ObjectBackendInitError) GetBlob

func (oe ObjectBackendInitError) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)

func (ObjectBackendInitError) HeadBlob

func (oe ObjectBackendInitError) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)

func (ObjectBackendInitError) Init

func (oe ObjectBackendInitError) Init(key string) error

func (ObjectBackendInitError) ListBlobs

func (ObjectBackendInitError) MakeBucket

func (ObjectBackendInitError) MultipartBlobAbort

func (ObjectBackendInitError) MultipartBlobAdd

func (ObjectBackendInitError) MultipartBlobBegin

func (ObjectBackendInitError) MultipartBlobCommit

func (ObjectBackendInitError) MultipartExpire

func (ObjectBackendInitError) PutBlob

func (oe ObjectBackendInitError) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)

func (ObjectBackendInitError) RemoveBucket

func (ObjectBackendInitError) RenameBlob

type ObjectBackendInitWrapper

type ObjectBackendInitWrapper struct {
	ObjectBackend
	// contains filtered or unexported fields
}

///////////////////////////////////////////

func (*ObjectBackendInitWrapper) Bucket

func (s *ObjectBackendInitWrapper) Bucket() string

func (*ObjectBackendInitWrapper) Capabilities

func (s *ObjectBackendInitWrapper) Capabilities() *Capabilities

func (*ObjectBackendInitWrapper) CopyBlob

func (*ObjectBackendInitWrapper) DeleteBlob

func (*ObjectBackendInitWrapper) DeleteBlobs

func (*ObjectBackendInitWrapper) GetBlob

func (*ObjectBackendInitWrapper) HeadBlob

func (*ObjectBackendInitWrapper) Init

func (s *ObjectBackendInitWrapper) Init(key string) error

func (*ObjectBackendInitWrapper) ListBlobs

func (*ObjectBackendInitWrapper) MakeBucket

func (*ObjectBackendInitWrapper) MultipartBlobAbort

func (*ObjectBackendInitWrapper) MultipartBlobAdd

func (*ObjectBackendInitWrapper) MultipartBlobBegin

func (*ObjectBackendInitWrapper) MultipartBlobCommit

func (*ObjectBackendInitWrapper) MultipartExpire

func (*ObjectBackendInitWrapper) PutBlob

func (*ObjectBackendInitWrapper) RemoveBucket

func (*ObjectBackendInitWrapper) RenameBlob

type PutBlobInput

type PutBlobInput struct {
	Key         string
	Metadata    map[string]*string
	ContentType *string
	DirBlob     bool

	Body io.ReadSeeker
	Size *uint64
}

type PutBlobOutput

type PutBlobOutput struct {
	ETag         *string
	LastModified *time.Time
	StorageClass *string

	RequestId string
}

type ReadSeekerCloser

type ReadSeekerCloser struct {
	io.ReadSeeker
}

func (*ReadSeekerCloser) Close

func (r *ReadSeekerCloser) Close() error

type RemoveBucketInput

type RemoveBucketInput struct {
}

type RemoveBucketOutput

type RemoveBucketOutput struct {
	RequestId string
}

type RenameBlobInput

type RenameBlobInput struct {
	Source      string
	Destination string
}

type RenameBlobOutput

type RenameBlobOutput struct {
	RequestId string
}

Jump to

Keyboard shortcuts

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