backup

package
v0.0.0-...-f34f428 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BACKUP_CONNECTION_NONE    ConnectionType = "NONE"
	BACKUP_CONNECTION_CURRENT                = "CURRENT"
	BACKUP_CONNECTION_ALL                    = "ALL"
)

Variables

This section is empty.

Functions

func Init

Init creates a new backup/restore plugin

Types

type BackupContent

type BackupContent struct {
	Payload   []byte `json:"payload"`
	DBVersion int64  `json:"dbVersion"`
}

BackupContent - Everything that's backed up and stored in a file client side

type BackupContentPayload

type BackupContentPayload struct {
	Endpoints []map[string]interface{}
	Tokens    []interfaces.BackupTokenRecord
}

BackupContentPayload - Encrypted part of the backup

type BackupEndpointsState

type BackupEndpointsState struct {
	Endpoint bool           `json:"endpoint"`
	Connect  ConnectionType `json:"connect"`
}

BackupEndpointsState - For a given endpoint define what's backed up

type BackupRequest

type BackupRequest struct {
	State    map[string]BackupEndpointsState `json:"state"`
	Password string                          `json:"password"`
}

BackupRequest - Request from client to create a back up file

type BackupRestore

type BackupRestore struct {
	// contains filtered or unexported fields
}

BackupRestore - Backup or restore endpoints and tokens

func (*BackupRestore) AddAdminGroupRoutes

func (br *BackupRestore) AddAdminGroupRoutes(echoGroup *echo.Group)

AddAdminGroupRoutes adds the admin routes for this plugin to the Echo server

func (*BackupRestore) AddSessionGroupRoutes

func (br *BackupRestore) AddSessionGroupRoutes(echoGroup *echo.Group)

AddSessionGroupRoutes adds the session routes for this plugin to the Echo server

func (*BackupRestore) GetEndpointPlugin

func (br *BackupRestore) GetEndpointPlugin() (interfaces.EndpointPlugin, error)

GetEndpointPlugin gets the endpoint plugin for this plugin

func (*BackupRestore) GetMiddlewarePlugin

func (br *BackupRestore) GetMiddlewarePlugin() (interfaces.MiddlewarePlugin, error)

GetMiddlewarePlugin gets the middleware plugin for this plugin

func (*BackupRestore) GetRoutePlugin

func (br *BackupRestore) GetRoutePlugin() (interfaces.RoutePlugin, error)

GetRoutePlugin gets the route plugin for this plugin

func (*BackupRestore) Init

func (br *BackupRestore) Init() error

Init performs plugin initialization

type ConnectionType

type ConnectionType string

ConnectionType - Determine what kind of connection details are stored for an endpoint

type RestoreRequest

type RestoreRequest struct {
	// Data - Content of backup file. This should be of type BackupContent
	Data            string `json:"data"`
	Password        string `json:"password"`
	IgnoreDbVersion bool   `json:"ignoreDbVersion"`
}

RestoreRequest - Request from client to restore content from payload

Jump to

Keyboard shortcuts

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