(ctx context.Context, m schema.Mutation)
| 75 | } |
| 76 | |
| 77 | func resolveRestore(ctx context.Context, m schema.Mutation) (*resolve.Resolved, bool) { |
| 78 | input, err := getRestoreInput(m) |
| 79 | if err != nil { |
| 80 | return resolve.EmptyResult(m, err), false |
| 81 | } |
| 82 | glog.Infof("Got restore request, location: %v, backupId: %v, backupNum: %v, incrementalFrom: %d, isPartial: %v", |
| 83 | input.Location, input.BackupId, input.BackupNum, input.IncrementalFrom, input.IsPartial) |
| 84 | |
| 85 | req := pb.RestoreRequest{ |
| 86 | Location: input.Location, |
| 87 | BackupId: input.BackupId, |
| 88 | BackupNum: uint64(input.BackupNum), |
| 89 | IncrementalFrom: uint64(input.IncrementalFrom), |
| 90 | IsPartial: input.IsPartial, |
| 91 | EncryptionKeyFile: input.EncryptionKeyFile, |
| 92 | AccessKey: input.AccessKey, |
| 93 | SecretKey: input.SecretKey, |
| 94 | SessionToken: input.SessionToken, |
| 95 | Anonymous: input.Anonymous, |
| 96 | VaultAddr: input.VaultAddr, |
| 97 | VaultRoleidFile: input.VaultRoleIDFile, |
| 98 | VaultSecretidFile: input.VaultSecretIDFile, |
| 99 | VaultPath: input.VaultPath, |
| 100 | VaultField: input.VaultField, |
| 101 | VaultFormat: input.VaultFormat, |
| 102 | IsNamespaceAwareRestore: false, |
| 103 | } |
| 104 | |
| 105 | return restore(ctx, m, req) |
| 106 | } |
| 107 | |
| 108 | func restore(ctx context.Context, m schema.Mutation, req pb.RestoreRequest) (*resolve.Resolved, bool) { |
| 109 | wg := &sync.WaitGroup{} |
nothing calls this directly
no test coverage detected