postgres

package
v0.0.0-...-d234511 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

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

Driver represents the PostgreSQL storage driver

func New

func New(dsn string) *Driver

func (*Driver) Close

func (driver *Driver) Close() error

func (*Driver) Initialize

func (driver *Driver) Initialize(ctx context.Context) error

func (*Driver) Reminders

func (driver *Driver) Reminders() reminder.Repository

type ReminderRepository

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

ReminderRepository implements the reminder.Repository API using PostgreSQL

func (*ReminderRepository) Create

func (repo *ReminderRepository) Create(ctx context.Context, create *reminder.Create) (*reminder.Reminder, error)

func (*ReminderRepository) DeleteByID

func (repo *ReminderRepository) DeleteByID(ctx context.Context, id uuid.UUID) error

func (*ReminderRepository) DeleteByUserID

func (repo *ReminderRepository) DeleteByUserID(ctx context.Context, userID uuid.UUID) error

func (*ReminderRepository) GetByID

func (repo *ReminderRepository) GetByID(ctx context.Context, id uuid.UUID) (*reminder.Reminder, error)

func (*ReminderRepository) GetByUserID

func (repo *ReminderRepository) GetByUserID(ctx context.Context, userID uuid.UUID) ([]*reminder.Reminder, error)

func (*ReminderRepository) GetNext

func (repo *ReminderRepository) GetNext(ctx context.Context) (*reminder.Reminder, error)

Jump to

Keyboard shortcuts

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