handler

package
v0.3.22-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package handler implements the ReShifter HTTP handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupCreate

func BackupCreate(w http.ResponseWriter, r *http.Request)

BackupCreate responds to HTTP POST requests such as:

http GET localhost:8080/v1/backup endpoint=http://localhost:2379

func BackupList

func BackupList(w http.ResponseWriter, r *http.Request)

BackupList responds to HTTP GET requests at:

http GET localhost:8080/v1/backup/all?remote=play.minio.io:9000&bucket=test123

func BackupRetrieve

func BackupRetrieve(w http.ResponseWriter, r *http.Request)

BackupRetrieve responds to HTTP GET requests such as:

http GET localhost:8080/v1/backup/1498230556

func EPstats

func EPstats(w http.ResponseWriter, r *http.Request)

EPstats responds to HTTP GET requests such as:

http GET localhost:8080/v1/epstats?endpoint=http%3A%2F%2Flocalhost%3A2379

func Explorer

func Explorer(w http.ResponseWriter, r *http.Request)

Explorer responds to HTTP GET requests such as:

http GET localhost:8080/v1/explorer?endpoint=http%3A%2F%2Flocalhost%3A2379

func Restore

func Restore(w http.ResponseWriter, r *http.Request)

Restore responds to HTTP POST requests such as:

http POST localhost:8080/v1/restore endpoint=http://localhost:2379 backupid=1498230556

func RestoreUpload

func RestoreUpload(w http.ResponseWriter, r *http.Request)

RestoreUpload responds to HTTP POST requests at:

http POST localhost:8080/v1/restore/upload

func Version

func Version(w http.ResponseWriter, r *http.Request)

Version responds to HTTP GET requests of the form:

http GET localhost:8080/v1/version

Types

type BackupRequest

type BackupRequest struct {
	Endpoint   string `json:"endpoint"`
	Remote     string `json:"remote"`
	Bucket     string `json:"bucket"`
	Filter     string `json:"filter"`
	APIversion string `json:"apiversion"`
}

BackupRequest represents the request for a backup operation.

type BackupResult

type BackupResult struct {
	Outcome  string `json:"outcome"`
	BackupID string `json:"backupid"`
}

BackupResult represents the results of a backup operation.

type RestoreRequest

type RestoreRequest struct {
	Endpoint string `json:"endpoint"`
	BackupID string `json:"backupid"`
	Remote   string `json:"remote"`
	Bucket   string `json:"bucket"`
}

RestoreRequest represents the request for a restore operation.

type RestoreResult

type RestoreResult struct {
	Outcome      string  `json:"outcome"`
	KeysRestored int     `json:"keysrestored"`
	ElapsedTime  float64 `json:"elapsedtimeinsec"`
}

RestoreResult represents the results of a restore operation.

Jump to

Keyboard shortcuts

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