MCPcopy Index your code
hub / github.com/coder/coder / GetAIProviderKeysByProviderID

Method GetAIProviderKeysByProviderID

enterprise/dbcrypt/dbcrypt.go:511–522  ·  view source on GitHub ↗
(ctx context.Context, providerID uuid.UUID)

Source from the content-addressed store, hash-verified

509}
510
511func (db *dbCrypt) GetAIProviderKeysByProviderID(ctx context.Context, providerID uuid.UUID) ([]database.AIProviderKey, error) {
512 keys, err := db.Store.GetAIProviderKeysByProviderID(ctx, providerID)
513 if err != nil {
514 return nil, err
515 }
516 for i := range keys {
517 if err := db.decryptAIProviderKey(&keys[i]); err != nil {
518 return nil, err
519 }
520 }
521 return keys, nil
522}
523
524func (db *dbCrypt) GetAIProviderKeysByProviderIDs(ctx context.Context, providerIDs []uuid.UUID) ([]database.AIProviderKey, error) {
525 keys, err := db.Store.GetAIProviderKeysByProviderIDs(ctx, providerIDs)

Callers

nothing calls this directly

Calls 2

decryptAIProviderKeyMethod · 0.95

Tested by

no test coverage detected