upload

package
v0.0.0-...-b7105a7 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2015 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assign

func Assign(r *types.AssignRequest) (*types.Assignment, error)

Assign takes an AssignRequest and returns an Assignment that can be used to upload a file later

func Upload

func Upload(a *types.Assignment, body io.Reader, blen int64, ct string, urlParams map[string]string) error

Upload takes an Assignment and a body and verifies that the body abides to the original AssignRequest and then uploads the body to seaweed. blen should indicate the length of the body. This can be http.Request's ContentLength. ct should indicate the content-type of the body urlParams should contain extra information you want to pass along in url params

If a MaxSize was specified in the original AssignRequest, then the body io.Reader is only read until the MaxSize

func Verify

func Verify(a *types.Assignment) error

Verify takes an assignment and validates the filename to the signature

Types

This section is empty.

Jump to

Keyboard shortcuts

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