Go(fun)+SQLite backend, Vue 3 frontend. Modules: dashboard, pay gateway (Epay-compatible + CDK stock), license/card system (per-app appid, domain binding), AI memory bank with built-in MCP server (/mcp, FTS5 search, signed read links), server SSH monitor + terminal + SFTP, proxy pool with protocol-level alive checks, DB manager (mysql/pg/sqlite + SQL autocomplete + import/export), disk share, vault (AES-GCM + TOTP), bookmarks, dev tools. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
21 lines
409 B
Go
21 lines
409 B
Go
package store
|
|
|
|
import (
|
|
"database/sql"
|
|
"errors"
|
|
|
|
"github.com/cyi-cc/cyi-box/backend/internal/db"
|
|
)
|
|
|
|
func (s *Store) GetSetting(key string) (string, error) {
|
|
v, err := s.q.GetSetting(storeCtx, key)
|
|
if errors.Is(err, sql.ErrNoRows) {
|
|
return "", nil
|
|
}
|
|
return v, err
|
|
}
|
|
|
|
func (s *Store) SetSetting(key, value string) error {
|
|
return s.q.UpsertSetting(storeCtx, db.UpsertSettingParams{K: key, V: value})
|
|
}
|