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

Method List

service/cluster/cluster.go:422–436  ·  view source on GitHub ↗
(ctx context.Context, clusterIds ...string)

Source from the content-addressed store, hash-verified

420 return utils.SliceToSlice(list, FromEntity), nil
421}
422func (s *imlClusterService) List(ctx context.Context, clusterIds ...string) ([]*Cluster, error) {
423 if len(clusterIds) == 0 {
424 list, err := s.store.List(ctx, make(map[string]interface{}))
425 if err != nil {
426 return nil, err
427 }
428 return utils.SliceToSlice(list, FromEntity), nil
429 }
430 list, err := s.store.ListQuery(ctx, "`uuid` in (?)", []interface{}{clusterIds}, "update_at desc")
431 if err != nil {
432 return nil, err
433 }
434 return utils.SliceToSlice(list, FromEntity), nil
435
436}
437
438func init() {
439 autowire.Auto[IClusterService](func() reflect.Value {

Callers 1

SearchMethod · 0.95

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected