postgres

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookingRepository

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

func NewBookingRepository

func NewBookingRepository(db *sql.DB) BookingRepository

func (BookingRepository) Find

func (r BookingRepository) Find(ctx context.Context, bookingID string) (*domain.Booking, error)

func (BookingRepository) FindForDateRange

func (r BookingRepository) FindForDateRange(
	ctx context.Context, campsiteID string, startDate time.Time, endDate time.Time,
) ([]*domain.Booking, error)

func (BookingRepository) Insert

func (r BookingRepository) Insert(ctx context.Context, booking *domain.Booking) error

func (BookingRepository) Update

func (r BookingRepository) Update(ctx context.Context, booking *domain.Booking) error

type CampsiteRepository

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

func NewCampsiteRepository

func NewCampsiteRepository(db *sql.DB) CampsiteRepository

func (CampsiteRepository) FindAll

func (r CampsiteRepository) FindAll(ctx context.Context) (campsites []*domain.Campsite, err error)

func (CampsiteRepository) Insert

func (r CampsiteRepository) Insert(ctx context.Context, campsite *domain.Campsite) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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