bootstrap

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBeginTx  = errors.Wrap(errors.ErrUnknown, "unexpected begin transaction error")
	ErrQuery    = errors.Wrap(errors.ErrUnknown, "unexpected query error")
	ErrExec     = errors.Wrap(errors.ErrUnknown, "unexpected exec error")
	ErrRow      = errors.Wrap(errors.ErrUnknown, "unexpected rows error")
	ErrCommitTx = errors.Wrap(errors.ErrUnknown, "unexpected commit transaction error")
)

Functions

func AsStartOfDayUTC

func AsStartOfDayUTC(t time.Time) time.Time

func DeleteBookings

func DeleteBookings(db *sql.DB) error

func DeleteCampsites

func DeleteCampsites(db *sql.DB) error

func FindBooking

func FindBooking(db *sql.DB, bookingID string) (*domain.Booking, error)

func InsertBooking

func InsertBooking(db *sql.DB, b *domain.Booking) error

func InsertCampsite

func InsertCampsite(db *sql.DB, c *domain.Campsite) error

func NewBooking

func NewBooking(campsiteID string) (*domain.Booking, error)

func NewBookingWithAddDays

func NewBookingWithAddDays(
	campsiteID string,
	startAddDays int,
	endAddDays int,
) (*domain.Booking, error)

func NewCampsite

func NewCampsite() (*domain.Campsite, error)

func NewDB

func NewDB(c *postgres.PostgresContainer) (*sql.DB, error)

func NewPostgresContainer

func NewPostgresContainer() (*postgres.PostgresContainer, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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