entrypoints

package
Version: v0.0.0-...-afa1830 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProtectedHTTP

func NewProtectedHTTP(
	initReq func() Request,
	appFunc func(context.Context, Request) (interface{}, error),
	responseFunc func(echo.Context, interface{}) error,
	afterOpts ...func(echo.Context, interface{}) error,
) func(eCtx echo.Context) error

NewProtectedHTTP ...

func NewPublicHTTP

func NewPublicHTTP(
	initReq func() Request,
	appFunc func(context.Context, Request) (interface{}, error),
	responseFunc func(echo.Context, interface{}) error,
	afterOpts ...func(echo.Context, interface{}) error,
) func(eCtx echo.Context) error

NewPublicHTTP ...

func ResponseBlob

func ResponseBlob(eCtx echo.Context, data interface{}) error

ResponseBlob ...

func ResponseCreated

func ResponseCreated(eCtx echo.Context, data interface{}) error

ResponseCreated ...

func ResponseNoContent

func ResponseNoContent(eCtx echo.Context, _ interface{}) error

ResponseNoContent ...

func ResponseOK

func ResponseOK(eCtx echo.Context, data interface{}) error

ResponseOK ...

Types

type AckObject

type AckObject struct {
	SenderID string `json:"sender_id"`
	BoxID    string `json:"box_id"`
}

AckObject ...

type Request

type Request interface {
	BindAndValidate(echo.Context) error
}

Request ...

type WSMessage

type WSMessage struct {
	Type   string          `json:"type"`
	Object json.RawMessage `json:"object"`
}

WSMessage ...

type WebsocketHandler

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

WebsocketHandler ...

func NewWebsocketHandler

func NewWebsocketHandler(allowedOrigins []string, boxService *application.BoxApplication) WebsocketHandler

NewWebsocketHandler ...

func (WebsocketHandler) BoxUsersWS

func (wh WebsocketHandler) BoxUsersWS(c echo.Context) error

BoxUsersWS ...

func (*WebsocketHandler) RedisListener

func (wh *WebsocketHandler) RedisListener(
	c echo.Context,
	wsName string,
	chName string,
	handler func(echo.Context, WebsocketHandler, []byte) error,
) error

RedisListener ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL