application

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	CreateCampsite(ctx context.Context, cmd command.CreateCampsite) error
	CreateBooking(ctx context.Context, cmd command.CreateBooking) error
	UpdateBooking(ctx context.Context, cmd command.UpdateBooking) error
	CancelBooking(ctx context.Context, cmd command.CancelBooking) error
	GetCampsites(ctx context.Context, qry query.GetCampsites) ([]*domain.Campsite, error)
	GetBooking(ctx context.Context, qry query.GetBooking) (*domain.Booking, error)
	GetVacantDates(ctx context.Context, qry query.GetVacantDates) ([]string, error)
}

type CampgroundsApp

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

func New

func (CampgroundsApp) CancelBooking

func (a CampgroundsApp) CancelBooking(ctx context.Context, cmd command.CancelBooking) error

func (CampgroundsApp) CreateBooking

func (a CampgroundsApp) CreateBooking(ctx context.Context, cmd command.CreateBooking) error

func (CampgroundsApp) CreateCampsite

func (a CampgroundsApp) CreateCampsite(ctx context.Context, cmd command.CreateCampsite) error

func (CampgroundsApp) GetBooking

func (a CampgroundsApp) GetBooking(
	ctx context.Context,
	qry query.GetBooking,
) (*domain.Booking, error)

func (CampgroundsApp) GetCampsites

func (a CampgroundsApp) GetCampsites(
	ctx context.Context,
	qry query.GetCampsites,
) ([]*domain.Campsite, error)

func (CampgroundsApp) GetVacantDates

func (a CampgroundsApp) GetVacantDates(
	ctx context.Context,
	qry query.GetVacantDates,
) ([]string, error)

func (CampgroundsApp) UpdateBooking

func (a CampgroundsApp) UpdateBooking(ctx context.Context, cmd command.UpdateBooking) error

type MockApp

type MockApp struct {
	mock.Mock
}

MockApp is an autogenerated mock type for the App type

func NewMockApp

func NewMockApp(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockApp

NewMockApp creates a new instance of MockApp. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockApp) CancelBooking

func (_m *MockApp) CancelBooking(ctx context.Context, cmd command.CancelBooking) error

CancelBooking provides a mock function with given fields: ctx, cmd

func (*MockApp) CreateBooking

func (_m *MockApp) CreateBooking(ctx context.Context, cmd command.CreateBooking) error

CreateBooking provides a mock function with given fields: ctx, cmd

func (*MockApp) CreateCampsite

func (_m *MockApp) CreateCampsite(ctx context.Context, cmd command.CreateCampsite) error

CreateCampsite provides a mock function with given fields: ctx, cmd

func (*MockApp) GetBooking

func (_m *MockApp) GetBooking(ctx context.Context, qry query.GetBooking) (*domain.Booking, error)

GetBooking provides a mock function with given fields: ctx, qry

func (*MockApp) GetCampsites

func (_m *MockApp) GetCampsites(ctx context.Context, qry query.GetCampsites) ([]*domain.Campsite, error)

GetCampsites provides a mock function with given fields: ctx, qry

func (*MockApp) GetVacantDates

func (_m *MockApp) GetVacantDates(ctx context.Context, qry query.GetVacantDates) ([]string, error)

GetVacantDates provides a mock function with given fields: ctx, qry

func (*MockApp) UpdateBooking

func (_m *MockApp) UpdateBooking(ctx context.Context, cmd command.UpdateBooking) error

UpdateBooking provides a mock function with given fields: ctx, cmd

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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