websocket

package
v0.0.0-...-4784c45 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Message string `json:"message"`
}

type OperationParameters

type OperationParameters struct {
	Query store.Query `json:"query"`
	Limit store.Limit `json:"limit"`
	Order store.Order `json:"offset"`
}

type PayloadMetadata

type PayloadMetadata struct {
	Exists bool `json:"exists"`
}

type WebSocketHandler

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

func NewWebSocketHandler

func NewWebSocketHandler(thunder *thunder.Thunder) *WebSocketHandler

func (*WebSocketHandler) HandlerFunc

func (h *WebSocketHandler) HandlerFunc() http.HandlerFunc

type WebSocketMessage

type WebSocketMessage struct {
	Operation           WebSocketOperation  `json:"operation"`
	OperationParameters OperationParameters `json:"operationParameters,omitempty"`
	Key                 string              `json:"key"`
	RequestID           uint64              `json:"requestId"`
	TransactionID       uint64              `json:"transactionId"`
	Error               Error               `json:"error"`
	Payload             json.RawMessage     `json:"payload,omitempty"`
	PayloadMetadata     PayloadMetadata     `json:"payloadMetadata,omitempty"`
}

type WebSocketOperation

type WebSocketOperation string
const (
	// Incoming
	Subscribe WebSocketOperation = "SUBSCRIBE"
	Add       WebSocketOperation = "ADD"
	Set       WebSocketOperation = "SET"
	Update    WebSocketOperation = "UPDATE"
	Delete    WebSocketOperation = "DELETE"

	// Outgoing
	ValueChange WebSocketOperation = "VALUE_CHANGE"

	// Incoming & Outgoing
	Snapshot WebSocketOperation = "SNAPSHOT"
)

Jump to

Keyboard shortcuts

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