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

Method CreateServiceStrategy

controller/strategy/iml.go:187–197  ·  view source on GitHub ↗
(ctx *gin.Context, serviceId string, driver string, input *strategy_dto.Create)

Source from the content-addressed store, hash-verified

185}
186
187func (i *imlStrategyController) CreateServiceStrategy(ctx *gin.Context, serviceId string, driver string, input *strategy_dto.Create) error {
188 _, err := i.serviceModule.Get(ctx, serviceId)
189 if err != nil {
190 return fmt.Errorf("create service strategy error: %s", err)
191 }
192 input.Driver = driver
193 input.Scope = strategy_dto.ToScope(strategy_dto.ScopeService)
194 input.Target = serviceId
195
196 return i.strategyModule.Create(ctx, input)
197}
198
199func (i *imlStrategyController) EditStrategy(ctx *gin.Context, id string, input *strategy_dto.Edit) error {
200 return i.strategyModule.Edit(ctx, id, input)

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
CreateMethod · 0.65

Tested by

no test coverage detected