events

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 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

func Publish added in v0.2.0

func Publish() app.FrameBuilder

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 Failure added in v0.2.0

type Failure struct {
	ID    string `json:"identifier"`
	Index int    `json:"index"`
	Raw   []byte
}

Best guess, could not find a schema for a failed event item. Raw is used to store the object in its entirety to be able to see the original object

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) WithBatch added in v0.2.0

func (builder *FrameBuilder) WithBatch(batch app.Batch) app.FrameBuilder

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 PublishResult added in v0.2.0

type PublishResult struct {
	ID         string    `json:"id"`
	Type       string    `json:"type"`
	Successful []Success `json:"successful"`
	Failed     []Failure `json:"failed"`
}

func (PublishResult) ToProtocol added in v0.2.0

func (event PublishResult) ToProtocol() protocol.PublishResultMessage

type Success added in v0.2.0

type Success struct {
	ID    string `json:"identifier"`
	Index int    `json:"index"`
}

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