events

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionAckEvent

type ConnectionAckEvent struct {
	Type      string `json:"type"`
	TimeoutMs int    `json:"connectionTimeoutMs"`
}

func (ConnectionAckEvent) ToProtocol

type DataEvent

type DataEvent struct {
	ID   string `json:"id"`
	Type string `json:"type"`
	Data string `json:"event"`
}

func (DataEvent) ToProtocol

func (event DataEvent) ToProtocol() protocol.DataMessage

type ErrorEvent

type ErrorEvent struct {
	Type   string          `json:"type"`
	ID     string          `json:"id"`
	Errors []ErrorMetadata `json:"errors"`
}

func (ErrorEvent) ToProtocol

func (event ErrorEvent) ToProtocol() protocol.ErrorMessage

type ErrorMetadata

type ErrorMetadata struct {
	Type    string `json:"errorType"`
	Message string `json:"message"`
}

type Frame

type Frame struct {
	Type      string        `json:"type,omitempty"`
	Id        string        `json:"id,omitempty"`
	Topic     string        `json:"channel,omitempty"`
	Payload   []string      `json:"events,omitempty"`
	Signature app.Signature `json:"authorization,omitempty"`
}

func (Frame) Encode

func (f Frame) Encode() (app.Payload, error)

func (Frame) ID

func (f Frame) ID() string

type FrameBuilder

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

func (*FrameBuilder) Build

func (builder *FrameBuilder) Build() app.Frame

func (*FrameBuilder) WithChannel

func (builder *FrameBuilder) WithChannel(channel string) app.FrameBuilder

func (*FrameBuilder) WithID

func (builder *FrameBuilder) WithID(id string) app.FrameBuilder

func (*FrameBuilder) WithPayload

func (builder *FrameBuilder) WithPayload(payload app.Payload) app.FrameBuilder

func (*FrameBuilder) WithSignature

func (builder *FrameBuilder) WithSignature(signature app.Signature) app.FrameBuilder

func (*FrameBuilder) WithType

func (builder *FrameBuilder) WithType(typ string) app.FrameBuilder

type FrameBuilderFactory

type FrameBuilderFactory struct{}

func (FrameBuilderFactory) Create

func (FrameBuilderFactory) Unsubscribe

func (FrameBuilderFactory) Unsubscribe() app.FrameBuilder

type SuccessEvent

type SuccessEvent struct {
	Type string `json:"type"`
	ID   string `json:"id"`
}

func (SuccessEvent) ToProtocol

func (event SuccessEvent) ToProtocol() protocol.SuccessMessage

Jump to

Keyboard shortcuts

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