application

package
v0.0.0-...-eb50f0f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Created

func Created(w http.ResponseWriter, location string)

func InternalServerError

func InternalServerError(w http.ResponseWriter, err error)

func NoContent

func NoContent(w http.ResponseWriter)

func NotFound

func NotFound(w http.ResponseWriter)

func Ok

func Ok(w http.ResponseWriter, data []byte)

Types

type Application

type Application interface {
	Start(port string) error
}

func NewApplication

func NewApplication(r chi.Router, db db.Db, mq mq.Context) Application

type NotificationMessage

type NotificationMessage struct {
	EntityType string `json:"type"`
	EntityID   string `json:"id"`
	Body       string `json:"body"`
}

func NewNotificationMessage

func NewNotificationMessage(body string) *NotificationMessage

func (NotificationMessage) ContentType

func (nm NotificationMessage) ContentType() string

func (NotificationMessage) TopicName

func (nm NotificationMessage) TopicName() string

type SubscriptionRequest

type SubscriptionRequest struct {
	*models.Subscription
}

func (*SubscriptionRequest) Bind

func (s *SubscriptionRequest) Bind(r *http.Request) error

Jump to

Keyboard shortcuts

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