postgres

package
v0.0.0-...-c21ba44 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

type Postgres struct {
	DB *sql.DB
}

Postgres database

func (*Postgres) AddTask

func (l *Postgres) AddTask(ctx context.Context, t *storages.Task) error

AddTask adds a new task to DB

func (*Postgres) RetrieveTasks

func (l *Postgres) RetrieveTasks(ctx context.Context, userID, createdDate sql.NullString) ([]*storages.Task, error)

RetrieveTasks returns tasks if match userID AND createDate.

func (*Postgres) ValidateUser

func (l *Postgres) ValidateUser(ctx context.Context, userID, pwd sql.NullString) bool

ValidateUser returns tasks if match userID AND password

Jump to

Keyboard shortcuts

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