refact!: project structure
Some checks failed
Build and Deploy Go App / build (push) Failing after 4m35s
Build and Deploy Go App / deploy (push) Has been skipped

This commit is contained in:
nihonium 2025-10-25 21:05:16 +03:00
parent fd0ca4411b
commit db53ae04e3
Signed by: nihonium
GPG key ID: 0251623741027CFC
26 changed files with 971 additions and 6395 deletions

32
sql/db.go Normal file
View file

@ -0,0 +1,32 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.0
package sqlc
import (
"context"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
)
type DBTX interface {
Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
Query(context.Context, string, ...interface{}) (pgx.Rows, error)
QueryRow(context.Context, string, ...interface{}) pgx.Row
}
func New(db DBTX) *Queries {
return &Queries{db: db}
}
type Queries struct {
db DBTX
}
func (q *Queries) WithTx(tx pgx.Tx) *Queries {
return &Queries{
db: tx,
}
}