Documentation ¶
Index ¶
- func HandlerGetResourceID(fn func(*http.Request) string) func(*Handler)
- func HandlerGetSubscriptionID(fn func(*http.Request) string) func(*Handler)
- func HandlerGetSubscriptionURI(fn func(string, string) string) func(*Handler)
- func HandlerParsePagination(fn func(r *http.Request) (*flare.Pagination, error)) func(*Handler)
- func HandlerResourceRepository(repo flare.ResourceRepositorier) func(*Handler)
- func HandlerSubscriptionRepository(repo flare.SubscriptionRepositorier) func(*Handler)
- func HandlerWriter(writer *infraHTTP.Writer) func(*Handler)
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlerGetResourceID ¶
HandlerGetResourceID the function to fetch the resourceId from the URL.
func HandlerGetSubscriptionID ¶
HandlerGetSubscriptionID the function to fetch the subscriptionId from the URL.
func HandlerGetSubscriptionURI ¶
HandlerGetSubscriptionURI set the function to generate the URI or a given subscription.
func HandlerParsePagination ¶
HandlerParsePagination set the function used to parse the pagination.
func HandlerResourceRepository ¶
func HandlerResourceRepository(repo flare.ResourceRepositorier) func(*Handler)
HandlerResourceRepository set the repository to access the resources.
func HandlerSubscriptionRepository ¶
func HandlerSubscriptionRepository(repo flare.SubscriptionRepositorier) func(*Handler)
HandlerSubscriptionRepository set the repository to access the subscriptions.
func HandlerWriter ¶
HandlerWriter set the function that return the content to client.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements the HTTP handler to manage subscriptions.
func NewHandler ¶
NewHandler initialize the service to handle HTTP Requests.
func (*Handler) Create ¶
func (h *Handler) Create(w http.ResponseWriter, r *http.Request)
Create receive the request to create a subscription.
func (*Handler) Delete ¶
func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
Delete receive the request to delete a subscription.