api

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	App     *cfenv.App
	S3      *s3.Client
	Service *service.Service
}

Handler holds all objects and configurations used across API requests

func New

func New() *Handler

func (*Handler) CreateBackup

func (h *Handler) CreateBackup(c echo.Context) error

swagger:route POST /api/v1/backup/{service_type}/{service_name} backup createBackup Creates a new backup for given service.

produces: - application/json

schemes: http, https

responses:

202:

func (*Handler) DeleteBackup

func (h *Handler) DeleteBackup(c echo.Context) error

swagger:route DELETE /api/v1/backup/{service_type}/{service_name}/{filename} backup deleteBackup Deletes a backup file from S3 for given service.

produces: - application/json

schemes: http, https

responses:

204:

func (*Handler) DownloadBackup

func (h *Handler) DownloadBackup(c echo.Context) error

swagger:route GET /api/v1/backup/{service_type}/{service_name}/{filename}/download backup downloadBackup Download a backup file for given service.

produces: - application/json

schemes: http, https

responses:

200:

func (*Handler) GetBackup

func (h *Handler) GetBackup(c echo.Context) error

swagger:route GET /api/v1/backup/{service_type}/{service_name}/{filename} backup getBackup Returns a single backup file object for given service.

produces: - application/json

schemes: http, https

responses:

200: backup

func (*Handler) GetBackups added in v1.5.0

func (h *Handler) GetBackups(c echo.Context) error

swagger:route GET /api/v1/backup/{service_type}/{service_name} backup getBackups Returns a full backup object for given service.

produces: - application/json

schemes: http, https

responses:

200: backup

func (*Handler) GetState added in v1.5.0

func (h *Handler) GetState(c echo.Context) error

swagger:route GET /api/v1/state/{service_type}/{service_name} state getState Returns current/last operation state of backup/restore.

produces: - application/json

schemes: http, https

responses:

200: state

func (*Handler) ListBackups

func (h *Handler) ListBackups(c echo.Context) error

swagger:route GET /api/v1/backups backup listBackups Lists all backup objects.

produces: - application/json

schemes: http, https

responses:

200: backups

func (*Handler) ListServices

func (h *Handler) ListServices(c echo.Context) error

swagger:route GET /api/v1/services service listServices Lists all services managed by backman.

produces: - application/json

schemes: http, https

responses:

200: services

func (*Handler) ListStates added in v1.5.0

func (h *Handler) ListStates(c echo.Context) error

swagger:route GET /api/v1/states state listStates Lists current/last operation state of all service types.

produces: - application/json

schemes: http, https

responses:

200: states

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(e *echo.Echo)

func (*Handler) RestoreBackup

func (h *Handler) RestoreBackup(c echo.Context) error

swagger:route POST /api/v1/restore/{service_type}/{service_name} restore restoreBackup Triggers a restore for given service.

produces: - application/json

schemes: http, https

responses:

202:

Jump to

Keyboard shortcuts

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