(ctx context.Context, id string)
| 92 | } |
| 93 | |
| 94 | func (s *imlClusterService) Delete(ctx context.Context, id string) error { |
| 95 | return s.store.Transaction(ctx, func(ctx context.Context) error { |
| 96 | _, err := s.store.DeleteWhere(ctx, map[string]interface{}{ |
| 97 | "uuid": id, |
| 98 | }) |
| 99 | if err != nil { |
| 100 | return err |
| 101 | } |
| 102 | _, err = s.nodeStore.DeleteWhere(ctx, map[string]interface{}{ |
| 103 | "cluster": id, |
| 104 | }) |
| 105 | if err != nil { |
| 106 | return err |
| 107 | } |
| 108 | _, err = s.nodeAddressStore.DeleteWhere(ctx, map[string]interface{}{ |
| 109 | "cluster": id, |
| 110 | }) |
| 111 | if err != nil { |
| 112 | return err |
| 113 | } |
| 114 | return nil |
| 115 | }) |
| 116 | } |
| 117 | |
| 118 | func (s *imlClusterService) Get(ctx context.Context, id string) (*Cluster, error) { |
| 119 | v, err := s.store.FirstQuery(ctx, "`uuid` = ?", []interface{}{id}, "id desc") |
nothing calls this directly
no outgoing calls
no test coverage detected