Documentation
¶
Index ¶
- type ObjectReader
- func (or *ObjectReader) Close() error
- func (or *ObjectReader) ETag() string
- func (or *ObjectReader) LastMod() time.Time
- func (or *ObjectReader) Name() string
- func (or *ObjectReader) Read(buf []byte) (int, error)
- func (or *ObjectReader) Seek(offset int64, whence int) (int64, error)
- func (or *ObjectReader) Size() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectReader ¶
type ObjectReader struct {
// contains filtered or unexported fields
}
ObjectReader implements io.ReadCloser and io.ReadSeeker for reading a Cloud Storage object.
func NewObjectReader ¶
func NewObjectReader(ctx context.Context, bucket, name string) (*ObjectReader, error)
func (*ObjectReader) Close ¶
func (or *ObjectReader) Close() error
func (*ObjectReader) ETag ¶
func (or *ObjectReader) ETag() string
ETag returns the object's HTTP/1.1 Entity tag as supplied by Cloud Storage. The returned string should be enclosed in double quotes if sending it as an ETag header.
func (*ObjectReader) LastMod ¶
func (or *ObjectReader) LastMod() time.Time
LastMod returns the object's last-modified time.
func (*ObjectReader) Name ¶
func (or *ObjectReader) Name() string
Name returns the object's name within its bucket.
func (*ObjectReader) Size ¶
func (or *ObjectReader) Size() int64
Size returns the object's full size in bytes.
Click to show internal directories.
Click to hide internal directories.