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

Method DefaultKey

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

Source from the content-addressed store, hash-verified

89}
90
91func (i *imlAIKeyService) DefaultKey(ctx context.Context, providerId string) (*Key, error) {
92 info, err := i.store.First(ctx, map[string]interface{}{"provider": providerId, "default": true})
93 if err != nil {
94 return nil, err
95 }
96 return FromEntity(info), nil
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})

Callers

nothing calls this directly

Calls 1

FromEntityFunction · 0.70

Tested by

no test coverage detected