(ctx context.Context, applications ...*gateway.ApplicationRelease)
| 38 | } |
| 39 | |
| 40 | func (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 | |
| 55 | func (a *ApplicationClient) toApinto(app *gateway.ApplicationRelease) interface{} { |
| 56 | auths := make([]*entity.Authorization, 0, len(app.Authorizations)) |
nothing calls this directly
no test coverage detected