Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conditions ¶
type Conditions struct { IfMatch string IfModifiedSince time.Time IfNoneMatch string IfUnmodifiedSince time.Time }
func ConditionsFromRequest ¶
func ConditionsFromRequest(req *http.Request) *Conditions
type ObjectMeta ¶
type ObjectMeta struct { ContentType string `json:"contentType,omitempty"` ContentLength *int64 `json:"contentLength"` ETag string `json:"eTag,omitempty"` Expires time.Time `json:"expires,omitempty"` LastModified time.Time `json:"lastModified,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` VersionID string `json:"versionID,omitempty"` }
ObjectMeta is the metadata we store about an S3 object.
func ObjectMetaFromObject ¶
func ObjectMetaFromObject(obj *s3.GetObjectOutput) *ObjectMeta
func ObjectMetaFromObjectHead ¶
func ObjectMetaFromObjectHead(head *s3.HeadObjectOutput) *ObjectMeta
func (*ObjectMeta) WriteHeaders ¶
func (m *ObjectMeta) WriteHeaders(h http.Header)
type Storage ¶
type Storage struct { Bucket string // contains filtered or unexported fields }
func (*Storage) Get ¶
func (s *Storage) Get(ctx context.Context, path string, cond *Conditions) (*ObjectMeta, io.ReadCloser, error)
func (*Storage) Head ¶
func (s *Storage) Head(ctx context.Context, path string, cond *Conditions) (*ObjectMeta, error)
Click to show internal directories.
Click to hide internal directories.