Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionFunc ¶
type OptionFunc func(*Writer)
func (OptionFunc) Apply ¶
func (o OptionFunc) Apply(w *Writer)
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Example ¶
package main import ( "archive/zip" "github.com/aws/aws-sdk-go/aws/session" "github.com/hjr265/s3ow" ) func main() { s, _ := session.NewSession() ow := s3ow.New(s, s3ow.Bucket(""), s3ow.Key("")) zw := zip.NewWriter(ow) // Add stuff to zip. zw.Close() ow.Close() // Returns nil after upload is complete, or error. }
Output:
func New ¶
func New(c client.ConfigProvider, opts ...Option) *Writer
New returns an object writer that satisfies io.WriteCloser.
func (*Writer) Close ¶
Close marks the EOF for this upload, waits until the upload finishes, and returns error if any.
func (*Writer) Output ¶
func (w *Writer) Output() *s3manager.UploadOutput
Output returns the output from the upload call to s3manager. This should be called after Close returns.