repository

package
v0.0.0-...-bb37284 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Db *sqlx.DB
View Source
var ErrNoResult = errors.New("no result found")

Functions

func NewDb

func NewDb(c *DbConfig) (*sqlx.DB, error)

Types

type Dao

type Dao interface {
	NewTaskQuery() TaskQuery
}

func NewDao

func NewDao(db *sqlx.DB) Dao

type DbConfig

type DbConfig struct {
	Host     string
	Port     int
	Name     string
	Username string
	Password string
}

type QuerySupplier

type QuerySupplier interface {
}

type TaskQuery

type TaskQuery interface {
	GetTasks(ctx context.Context, user string) ([]entities.Task, error)
	GetTask(ctx context.Context, id int64, user string) (*entities.Task, error)
	CreateTask(ctx context.Context, task entities.Task) (*int64, error)
	UpdateTask(ctx context.Context, task entities.Task, user string) (*entities.Task, error)
	DeleteTask(ctx context.Context, id int64, user string) error
}

Jump to

Keyboard shortcuts

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