fake

package
v0.0.70 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 10 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 {
	Lister
	Opener
}

type ConditionalClient

type ConditionalClient struct {
	UploadClient
	// contains filtered or unexported fields
}

func (ConditionalClient) Copy

func (cc ConditionalClient) Copy(ctx context.Context, from, to gcs.Path) error

func (ConditionalClient) If

func (ConditionalClient) Upload

func (cc ConditionalClient) Upload(ctx context.Context, path gcs.Path, buf []byte, worldRead bool, cache string) error

type Iterator

type Iterator struct {
	Objects []storage.ObjectAttrs
	Idx     int
	Err     int // must be > 0

	Offset string
	// contains filtered or unexported fields
}

func (*Iterator) Next

func (fi *Iterator) Next() (*storage.ObjectAttrs, error)

type Lister

type Lister map[gcs.Path]Iterator

func (Lister) Objects

func (fl Lister) Objects(ctx context.Context, path gcs.Path, _, offset string) gcs.Iterator

type Object

type Object struct {
	Data     string
	OpenErr  error
	ReadErr  error
	CloseErr error
}

type Opener

type Opener map[gcs.Path]Object

func (Opener) Open

func (fo Opener) Open(ctx context.Context, path gcs.Path) (io.ReadCloser, error)

type Reader

type Reader struct {
	Buf      *bytes.Buffer
	ReadErr  error
	CloseErr error
}

func (*Reader) Close

func (fr *Reader) Close() error

func (*Reader) Read

func (fr *Reader) Read(p []byte) (int, error)

type Stat

type Stat struct {
	Err   error
	Attrs storage.ObjectAttrs
}

type Stater

type Stater map[gcs.Path]Stat

func (Stater) Stat

func (fs Stater) Stat(ctx context.Context, path gcs.Path) (*storage.ObjectAttrs, error)

type Upload

type Upload struct {
	Buf          []byte
	CacheControl string
	WorldRead    bool
	Err          error
	Generation   int64
}

type UploadClient

type UploadClient struct {
	Client
	Uploader
	Stater
}

func (UploadClient) If

func (fuc UploadClient) If(read, write *storage.Conditions) gcs.ConditionalClient

type Uploader

type Uploader map[gcs.Path]Upload

func (Uploader) Copy

func (fu Uploader) Copy(ctx context.Context, from, to gcs.Path) error

func (Uploader) Upload

func (fuc Uploader) Upload(ctx context.Context, path gcs.Path, buf []byte, worldRead bool, cacheControl string) error

Jump to

Keyboard shortcuts

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