Documentation ¶
Index ¶
- type Handlers
- func (h *Handlers) Add(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) AddOptOut(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) DeleteOptOut(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetByPackage(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetByUser(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetOptOutList(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers represents a group of http handlers in charge of handling subscriptions operations.
func NewHandlers ¶
func NewHandlers(subscriptionManager hub.SubscriptionManager) *Handlers
NewHandlers creates a new Handlers instance.
func (*Handlers) Add ¶
func (h *Handlers) Add(w http.ResponseWriter, r *http.Request)
Add is an http handler that adds the provided subscription to the database.
func (*Handlers) AddOptOut ¶
func (h *Handlers) AddOptOut(w http.ResponseWriter, r *http.Request)
AddOptOut is an http handler that adds the provided opt-out to the database.
func (*Handlers) Delete ¶
func (h *Handlers) Delete(w http.ResponseWriter, r *http.Request)
Delete is an http handler that removes the provided subscription from the database.
func (*Handlers) DeleteOptOut ¶
func (h *Handlers) DeleteOptOut(w http.ResponseWriter, r *http.Request)
DeleteOptOut is an http handler that removes the provided opt-out from the database.
func (*Handlers) GetByPackage ¶
func (h *Handlers) GetByPackage(w http.ResponseWriter, r *http.Request)
GetByPackage is an http handler that returns the subscriptions a user has for a given package.
func (*Handlers) GetByUser ¶
func (h *Handlers) GetByUser(w http.ResponseWriter, r *http.Request)
GetByUser is an http handler that returns the subscriptions of the user doing the request.
func (*Handlers) GetOptOutList ¶
func (h *Handlers) GetOptOutList(w http.ResponseWriter, r *http.Request)
GetOptOutList is an http handler that returns the opt-out entries of the user doing the request.