MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Delete

Method Delete

module/dynamic-module/iml.go:392–409  ·  view source on GitHub ↗
(ctx context.Context, module string, ids []string)

Source from the content-addressed store, hash-verified

390}
391
392func (i *imlDynamicModule) Delete(ctx context.Context, module string, ids []string) error {
393 return i.transaction.Transaction(ctx, func(ctx context.Context) error {
394 for _, id := range ids {
395 id = strings.ToLower(fmt.Sprintf("%s_%s", id, module))
396 _, err := i.get(ctx, module, id)
397 if err != nil {
398 return err
399 }
400 err = i.dynamicModuleService.Delete(ctx, id)
401 if err != nil {
402 return err
403 }
404 }
405
406 return nil
407 })
408
409}
410
411func (i *imlDynamicModule) Get(ctx context.Context, module string, id string) (*dynamic_module_dto.DynamicModule, error) {
412 suffix := fmt.Sprintf("_%s", module)

Callers

nothing calls this directly

Calls 2

getMethod · 0.95
DeleteMethod · 0.65

Tested by

no test coverage detected