manta

package
v0.0.0-...-41c8bc3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2016 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotAllowed = &ErrorResponse{
		http.StatusMethodNotAllowed,
		"Method is not allowed",
		"text/plain; charset=UTF-8",
		"MethodNotAllowedError",
		nil,
		nil,
	}
	ErrNotFound = &ErrorResponse{
		http.StatusNotFound,
		"Resource Not Found",
		"text/plain; charset=UTF-8",
		"NotFoundError",
		nil,
		nil,
	}
	ErrBadRequest = &ErrorResponse{
		http.StatusBadRequest,
		"Malformed request url",
		"text/plain; charset=UTF-8",
		"BadRequestError",
		nil,
		nil,
	}
)

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Code int
	Body string
	// contains filtered or unexported fields
}

ErrorResponse defines a single HTTP error response.

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

func (*ErrorResponse) ServeHTTP

func (e *ErrorResponse) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Manta

type Manta struct {
	localservices.ServiceInstance
	// contains filtered or unexported fields
}

func New

func New(serviceURL, userAccount string) *Manta

func (*Manta) AddJobInputs

func (m *Manta) AddJobInputs(id string, jobInputs []byte) error

func (*Manta) CancelJob

func (m *Manta) CancelJob(id string) error

func (*Manta) CreateJob

func (m *Manta) CreateJob(job []byte) (string, error)

func (*Manta) DeleteDirectory

func (m *Manta) DeleteDirectory(path string) error

func (*Manta) DeleteObject

func (m *Manta) DeleteObject(objPath string) error

func (*Manta) EndJobInput

func (m *Manta) EndJobInput(id string) error

func (*Manta) GetJob

func (m *Manta) GetJob(id string) (*manta.Job, error)

func (*Manta) GetJobErrors

func (m *Manta) GetJobErrors(id string) ([]manta.JobError, error)

func (*Manta) GetJobFailures

func (m *Manta) GetJobFailures(id string) (string, error)

func (*Manta) GetJobInput

func (m *Manta) GetJobInput(id string) (string, error)

func (*Manta) GetJobOutput

func (m *Manta) GetJobOutput(id string) (string, error)

func (*Manta) GetObject

func (m *Manta) GetObject(objPath string) ([]byte, error)

func (*Manta) IsDirectory

func (m *Manta) IsDirectory(name string) bool

func (*Manta) IsObject

func (m *Manta) IsObject(name string) bool

func (*Manta) ListDirectory

func (m *Manta) ListDirectory(path, marker string, limit int) ([]manta.Entry, error)

Directories APIs

func (*Manta) ListJobs

func (m *Manta) ListJobs(live bool) ([]manta.Entry, error)

Job APIs

func (*Manta) PutDirectory

func (m *Manta) PutDirectory(path string) error

func (*Manta) PutObject

func (m *Manta) PutObject(path, objName string, objData []byte) error

Objects APIs

func (m *Manta) PutSnapLink(path, linkName, location string) error

Link APIs

func (*Manta) SetupHTTP

func (m *Manta) SetupHTTP(mux *httprouter.Router)

setupHTTP attaches all the needed handlers to provide the HTTP API.

Jump to

Keyboard shortcuts

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