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

Method Delete

module/strategy/iml.go:352–361  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

350}
351
352func (i *imlStrategyModule) Delete(ctx context.Context, id string) error {
353 _, err := i.strategyService.LatestStrategyCommit(ctx, strategy_dto.ScopeGlobal, "", id)
354 if err != nil {
355 if !errors.Is(err, gorm.ErrRecordNotFound) {
356 return nil
357 }
358 return i.strategyService.Delete(ctx, id)
359 }
360 return i.strategyService.SortDelete(ctx, id)
361}
362
363func (i *imlStrategyModule) initGateway(ctx context.Context, clusterId string, clientDriver gateway.IClientDriver) error {
364 commits, err := i.strategyService.ListLatestStrategyCommit(ctx, strategy_dto.ScopeGlobal, "")

Callers

nothing calls this directly

Calls 3

LatestStrategyCommitMethod · 0.65
DeleteMethod · 0.65
SortDeleteMethod · 0.65

Tested by

no test coverage detected