mirror of
https://github.com/IS1DI/x0gp.git
synced 2026-07-19 05:47:02 +00:00
Add graphify, tests and supabase migrations & config
This commit is contained in:
@@ -39,6 +39,18 @@ type Driver struct {
|
||||
UpdatedMs int64
|
||||
}
|
||||
|
||||
// Store defines the persistence operations for drivers.
|
||||
type Store interface {
|
||||
Exec(ctx context.Context, sql string) (int64, error)
|
||||
Create(ctx context.Context, d Driver) error
|
||||
Get(ctx context.Context, id string) (Driver, error)
|
||||
GetByNickname(ctx context.Context, nick string) (Driver, error)
|
||||
List(ctx context.Context, limit, offset int, clanID string) ([]Driver, error)
|
||||
Delete(ctx context.Context, id string) error
|
||||
Update(ctx context.Context, d Driver) error
|
||||
Count(ctx context.Context) (int, error)
|
||||
}
|
||||
|
||||
// PgStore is the Postgres-backed half of the package.
|
||||
type PgStore struct {
|
||||
pool *pgxpool.Pool
|
||||
|
||||
Reference in New Issue
Block a user