Documentation
¶
Index ¶
- Constants
- func Connect(ctx context.Context, c pgconn.Config) (*pgxpool.Pool, error)
- func CreateTableIfNotExists(ctx context.Context, conn *pgxpool.Pool) error
- type ConnectFunc
- type CreateEmployeeParams
- type DBTX
- type Employee
- type GetEmployeesParams
- type Queries
- func (q *Queries) ClearEmployees(ctx context.Context) error
- func (q *Queries) ClearTenants(ctx context.Context) error
- func (q *Queries) CreateEmployee(ctx context.Context, arg CreateEmployeeParams) (Employee, error)
- func (q *Queries) CreateTenant(ctx context.Context, name string) (Tenant, error)
- func (q *Queries) GetEmployees(ctx context.Context, arg GetEmployeesParams) (Employee, error)
- func (q *Queries) GetTenant(ctx context.Context, id int32) (Tenant, error)
- func (q *Queries) ListEmployees(ctx context.Context, tenantID int32) ([]Employee, error)
- func (q *Queries) ListTenants(ctx context.Context) ([]Tenant, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Tenant
Constants ¶
View Source
const (
Database = dbUser
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectFunc ¶
func InitDatabase ¶
func InitDatabase(ctx context.Context) (_ ConnectFunc, _ func(), err error)
type CreateEmployeeParams ¶
type GetEmployeesParams ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateEmployee ¶
func (*Queries) CreateTenant ¶
func (*Queries) GetEmployees ¶
func (*Queries) ListEmployees ¶
Click to show internal directories.
Click to hide internal directories.