usecase

package
v0.0.0-...-51e95d8 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 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 CreatePlaceUseCase

type CreatePlaceUseCase struct {
	PlacesGateway gateway.PlacesGateway
	CuckooFilter  *filters.CuckooFilter
}

func NewCreatePlaceUseCase

func NewCreatePlaceUseCase(placesGateway gateway.PlacesGateway, cuckooFilter *filters.CuckooFilter) *CreatePlaceUseCase

func (*CreatePlaceUseCase) Execute

type DeletePlaceByIDUseCase

type DeletePlaceByIDUseCase struct {
	PlacesGateway gateway.PlacesGateway
}

func NewDeletePlaceByIDUseCase

func NewDeletePlaceByIDUseCase(placesGateway gateway.PlacesGateway) *DeletePlaceByIDUseCase

func (*DeletePlaceByIDUseCase) Execute

Execute deletes a place by ID from the PlacesGateway.

ctx - context object used to cancel the operation if needed. input - input DTO that contains the ID of the place to be deleted. error - returns any errors that occurred while deleting the place.

type FindNearbyPlacesUseCase

type FindNearbyPlacesUseCase struct {
	PlacesGateway    gateway.PlacesGateway
	GoogleMapsClient *maps.Client
	CuckooFilter     *filters.CuckooFilter
}

func NewFindNearbyPlacesUseCase

func NewFindNearbyPlacesUseCase(placesGateway gateway.PlacesGateway, googleMapsClient *maps.Client, cuckooFilter *filters.CuckooFilter) *FindNearbyPlacesUseCase

func (*FindNearbyPlacesUseCase) Execute

Execute finds nearby places and returns an array of related output DTO objects or an error.

ctx - context object. input - input DTO object for finding nearby places.

[]*dto.FindNearbyPlacesOutputDTO - an array of output DTO objects containing information about nearby places. error - an error object if the function fails to find nearby places.

func (*FindNearbyPlacesUseCase) GetNearbyPlacesFromGoogleMapsWithPersistence

func (u *FindNearbyPlacesUseCase) GetNearbyPlacesFromGoogleMapsWithPersistence(ctx context.Context, input dto.FindNearbyPlacesInputDTO) ([]*entity.Place, error)

func (*FindNearbyPlacesUseCase) GetNearbyPlacesFromGoogleOrRepository

func (u *FindNearbyPlacesUseCase) GetNearbyPlacesFromGoogleOrRepository(ctx context.Context, input dto.FindNearbyPlacesInputDTO) ([]*entity.Place, error)

type FindPlaceByIDUseCase

type FindPlaceByIDUseCase struct {
	PlacesGateway gateway.PlacesGateway
}

func NewFindPlaceByIdUseCase

func NewFindPlaceByIdUseCase(placesGateway gateway.PlacesGateway) *FindPlaceByIDUseCase

func (*FindPlaceByIDUseCase) Execute

type FindPlacesByAccessibilityFeatureUseCase

type FindPlacesByAccessibilityFeatureUseCase struct {
	PlacesGateway gateway.PlacesGateway
}

func NewFindPlacesByAccessibilityFeatureUseCase

func NewFindPlacesByAccessibilityFeatureUseCase(placesGateway gateway.PlacesGateway) *FindPlacesByAccessibilityFeatureUseCase

type SaveFilterUseCase

type SaveFilterUseCase struct {
	Filter *filters.CuckooFilter
}

func NewSaveFilterUseCase

func NewSaveFilterUseCase(filter *filters.CuckooFilter) *SaveFilterUseCase

func (*SaveFilterUseCase) Execute

func (uc *SaveFilterUseCase) Execute(ctx context.Context) error

type UpdatePLaceByIDUseCase

type UpdatePLaceByIDUseCase struct {
	PlacesGateway gateway.PlacesGateway
}

func NewUpdatePlaceByIDUseCase

func NewUpdatePlaceByIDUseCase(placesGateway gateway.PlacesGateway) *UpdatePLaceByIDUseCase

func (*UpdatePLaceByIDUseCase) Execute

Jump to

Keyboard shortcuts

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