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

Method MaxPriority

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

Source from the content-addressed store, hash-verified

81}
82
83func (i *imlAIKeyService) MaxPriority(ctx context.Context, providerId string) (int, error) {
84 info, err := i.store.First(ctx, map[string]interface{}{"provider": providerId}, "sort desc")
85 if err != nil {
86 return 0, err
87 }
88 return info.Sort, nil
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})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected