backup

package
v0.0.0-...-447887d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(portalProxy api.PortalProxy) (api.StratosPlugin, error)

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    []api.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() (api.EndpointPlugin, error)

GetEndpointPlugin gets the endpoint plugin for this plugin

func (*BackupRestore) GetMiddlewarePlugin

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

GetMiddlewarePlugin gets the middleware plugin for this plugin

func (*BackupRestore) GetRoutePlugin

func (br *BackupRestore) GetRoutePlugin() (api.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

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

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