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

Method GetAIProviderKeysByProviderIDs

enterprise/dbcrypt/dbcrypt.go:524–535  ·  view source on GitHub ↗
(ctx context.Context, providerIDs []uuid.UUID)

Source from the content-addressed store, hash-verified

522}
523
524func (db *dbCrypt) GetAIProviderKeysByProviderIDs(ctx context.Context, providerIDs []uuid.UUID) ([]database.AIProviderKey, error) {
525 keys, err := db.Store.GetAIProviderKeysByProviderIDs(ctx, providerIDs)
526 if err != nil {
527 return nil, err
528 }
529 for i := range keys {
530 if err := db.decryptAIProviderKey(&keys[i]); err != nil {
531 return nil, err
532 }
533 }
534 return keys, nil
535}
536
537func (db *dbCrypt) InsertAIProviderKey(ctx context.Context, params database.InsertAIProviderKeyParams) (database.AIProviderKey, error) {
538 if strings.TrimSpace(params.APIKey) == "" {

Callers

nothing calls this directly

Calls 2

decryptAIProviderKeyMethod · 0.95

Tested by

no test coverage detected