(spec *v1pb.Plan_Spec)
| 1152 | } |
| 1153 | |
| 1154 | func convertPlanSpec(spec *v1pb.Plan_Spec) *storepb.PlanConfig_Spec { |
| 1155 | storeSpec := &storepb.PlanConfig_Spec{ |
| 1156 | Id: spec.Id, |
| 1157 | } |
| 1158 | |
| 1159 | switch v := spec.Config.(type) { |
| 1160 | case *v1pb.Plan_Spec_CreateDatabaseConfig: |
| 1161 | storeSpec.Config = convertPlanSpecCreateDatabaseConfig(v) |
| 1162 | case *v1pb.Plan_Spec_ChangeDatabaseConfig: |
| 1163 | storeSpec.Config = convertPlanSpecChangeDatabaseConfig(v) |
| 1164 | case *v1pb.Plan_Spec_ExportDataConfig: |
| 1165 | storeSpec.Config = convertPlanSpecExportDataConfig(v) |
| 1166 | default: |
| 1167 | } |
| 1168 | return storeSpec |
| 1169 | } |
| 1170 | |
| 1171 | func convertPlanSpecCreateDatabaseConfig(config *v1pb.Plan_Spec_CreateDatabaseConfig) *storepb.PlanConfig_Spec_CreateDatabaseConfig { |
| 1172 | c := config.CreateDatabaseConfig |
no test coverage detected