Documentation ¶
Index ¶
- Variables
- func CreateTables(ctx context.Context, db *sql.DB) error
- type CreateTodoParams
- type CreateUserParams
- type DBTX
- type Queries
- func (q *Queries) CreateTodo(ctx context.Context, arg CreateTodoParams) (Todo, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) DeleteTodo(ctx context.Context, id int64) error
- func (q *Queries) DeleteUser(ctx context.Context, id int64) error
- func (q *Queries) GetTodoById(ctx context.Context, id int64) (Todo, error)
- func (q *Queries) GetTodosByUserId(ctx context.Context, userID int64) ([]Todo, error)
- func (q *Queries) GetUserById(ctx context.Context, id int64) (User, error)
- func (q *Queries) GetUserByLogin(ctx context.Context, login string) (User, error)
- func (q *Queries) GetUsers(ctx context.Context) ([]User, error)
- func (q *Queries) UpdateTodo(ctx context.Context, arg UpdateTodoParams) error
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Session
- type Todo
- type UpdateTodoParams
- type UpdateUserParams
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var Schema string
Functions ¶
Types ¶
type CreateTodoParams ¶
type CreateUserParams ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateTodo ¶
func (*Queries) CreateUser ¶
func (*Queries) GetTodoById ¶
func (*Queries) GetTodosByUserId ¶
func (*Queries) GetUserById ¶
func (*Queries) GetUserByLogin ¶
func (*Queries) UpdateTodo ¶
func (q *Queries) UpdateTodo(ctx context.Context, arg UpdateTodoParams) error
func (*Queries) UpdateUser ¶
func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error
type Todo ¶
type Todo struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` CreatedAt sql.NullTime `json:"created_at"` UpdatedAt sql.NullTime `json:"updated_at"` CompletedAt sql.NullTime `json:"completed_at"` Title string `json:"title"` Description sql.NullString `json:"description"` Done sql.NullBool `json:"done"` }
type UpdateTodoParams ¶
type UpdateUserParams ¶
Click to show internal directories.
Click to hide internal directories.