subscription

package
v0.0.0-...-cab28d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL