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

Method Offline

gateway/apinto/application.go:40–53  ·  view source on GitHub ↗
(ctx context.Context, applications ...*gateway.ApplicationRelease)

Source from the content-addressed store, hash-verified

38}
39
40func (a *ApplicationClient) Offline(ctx context.Context, applications ...*gateway.ApplicationRelease) error {
41 err := a.client.Begin(ctx)
42 if err != nil {
43 return err
44 }
45 for _, app := range applications {
46 err = a.client.Del(ctx, genWorkerID(app.ID, gateway.ProfessionApplication))
47 if err != nil {
48 a.client.Rollback(ctx)
49 return err
50 }
51 }
52 return a.client.Commit(ctx)
53}
54
55func (a *ApplicationClient) toApinto(app *gateway.ApplicationRelease) interface{} {
56 auths := make([]*entity.Authorization, 0, len(app.Authorizations))

Callers

nothing calls this directly

Calls 5

genWorkerIDFunction · 0.85
BeginMethod · 0.65
RollbackMethod · 0.65
CommitMethod · 0.65
DelMethod · 0.45

Tested by

no test coverage detected