events

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 6 Imported by: 0

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