websocket

package
v0.0.0-...-4e1c0da Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	// contains filtered or unexported fields
}

func (*Host) Handler

func (h *Host) Handler(context *common.Context)

Handler

@Summary      Endpoint for websocket connection
@Id           websocket
@Tags         Push
@Description  Work as a fallback strategy for device without public push provider, each frame in this connection will be a push message
@Param        X-Device-ID  header  string  true  "Device ID, usually a UUID"
@Param        user_secret  path    string  true  "Secret of user"
@Produce      json
@Success      200  {object}  models.Message
@Failure      400  {object}  common.BadRequestResponse
@Failure      401  {object}  common.UnauthorizedResponse
@Router       /{user_secret}/conn [get]

func (*Host) HandlerMethod

func (h *Host) HandlerMethod() string

func (*Host) HandlerPath

func (h *Host) HandlerPath() string

func (*Host) Name

func (h *Host) Name() enum.Sender

func (*Host) OnDeleteDevice

func (h *Host) OnDeleteDevice(ctx *common.Context, device *generate.Device) error

func (*Host) Send

func (h *Host) Send(ctx context.Context, msg *item.PushMessage) error

Jump to

Keyboard shortcuts

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