db

package
v0.0.0-...-c54d25a Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateFeedbackParams

type CreateFeedbackParams struct {
	Project     string
	Description string
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type Feedback

type Feedback struct {
	ID          int32
	Project     string
	Description string
	CreatedOn   time.Time
}

type GetAllTodosRow

type GetAllTodosRow struct {
	ID          int32
	Description string
	StatusID    int32
	CreatedOn   time.Time
	Status      string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateFeedback

func (q *Queries) CreateFeedback(ctx context.Context, arg CreateFeedbackParams) (Feedback, error)

func (*Queries) CreateTodo

func (q *Queries) CreateTodo(ctx context.Context, description string) (Todo, error)

func (*Queries) DeleteTodo

func (q *Queries) DeleteTodo(ctx context.Context, id int32) error

func (*Queries) GetAllFeedbacks

func (q *Queries) GetAllFeedbacks(ctx context.Context) ([]Feedback, error)

func (*Queries) GetAllStatus

func (q *Queries) GetAllStatus(ctx context.Context) ([]Status, error)

func (*Queries) GetAllTodos

func (q *Queries) GetAllTodos(ctx context.Context) ([]GetAllTodosRow, error)

func (*Queries) GetTodo

func (q *Queries) GetTodo(ctx context.Context, id int32) (Todo, error)

func (*Queries) UpdateTodo

func (q *Queries) UpdateTodo(ctx context.Context, arg UpdateTodoParams) error

func (*Queries) WithTx

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

type Status

type Status struct {
	ID          int32
	Description string
}

type Todo

type Todo struct {
	ID          int32
	Description string
	StatusID    int32
	CreatedOn   time.Time
}

type UpdateTodoParams

type UpdateTodoParams struct {
	ID          int32
	Description string
	StatusID    int32
}

Jump to

Keyboard shortcuts

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