backup

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: GPL-3.0 Imports: 14 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 {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(service Storage) *Handler

func (*Handler) Restore

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

func (*Handler) Save

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

type Manifest

type Manifest struct {
	CreatedAt  time.Time `json:"created_at"`
	AppVersion string    `json:"app_version"`
	DBFile     string    `json:"db_file"`
	UploadsDir string    `json:"uploads_dir"`
}

type Service

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

func NewService

func NewService(db *sql.DB, backupDir, uploadsDir string) *Service

func (*Service) Restore

func (s *Service) Restore(ctx context.Context, archive io.ReaderAt, size int64) error

func (*Service) Save

func (s *Service) Save(ctx context.Context) error

type Storage

type Storage interface {
	Save(ctx context.Context) error
	Restore(ctx context.Context, archive io.ReaderAt, size int64) error
}

Jump to

Keyboard shortcuts

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