bl

package
v0.0.0-...-3ddbc71 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package bl acts as a connector between database and application and keeps all the business logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func New

func New(sr snapshotRepo, gr garbageRepo, cfg *config.Config) *Service

func (*Service) CleanUp

func (s *Service) CleanUp() error

CleanUp removes all folders after another restore. When a new restore is called we can't just remove current root filesystem because current session will be broken. We can only move it to a different folder and cleanup on the run session.

func (*Service) CreateSnapshotForVolume

func (s *Service) CreateSnapshotForVolume(vol domain.Volume, snapType domain.SnapshotType) (domain.Snapshot, error)

func (*Service) DeleteSnapshot

func (s *Service) DeleteSnapshot(snap domain.Snapshot) error

func (*Service) Restore

func (s *Service) Restore(snap domain.Snapshot) error

func (*Service) SnapshotsList

func (s *Service) SnapshotsList(ids []uint64) ([]domain.Snapshot, error)

Jump to

Keyboard shortcuts

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