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

Method KeysByProvider

service/ai-key/iml.go:99–109  ·  view source on GitHub ↗
(ctx context.Context, providerId string)

Source from the content-addressed store, hash-verified

97}
98
99func (i *imlAIKeyService) KeysByProvider(ctx context.Context, providerId string) ([]*Key, error) {
100 list, err := i.store.List(ctx, map[string]interface{}{"provider": providerId})
101 if err != nil {
102 return nil, err
103 }
104 var result []*Key
105 for _, item := range list {
106 result = append(result, FromEntity(item))
107 }
108 return result, nil
109}
110
111func (i *imlAIKeyService) SortBefore(ctx context.Context, provider string, originID string, targetID string) ([]*Key, error) {
112 originKey, err := i.store.GetByUUID(ctx, originID)

Callers

nothing calls this directly

Calls 2

FromEntityFunction · 0.70
ListMethod · 0.65

Tested by

no test coverage detected