feat: support basic user system

This commit is contained in:
xkm
2026-04-07 21:21:18 +08:00
parent deaa14f9f6
commit 1aecb4424c
22 changed files with 654 additions and 65 deletions

View File

@@ -0,0 +1,28 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.0
// source: config.sql
package repository
import (
"context"
)
const getConfig = `-- name: GetConfig :one
SELECT id, "Jwt.Alg", "Jwt.SignKey", "Jwt.VerifyKye"
FROM config
WHERE id = 0
`
func (q *Queries) GetConfig(ctx context.Context) (Config, error) {
row := q.db.QueryRow(ctx, getConfig)
var i Config
err := row.Scan(
&i.ID,
&i.JwtAlg,
&i.JwtSignKey,
&i.JwtVerifyKye,
)
return i, err
}