Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides methods for calculating discounts for a bike rental.
func NewService ¶
func NewService( weather bikerental.WeatherService, incidents bikerental.BikeIncidentsService, ) (*Service, error)
NewService creates new service instance.
func (*Service) CalculateDiscount ¶
func (s *Service) CalculateDiscount(ctx context.Context, r bikerental.DiscountRequest) (*bikerental.DiscountResponse, error)
CalculateDiscount returns available discount for a bike rental.
Click to show internal directories.
Click to hide internal directories.