Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RentalFetchingOp ¶
type RentalFetchingOp interface { GetRentalByID(ctx context.Context, rentalID int) (*model.Rental, error) ListRentals(ctx context.Context, filters *storage.RentalFilters) (model.Rentals, error) }
RentalFetchingOp is a contract to a rental fetching operation.
type RentalHandler ¶
type RentalHandler struct {
// contains filtered or unexported fields
}
RentalHandler holds implementation of handlers for rentals.
func NewRentalHandler ¶
func NewRentalHandler(rentalFetchingOp RentalFetchingOp) *RentalHandler
NewRentalHandler is a construction function for RentalHandler.
func (*RentalHandler) GetRentalByID ¶
func (rh *RentalHandler) GetRentalByID(method, path string) func(w http.ResponseWriter, r *http.Request)
GetRentalByID returns a handle that is fetching a rental by id.
func (*RentalHandler) ListRentals ¶
func (rh *RentalHandler) ListRentals(method, path string) func(w http.ResponseWriter, r *http.Request)
ListRentals returns a handle that is listing rentals based on filters.
Click to show internal directories.
Click to hide internal directories.