MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / SetRunning

Method SetRunning

service/release/iml.go:305–319  ·  view source on GitHub ↗

func (s *imlReleaseService) DiffApis(ctx context.Context, baseApis []*Api, targetApis []*Api) []*APiDiff { result := make([]*APiDiff, 0, len(targetApis)+len(baseApis)) baseApiMap := utils.SliceToMap(baseApis, func(v *Api) string { return v.Api }) for _, targetApi := range targetApis { if ba

(ctx context.Context, service string, id string)

Source from the content-addressed store, hash-verified

303//}
304
305func (s *imlReleaseService) SetRunning(ctx context.Context, service string, id string) error {
306 _, err := s.releaseRuntime.DeleteWhere(ctx, map[string]interface{}{"service": service})
307 if err != nil {
308 return err
309 }
310 operator := utils.UserId(ctx)
311 return s.releaseRuntime.Save(ctx, &release.Runtime{
312 Id: 0,
313 Service: service,
314 Release: id,
315 UpdateTime: time.Now(),
316 Operator: operator,
317 })
318
319}
320
321func (s *imlReleaseService) CreateRelease(ctx context.Context, service, version, remark string, apiRequestCommit, apisProxyCommits map[string]string, apiDocCommits, serviceDocCommits string, upstreams map[string]map[string]string, strategies map[string]string) (*Release, error) {
322 operator := utils.UserId(ctx)

Callers

nothing calls this directly

Calls 1

SaveMethod · 0.65

Tested by

no test coverage detected