Documentation
¶
Index ¶
- func NewHandler(service subservice.SubscriptionsService) *handler
- func NewMiddlewaresProvider(log *slog.Logger) *middlewares
- func ReadJSON[T any](w http.ResponseWriter, r *http.Request, dst T) error
- func SubIdParam(r *http.Request) (*uuid.UUID, error)
- func UserAgentAndIP(r *http.Request) (string, string)
- func WriteHTTPError(w http.ResponseWriter, r *http.Request, e *HttpError)
- func WriteJSON[T any](w http.ResponseWriter, data T, status int, headers http.Header) error
- type DTOValidationError
- type DateLayout
- type HttpError
- type UpdateSubscriptionRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(service subservice.SubscriptionsService) *handler
func NewMiddlewaresProvider ¶
func WriteHTTPError ¶
func WriteHTTPError(w http.ResponseWriter, r *http.Request, e *HttpError)
Types ¶
type DTOValidationError ¶
func (*DTOValidationError) Error ¶
func (e *DTOValidationError) Error() string
func (*DTOValidationError) Unwrap ¶
func (e *DTOValidationError) Unwrap() error
type DateLayout ¶
type DateLayout string
type UpdateSubscriptionRequest ¶
type UpdateSubscriptionRequest struct {
ServiceName *string `json:"service_name"`
MonthlyCost *int `json:"monthly_cost"`
EndDate json.RawMessage `json:"end_date"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.