MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / List

Method List

internal/desktop/entity_service.go:13–27  ·  view source on GitHub ↗
(kind string)

Source from the content-addressed store, hash-verified

11func NewEntityService() *EntityService { return &EntityService{} }
12
13func (s *EntityService) List(kind string) ([]EntityDTO, error) {
14 store, err := entityStore(kind)
15 if err != nil {
16 return nil, err
17 }
18 all, err := store.All()
19 if err != nil {
20 return nil, wrapError("ENTITY_LIST_FAILED", err)
21 }
22 out := make([]EntityDTO, 0, len(all))
23 for _, entity := range all {
24 out = append(out, entityDTO(entity))
25 }
26 return out, nil
27}
28
29func (s *EntityService) Search(kind, query string) ([]EntityDTO, error) {
30 all, err := s.List(kind)

Callers 1

SearchMethod · 0.95

Calls 4

entityStoreFunction · 0.85
wrapErrorFunction · 0.85
entityDTOFunction · 0.85
AllMethod · 0.45

Tested by

no test coverage detected