Documentation
¶
Index ¶
- type Client
- type ConditionalClient
- func (cc *ConditionalClient) Copy(ctx context.Context, from, to gcs.Path) (*storage.ObjectAttrs, error)
- func (cc *ConditionalClient) If(read, write *storage.Conditions) gcs.ConditionalClient
- func (cc *ConditionalClient) Objects(ctx context.Context, path gcs.Path, _, offset string) gcs.Iterator
- func (cc *ConditionalClient) Open(ctx context.Context, path gcs.Path) (io.ReadCloser, *storage.ReaderObjectAttrs, error)
- func (cc *ConditionalClient) Stat(ctx context.Context, path gcs.Path) (*storage.ObjectAttrs, error)
- func (cc *ConditionalClient) Upload(ctx context.Context, path gcs.Path, buf []byte, worldRead bool, cache string) (*storage.ObjectAttrs, error)
- type Iterator
- type Lister
- type Object
- type Opener
- type Reader
- type Stat
- type Stater
- type Upload
- type UploadClient
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConditionalClient ¶
type ConditionalClient struct {
UploadClient
Lock *sync.RWMutex
// contains filtered or unexported fields
}
ConditionalClient is a fake conditional client that can limit actions to matching conditions.
func (*ConditionalClient) Copy ¶
func (cc *ConditionalClient) Copy(ctx context.Context, from, to gcs.Path) (*storage.ObjectAttrs, error)
Copy copies the contents of 'from' into 'to'.
func (*ConditionalClient) If ¶
func (cc *ConditionalClient) If(read, write *storage.Conditions) gcs.ConditionalClient
If returns a fake conditional client.
func (*ConditionalClient) Objects ¶ added in v0.0.100
func (cc *ConditionalClient) Objects(ctx context.Context, path gcs.Path, _, offset string) gcs.Iterator
Objects in the
func (*ConditionalClient) Open ¶ added in v0.0.100
func (cc *ConditionalClient) Open(ctx context.Context, path gcs.Path) (io.ReadCloser, *storage.ReaderObjectAttrs, error)
Open the path conditionally.
func (*ConditionalClient) Stat ¶ added in v0.0.100
func (cc *ConditionalClient) Stat(ctx context.Context, path gcs.Path) (*storage.ObjectAttrs, error)
type Iterator ¶
type Iterator struct {
Objects []storage.ObjectAttrs
Idx int
Err int // must be > 0
Offset string
ErrOpen error
// contains filtered or unexported fields
}
An Iterator returns the attributes of the listed objects or an iterator.Done error.
type Object ¶
type Object struct {
Data string
Attrs *storage.ReaderObjectAttrs
OpenErr error
ReadErr error
CloseErr error
}
Object holds data for an object.
type Stat ¶
type Stat struct {
Err error
Attrs storage.ObjectAttrs
}
Stat contains object attributes for a given path.
type UploadClient ¶
UploadClient is a fake upload client
func (UploadClient) If ¶
func (fuc UploadClient) If(read, write *storage.Conditions) gcs.ConditionalClient
If returns a fake upload client.
Click to show internal directories.
Click to hide internal directories.