Documentation ¶
Index ¶
- type CreatePlaceUseCase
- type DeletePlaceByIDUseCase
- type FindNearbyPlacesUseCase
- func (u *FindNearbyPlacesUseCase) Execute(ctx context.Context, input dto.FindNearbyPlacesInputDTO) ([]*dto.FindNearbyPlacesOutputDTO, error)
- func (u *FindNearbyPlacesUseCase) GetNearbyPlacesFromGoogleMapsWithPersistence(ctx context.Context, input dto.FindNearbyPlacesInputDTO) ([]*entity.Place, error)
- func (u *FindNearbyPlacesUseCase) GetNearbyPlacesFromGoogleOrRepository(ctx context.Context, input dto.FindNearbyPlacesInputDTO) ([]*entity.Place, error)
- type FindPlaceByIDUseCase
- type FindPlacesByAccessibilityFeatureUseCase
- type SaveFilterUseCase
- type UpdatePLaceByIDUseCase
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 ¶
func (uc *CreatePlaceUseCase) Execute(ctx context.Context, input *dto.CreatePlaceInputDTO) error
type DeletePlaceByIDUseCase ¶
type DeletePlaceByIDUseCase struct {
PlacesGateway gateway.PlacesGateway
}
func NewDeletePlaceByIDUseCase ¶
func NewDeletePlaceByIDUseCase(placesGateway gateway.PlacesGateway) *DeletePlaceByIDUseCase
func (*DeletePlaceByIDUseCase) Execute ¶
func (uc *DeletePlaceByIDUseCase) Execute(ctx context.Context, input dto.DeletePlaceByIDInputDTO) error
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 ¶
func (u *FindNearbyPlacesUseCase) Execute(ctx context.Context, input dto.FindNearbyPlacesInputDTO) ([]*dto.FindNearbyPlacesOutputDTO, error)
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 ¶
func (u *FindPlaceByIDUseCase) Execute(ctx context.Context, input dto.FindPlaceByIDInputDTO) (*dto.FindPlaceByIDOutputDTO, error)
type FindPlacesByAccessibilityFeatureUseCase ¶
type FindPlacesByAccessibilityFeatureUseCase struct {
PlacesGateway gateway.PlacesGateway
}
func NewFindPlacesByAccessibilityFeatureUseCase ¶
func NewFindPlacesByAccessibilityFeatureUseCase(placesGateway gateway.PlacesGateway) *FindPlacesByAccessibilityFeatureUseCase
func (FindPlacesByAccessibilityFeatureUseCase) Execute ¶
func (uc FindPlacesByAccessibilityFeatureUseCase) Execute(ctx context.Context, input dto.FindPlacesByAccessibilityFeatureInputDTO) ([]*dto.FindPlacesByAccessibilityFeatureOutputDTO, error)
type SaveFilterUseCase ¶
type SaveFilterUseCase struct {
Filter *filters.CuckooFilter
}
func NewSaveFilterUseCase ¶
func NewSaveFilterUseCase(filter *filters.CuckooFilter) *SaveFilterUseCase
type UpdatePLaceByIDUseCase ¶
type UpdatePLaceByIDUseCase struct {
PlacesGateway gateway.PlacesGateway
}
func NewUpdatePlaceByIDUseCase ¶
func NewUpdatePlaceByIDUseCase(placesGateway gateway.PlacesGateway) *UpdatePLaceByIDUseCase
func (*UpdatePLaceByIDUseCase) Execute ¶
func (uc *UpdatePLaceByIDUseCase) Execute(ctx context.Context, input dto.UpdatePlaceByIDInputDTO) error
Click to show internal directories.
Click to hide internal directories.