sqlcgen

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateAuthUserParams

type CreateAuthUserParams struct {
	Email        string      `json:"email"`
	PasswordHash string      `json:"password_hash"`
	Role         pgtype.Text `json:"role"`
	Permissions  int64       `json:"permissions"`
	Status       string      `json:"status"`
}

type CreateTenantParams

type CreateTenantParams struct {
	ID     string `json:"id"`
	Slug   string `json:"slug"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

type DBTX

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
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) CreateAuthUser

func (q *Queries) CreateAuthUser(ctx context.Context, arg CreateAuthUserParams) (User, error)

func (*Queries) CreateTenant

func (q *Queries) CreateTenant(ctx context.Context, arg CreateTenantParams) (Tenant, error)

func (*Queries) GetAuthUserByID

func (q *Queries) GetAuthUserByID(ctx context.Context, id pgtype.UUID) (User, error)

func (*Queries) GetAuthUserByLogin

func (q *Queries) GetAuthUserByLogin(ctx context.Context, email string) (User, error)

func (*Queries) GetSystemSetting

func (q *Queries) GetSystemSetting(ctx context.Context, key string) (SystemSetting, error)

func (*Queries) GetTenantByID

func (q *Queries) GetTenantByID(ctx context.Context, id string) (Tenant, error)

func (*Queries) ListSystemSettings

func (q *Queries) ListSystemSettings(ctx context.Context) ([]SystemSetting, error)

func (*Queries) ListTenants

func (q *Queries) ListTenants(ctx context.Context, limit int32) ([]Tenant, error)

func (*Queries) UpdateAuthUserPasswordHash

func (q *Queries) UpdateAuthUserPasswordHash(ctx context.Context, arg UpdateAuthUserPasswordHashParams) error

func (*Queries) UpdateAuthUserStatus

func (q *Queries) UpdateAuthUserStatus(ctx context.Context, arg UpdateAuthUserStatusParams) (User, error)

func (*Queries) UpsertSystemSetting

func (q *Queries) UpsertSystemSetting(ctx context.Context, arg UpsertSystemSettingParams) (SystemSetting, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type SystemSetting

type SystemSetting struct {
	Key       string             `json:"key"`
	Value     []byte             `json:"value"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type Tenant

type Tenant struct {
	ID        string             `json:"id"`
	Slug      string             `json:"slug"`
	Name      string             `json:"name"`
	Status    string             `json:"status"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type UpdateAuthUserPasswordHashParams

type UpdateAuthUserPasswordHashParams struct {
	ID           pgtype.UUID `json:"id"`
	PasswordHash string      `json:"password_hash"`
}

type UpdateAuthUserStatusParams

type UpdateAuthUserStatusParams struct {
	ID     pgtype.UUID `json:"id"`
	Status string      `json:"status"`
}

type UpsertSystemSettingParams

type UpsertSystemSettingParams struct {
	Key   string `json:"key"`
	Value []byte `json:"value"`
}

type User

type User struct {
	ID           pgtype.UUID        `json:"id"`
	Email        string             `json:"email"`
	PasswordHash string             `json:"password_hash"`
	Role         pgtype.Text        `json:"role"`
	Permissions  int64              `json:"permissions"`
	Status       string             `json:"status"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
	UpdatedAt    pgtype.Timestamptz `json:"updated_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL