Joyent Manta client for Go


go get



roadmap / todo

Expand ▾ Collapse ▴



    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.

                      Source Files


                      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