()
| 284 | } |
| 285 | |
| 286 | func (req PostIndexInitRequest) Validate() error { |
| 287 | if req.NumPartitions == nil && req.SeparatePrincipalIndexes == nil { |
| 288 | return base.HTTPErrorf(http.StatusBadRequest, "at least one of num_partitions or create_separate_principal_indexes is required") |
| 289 | } |
| 290 | if req.NumPartitions != nil && *req.NumPartitions < 1 { |
| 291 | return base.HTTPErrorf(http.StatusBadRequest, "num_partitions must be greater than 0") |
| 292 | } |
| 293 | return nil |
| 294 | } |
| 295 | |
| 296 | // handleIndexInit allows async index initialization to be run or managed |
| 297 | func (h *handler) handlePostIndexInit() error { |
no test coverage detected