cs

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(ctx context.Context, opts ...option.ClientOption) (*Client, error)

func (*Client) NewObjectReader

func (c *Client) NewObjectReader(ctx context.Context, bucket model.CSBucket, object model.CSObjectName) (io.ReadCloser, error)

NewObjectReader implements interfaces.CloudStorage.

func (*Client) NewObjectWriter

func (c *Client) NewObjectWriter(ctx context.Context, bucket model.CSBucket, object model.CSObjectName) io.WriteCloser

NewObjectWriter implements interfaces.CloudStorage.

type Mock

type Mock struct {
	NewObjectWriterFn func(ctx context.Context, bucket model.CSBucket, object model.CSObjectName) io.WriteCloser
	Results           []*MockResult
}

func NewMock

func NewMock() *Mock

func (*Mock) NewObjectReader

func (x *Mock) NewObjectReader(ctx context.Context, bucket model.CSBucket, object model.CSObjectName) (io.ReadCloser, error)

func (*Mock) NewObjectWriter

func (x *Mock) NewObjectWriter(ctx context.Context, bucket model.CSBucket, object model.CSObjectName) io.WriteCloser

type MockResult

type MockResult struct {
	Body   Writer
	Bucket model.CSBucket
	Object model.CSObjectName
}

type Writer

type Writer struct {
	bytes.Buffer
	Closed bool
}

func (*Writer) Close

func (x *Writer) Close() error

Jump to

Keyboard shortcuts

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