Documentation
¶
Index ¶
- type CreateTodoParams
- type CreateTodoRow
- type CustomValidator
- type DBTX
- type ListTodosRow
- type Queries
- func (q *Queries) AcquireConnection(ctx context.Context, pool *pgxpool.Pool, userID pgtype.UUID) (*pgxpool.Conn, error)
- func (q *Queries) CreateTodo(ctx context.Context, db DBTX, arg CreateTodoParams) (*CreateTodoRow, error)
- func (q *Queries) DoneTodo(ctx context.Context, db DBTX, id pgtype.UUID) error
- func (q *Queries) ListTodos(ctx context.Context, db DBTX) ([]*ListTodosRow, error)
- func (q *Queries) TruncateAllTables(ctx context.Context, db DBTX) error
- func (q *Queries) UpdateTodo(ctx context.Context, db DBTX, arg UpdateTodoParams) error
- type Todo
- type UpdateTodoParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTodoParams ¶
type CreateTodoParams struct {
UserID pgtype.UUID `json:"user_id"`
Title string `json:"title"`
Note pgtype.Text `json:"note"`
}
func NewCreateTodoParams ¶
type CreateTodoRow ¶
type CustomValidator ¶
func (*CustomValidator) Validate ¶
func (cv *CustomValidator) Validate(i interface{}) error
type ListTodosRow ¶
type ListTodosRow struct {
ID pgtype.UUID `json:"id"`
Title string `json:"title"`
Note pgtype.Text `json:"note"`
Done bool `json:"done"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type Queries ¶
type Queries struct {
}
func (*Queries) AcquireConnection ¶
func (*Queries) CreateTodo ¶
func (q *Queries) CreateTodo(ctx context.Context, db DBTX, arg CreateTodoParams) (*CreateTodoRow, error)
func (*Queries) TruncateAllTables ¶
func (*Queries) UpdateTodo ¶
Click to show internal directories.
Click to hide internal directories.