Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.29.0
// source: voice_provider_keys.sql
package store
import (
"context"
)
const getVoiceProviderKey = `-- name: GetVoiceProviderKey :one
SELECT api_key_ciphertext FROM voice_provider_keys WHERE provider = $1
`
func (q *Queries) GetVoiceProviderKey(ctx context.Context, provider string) ([]byte, error) {
row := q.db.QueryRow(ctx, getVoiceProviderKey, provider)
var api_key_ciphertext []byte
err := row.Scan(&api_key_ciphertext)
return api_key_ciphertext, err
}
const upsertVoiceProviderKey = `-- name: UpsertVoiceProviderKey :exec
INSERT INTO voice_provider_keys (provider, api_key_ciphertext) VALUES ($1, $2)
ON CONFLICT (provider) DO UPDATE SET api_key_ciphertext = excluded.api_key_ciphertext, updated_at = now()
`
type UpsertVoiceProviderKeyParams struct {
Provider string `json:"provider"`
ApiKeyCiphertext []byte `json:"api_key_ciphertext"`
}
func (q *Queries) UpsertVoiceProviderKey(ctx context.Context, arg UpsertVoiceProviderKeyParams) error {
_, err := q.db.Exec(ctx, upsertVoiceProviderKey, arg.Provider, arg.ApiKeyCiphertext)
return err
}