db

package
v0.0.0-...-cae1622 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTask

func AddTask(cfg Config, task model.Task) (model.Task, error)

func CreateTable

func CreateTable(cfg Config) error

func DeleteTask

func DeleteTask(cfg Config, task model.Task) error

func GetAllTasks

func GetAllTasks(cfg Config) ([]model.Task, error)

GetAllTasks lists all tasks in the database

func RebuildDb

func RebuildDb(cfg Config) error

RebuildDb drops the database and recreates it

func SeedData

func SeedData(cfg Config) error

func UpdateTask

func UpdateTask(cfg Config, task model.Task) (model.Task, error)

Types

type Config

type Config struct {
	DbUser     string
	DbPassword string
	DbName     string
	DbHost     string
	DbPort     string
}

Config - configuration for the db package

Jump to

Keyboard shortcuts

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