(ctx context.Context, ids ...string)
| 151 | } |
| 152 | |
| 153 | func (s *imlReleaseService) GetLabels(ctx context.Context, ids ...string) map[string]string { |
| 154 | if len(ids) == 0 { |
| 155 | return nil |
| 156 | } |
| 157 | if len(ids) == 1 { |
| 158 | o, err := s.releaseStore.GetByUUID(ctx, ids[0]) |
| 159 | if err != nil || o == nil { |
| 160 | return nil |
| 161 | } |
| 162 | return map[string]string{ |
| 163 | o.UUID: o.Name, |
| 164 | } |
| 165 | } |
| 166 | list, err := s.releaseStore.ListQuery(ctx, "`uuid` in ?", []interface{}{ids}, "id") |
| 167 | if err != nil { |
| 168 | return nil |
| 169 | } |
| 170 | return utils.SliceToMapO(list, func(o *release.Release) (string, string) { return o.UUID, o.Name }) |
| 171 | } |
| 172 | |
| 173 | func (s *imlReleaseService) GetApiProxyCommit(ctx context.Context, id string, apiUUID string) (string, error) { |
| 174 | commits, err := s.getCommitByType(ctx, id, CommitApiProxy, apiUUID) |
nothing calls this directly
no outgoing calls
no test coverage detected