backup_schedule

package
v0.0.0-...-f9144f1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ListSchedulesQuery = fmt.Sprintf(
		`$last_successful_backup_id = SELECT schedule_id, MAX(b.completed_at) AS recovery_point, MAX_BY(b.id, b.completed_at) AS last_successful_backup_id FROM Backups AS b WHERE b.status = '%s' GROUP BY schedule_id;
$last_backup_id = SELECT schedule_id AS schedule_id_2, MAX_BY(b.id, b.completed_at) AS last_backup_id FROM Backups AS b GROUP BY schedule_id;

SELECT * FROM BackupSchedules AS schedules 
LEFT JOIN $last_successful_backup_id AS b1 ON schedules.id = b1.schedule_id
LEFT JOIN $last_backup_id AS b2 ON schedules.id = b2.schedule_id_2
`, types.BackupStateAvailable,
	)
	GetScheduleQuery = fmt.Sprintf(
		`$rpo_info = SELECT 
    <|
        recovery_point: MAX(b.completed_at),
        last_successful_backup_id: MAX_BY(b.id, b.completed_at)
    |> FROM Backups AS b WHERE b.status = '%s' AND b.schedule_id = $schedule_id;

$last_backup_id = SELECT MAX_BY(b.id, b.completed_at) AS last_backup_id FROM Backups AS b WHERE b.schedule_id = $schedule_id;

SELECT s.*, $last_backup_id AS last_backup_id, $rpo_info.recovery_point AS recovery_point, $rpo_info.last_successful_backup_id AS last_successful_backup_id FROM BackupSchedules AS s WHERE s.id = $schedule_id
`, types.BackupStateAvailable,
	)
)

Functions

This section is empty.

Types

type BackupScheduleService

type BackupScheduleService struct {
	pb.UnimplementedBackupScheduleServiceServer
	// contains filtered or unexported fields
}

func NewBackupScheduleService

func NewBackupScheduleService(
	driver db.DBConnector,
	clientConn client.ClientConnector,
	auth ap.AuthProvider,
) *BackupScheduleService

func (*BackupScheduleService) CheckClientDbAccess

func (s *BackupScheduleService) CheckClientDbAccess(
	ctx context.Context, clientConnectionParams types.YdbConnectionParams) error

func (*BackupScheduleService) CreateBackupSchedule

func (s *BackupScheduleService) CreateBackupSchedule(
	ctx context.Context, request *pb.CreateBackupScheduleRequest,
) (*pb.BackupSchedule, error)

func (*BackupScheduleService) DeleteBackupSchedule

func (s *BackupScheduleService) DeleteBackupSchedule(
	ctx context.Context, request *pb.DeleteBackupScheduleRequest,
) (*pb.BackupSchedule, error)

func (*BackupScheduleService) GetBackupSchedule

func (s *BackupScheduleService) GetBackupSchedule(
	ctx context.Context, request *pb.GetBackupScheduleRequest,
) (*pb.BackupSchedule, error)

func (*BackupScheduleService) ListBackupSchedules

func (*BackupScheduleService) Register

func (s *BackupScheduleService) Register(server server.Server)

func (*BackupScheduleService) ToggleBackupSchedule

func (s *BackupScheduleService) ToggleBackupSchedule(
	ctx context.Context, in *pb.ToggleBackupScheduleRequest,
) (*pb.BackupSchedule, error)

func (*BackupScheduleService) UpdateBackupSchedule

func (s *BackupScheduleService) UpdateBackupSchedule(
	ctx context.Context, request *pb.UpdateBackupScheduleRequest,
) (*pb.BackupSchedule, error)

Jump to

Keyboard shortcuts

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