sql

package
v0.0.0-...-47a8f2b Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL          string
	SSLMode      string
	BinaryParams string
}

Config defines the SQL connection configuration

func (*Config) DatabaseURL

func (c *Config) DatabaseURL() string

DatabaseURL returns the url prepared with its param values.

type DeliveriesRepository

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

func NewDeliveriesRepository

func NewDeliveriesRepository(sess db.Session) *DeliveriesRepository

func (*DeliveriesRepository) FindAllNotDelivered

func (dr *DeliveriesRepository) FindAllNotDelivered(ctx context.Context) ([]domain.Delivery, error)

func (*DeliveriesRepository) FindByIdentifier

func (dr *DeliveriesRepository) FindByIdentifier(ctx context.Context, identifier string) (domain.Delivery, error)

func (*DeliveriesRepository) Insert

func (dr *DeliveriesRepository) Insert(ctx context.Context, delivery domain.Delivery) error

type Delivery

type Delivery struct {
	Identifier string  `db:"identifier"`
	Events     []Event `db:"events"`
	Delivered  bool    `db:"delivered"`
}

type Event

type Event struct {
	Timestamp   string `json:"timestamp"`
	Information string `json:"information"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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