repository

package
v0.0.0-...-32a9906 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 9 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 (*BookingRepository) CreateBooking

func (r *BookingRepository) CreateBooking(
	ctx context.Context,
	booking *model.Booking,
) (*model.Booking, error)

func (*BookingRepository) DeleteBooking

func (r *BookingRepository) DeleteBooking(ctx context.Context, id uuid.UUID) error

func (*BookingRepository) GetBookingByID

func (r *BookingRepository) GetBookingByID(ctx context.Context, id uuid.UUID) (*model.Booking, error)

func (*BookingRepository) ListBookings

func (r *BookingRepository) ListBookings(ctx context.Context, limit, offset int) ([]*model.Booking, error)

func (*BookingRepository) UpdateBooking

func (r *BookingRepository) UpdateBooking(ctx context.Context, booking *model.Booking) error

type BookingRepositoryInterface

type BookingRepositoryInterface interface {
	CreateBooking(ctx context.Context, booking *model.Booking) (*model.Booking, error)
	GetBookingByID(ctx context.Context, id uuid.UUID) (*model.Booking, error)
	UpdateBooking(ctx context.Context, booking *model.Booking) error
	DeleteBooking(ctx context.Context, id uuid.UUID) error
	ListBookings(ctx context.Context, limit, offset int) ([]*model.Booking, error)
}

func NewBookingRepository

func NewBookingRepository(db *sqlx.DB, logger logger.Logger) BookingRepositoryInterface

type EventRepository

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

func (*EventRepository) CreateEvent

func (r *EventRepository) CreateEvent(ctx context.Context, event *model.Event) error

func (*EventRepository) DeleteEvent

func (r *EventRepository) DeleteEvent(ctx context.Context, id uuid.UUID) error

func (*EventRepository) GetEventByID

func (r *EventRepository) GetEventByID(ctx context.Context, id uuid.UUID) (*model.Event, error)

func (*EventRepository) UpdateEvent

func (r *EventRepository) UpdateEvent(ctx context.Context, event *model.Event) error

type EventRepositoryInterface

type EventRepositoryInterface interface {
	CreateEvent(ctx context.Context, event *model.Event) error
	GetEventByID(ctx context.Context, id uuid.UUID) (*model.Event, error)
	UpdateEvent(ctx context.Context, event *model.Event) error
	DeleteEvent(ctx context.Context, id uuid.UUID) error
}

func NewEventRepository

func NewEventRepository(db *sqlx.DB, logger logger.Logger) EventRepositoryInterface

Jump to

Keyboard shortcuts

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