Documentation ¶
Index ¶
- Variables
- type BackupScheduleService
- func (s *BackupScheduleService) CheckClientDbAccess(ctx context.Context, clientConnectionParams types.YdbConnectionParams) error
- func (s *BackupScheduleService) CreateBackupSchedule(ctx context.Context, request *pb.CreateBackupScheduleRequest) (*pb.BackupSchedule, error)
- func (s *BackupScheduleService) DeleteBackupSchedule(ctx context.Context, request *pb.DeleteBackupScheduleRequest) (*pb.BackupSchedule, error)
- func (s *BackupScheduleService) GetBackupSchedule(ctx context.Context, request *pb.GetBackupScheduleRequest) (*pb.BackupSchedule, error)
- func (s *BackupScheduleService) ListBackupSchedules(ctx context.Context, request *pb.ListBackupSchedulesRequest) (*pb.ListBackupSchedulesResponse, error)
- func (s *BackupScheduleService) Register(server server.Server)
- func (s *BackupScheduleService) ToggleBackupSchedule(ctx context.Context, in *pb.ToggleBackupScheduleRequest) (*pb.BackupSchedule, error)
- func (s *BackupScheduleService) UpdateBackupSchedule(ctx context.Context, request *pb.UpdateBackupScheduleRequest) (*pb.BackupSchedule, error)
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 (s *BackupScheduleService) ListBackupSchedules( ctx context.Context, request *pb.ListBackupSchedulesRequest, ) (*pb.ListBackupSchedulesResponse, error)
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)
Click to show internal directories.
Click to hide internal directories.