Skip to content

Commit 45c1acf

Browse files
EXT-1145: feat(api): add backup encryption settings to MakeBackup request and schedule settings (#160)
1 parent 0dc4fb3 commit 45c1acf

15 files changed

+1044
-454
lines changed

internal/server/services/backup/backup_service.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ func (s *BackupService) MakeBackup(ctx context.Context, req *pb.MakeBackupReques
109109
ctx = xlog.With(ctx, zap.String("SubjectID", subject))
110110
now := timestamppb.Now()
111111

112+
if req.EncryptionSettings != nil {
113+
s.IncApiCallsCounter(methodName, codes.Unimplemented)
114+
return nil, status.Error(codes.Unimplemented, "backup encryption is not supported yet")
115+
}
116+
112117
tbwr := &types.TakeBackupWithRetryOperation{
113118
TakeBackupOperation: types.TakeBackupOperation{
114119
ID: types.GenerateObjectID(),

internal/server/services/backup_schedule/backup_schedule_service.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ func (s *BackupScheduleService) CreateBackupSchedule(
119119
return nil, status.Error(codes.FailedPrecondition, "no backup schedule settings for CreateBackupSchedule")
120120
}
121121

122+
if request.ScheduleSettings.EncryptionSettings != nil {
123+
s.IncApiCallsCounter(methodName, codes.Unimplemented)
124+
return nil, status.Error(codes.Unimplemented, "backup encryption is not supported yet")
125+
}
126+
122127
if request.ScheduleSettings.RecoveryPointObjective != nil && (request.ScheduleSettings.RecoveryPointObjective.Seconds == 0) {
123128
s.IncApiCallsCounter(methodName, codes.FailedPrecondition)
124129
return nil, status.Error(codes.FailedPrecondition, "recovery point objective should be greater than 0")

0 commit comments

Comments
 (0)