pgsql

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	DB *pgxpool.Pool
}

func New

func New(dsn string) (*Storage, error)

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) Date

func (s *Storage) Date(
	ctx context.Context,
	date time.Time,
) (dt *models.Date, err error)

func (*Storage) DeleteTask

func (s *Storage) DeleteTask(
	ctx context.Context,
	record_id uuid.UUID,
) (err error)

func (*Storage) NewDate

func (s *Storage) NewDate(
	ctx context.Context,
	date time.Time,
) (dairyDate *models.Date, err error)

func (*Storage) SaveTask

func (s *Storage) SaveTask(
	ctx context.Context,
	task models.Task,
) (record_id uuid.UUID, err error)

func (*Storage) TaskByDateTime

func (s *Storage) TaskByDateTime(
	ctx context.Context,
	tdate time.Time,
	ttime time.Time,
) (tasks []*models.Task, err error)

func (*Storage) TaskByUuid

func (s *Storage) TaskByUuid(
	ctx context.Context,
	record_id uuid.UUID,
) (task *models.Task, err error)

Jump to

Keyboard shortcuts

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