package module
v0.0.0-...-c0ac332 Latest Latest

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

Go to latest
Published: Nov 20, 2013 License: BSD-2-Clause Imports: 18 Imported by: 0



Joyent Manta client for Go


go get



roadmap / todo



Manta implements a client for the Joyent Manta API.

Included in the package is an incomplete implementation of the CLI Utilities.



This section is empty.


View Source
var (
	MANTA_USER   string
	MANTA_URL    string
	MANTA_KEY_ID string


func Flags

func Flags() *flag.FlagSet

Flags returns a flag.FlagSet containing the shared flags required for DefaultClient.


type Client

type Client struct {
	User  string
	KeyId string
	Key   string
	Url   string
	// contains filtered or unexported fields

Client is a Manta client. Client is not safe for concurrent use.

func DefaultClient

func DefaultClient() *Client

DefaultClient returns a Client instance configured from the default Manta environment variables.

func (*Client) Do

func (c *Client) Do(method, path string, r io.Reader) (*http.Response, error)

Do executes a method request and returns the response.

func (*Client) Get

func (c *Client) Get(path string) (*http.Response, error)

Get executes a GET request and returns the response.

func (*Client) NewRequest

func (c *Client) NewRequest(method, path string, r io.Reader) (*http.Request, error)

NewRequest is similar to http.NewRequest except it appends path to the API endpoint this client is configured for.

func (*Client) Put

func (c *Client) Put(path string, r io.Reader) (*http.Response, error)

Put executes a PUT request and returns the response.

func (*Client) SignRequest

func (c *Client) SignRequest(req *http.Request) error

SignRequest signs the 'date' field of req.

type Signer

type Signer interface {
	// Sign returns raw signature for the given data. This method
	// will apply the hash specified for the keytype to the data.
	Sign(data []byte) ([]byte, error)

A Signer is can create signatures that verify against a public key.


Path Synopsis
mget - download an object from Manta.
mget - download an object from Manta.
mls - list directory contents.
mls - list directory contents.
mput - create an object
mput - create an object

Jump to

Keyboard shortcuts

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