adapters

package
v0.0.0-...-e173b71 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMySQLConnection

func NewMySQLConnection() (*sqlx.DB, error)

Types

type MemoryHourRepository

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

func NewMemoryHourRepository

func NewMemoryHourRepository(hourFactory hour.Factory) *MemoryHourRepository

func (MemoryHourRepository) GetHour

func (m MemoryHourRepository) GetHour(_ context.Context, hourTime time.Time) (*hour.Hour, error)

func (*MemoryHourRepository) UpdateHour

func (m *MemoryHourRepository) UpdateHour(
	_ context.Context,
	hourTime time.Time,
	updateFn func(h *hour.Hour) (*hour.Hour, error),
) error

type MySQLDatesRepository

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

func NewMySQLDatesRepository

func NewMySQLDatesRepository(db *sqlx.DB, factory hour.Factory) *MySQLDatesRepository

func (MySQLDatesRepository) AvailableHours

func (m MySQLDatesRepository) AvailableHours(ctx context.Context, from time.Time, to time.Time) ([]query.Date, error)

type MySQLHourRepository

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

func NewMySQLHourRepository

func NewMySQLHourRepository(db *sqlx.DB, hourFactory hour.Factory) *MySQLHourRepository

func (MySQLHourRepository) GetHour

func (m MySQLHourRepository) GetHour(ctx context.Context, time time.Time) (*hour.Hour, error)

func (MySQLHourRepository) UpdateHour

func (m MySQLHourRepository) UpdateHour(
	ctx context.Context,
	hourTime time.Time,
	updateFn func(h *hour.Hour) (*hour.Hour, error),
) error

Jump to

Keyboard shortcuts

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