eventenvelope

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const L = "EVENT"

Variables

This section is empty.

Functions

func NewResultWith

func NewResultWith[V S | B](s V, ev *event.T) (res *Result, err E)

func ParseResult

func ParseResult(b B) (t *Result, rem B, err E)

func ParseSubmission

func ParseSubmission(b B) (t *Submission, rem B, err E)

Types

type B

type B = []byte

type Ctx

type Ctx = context.T

type E

type E = error

type N

type N = int

type Result

type Result struct {
	Subscription *subscription.Id
	Event        *event.T
}

Result is an event matching a filter associated with a subscription.

func NewResult

func NewResult() *Result

func (*Result) Label

func (en *Result) Label() S

func (*Result) MarshalJSON

func (en *Result) MarshalJSON(dst B) (b B, err error)

func (*Result) UnmarshalJSON

func (en *Result) UnmarshalJSON(b B) (r B, err error)

func (*Result) Write

func (en *Result) Write(w io.Writer) (err E)

type S

type S = string

type Submission

type Submission struct {
	*event.T
}

Submission is a request from a client for a realy to store an event.

func NewSubmission

func NewSubmission() *Submission

func NewSubmissionWith

func NewSubmissionWith(ev *event.T) *Submission

func (*Submission) Label

func (en *Submission) Label() string

func (*Submission) MarshalJSON

func (en *Submission) MarshalJSON(dst B) (b B, err error)

func (*Submission) UnmarshalJSON

func (en *Submission) UnmarshalJSON(b B) (r B, err error)

func (*Submission) Write

func (en *Submission) Write(w io.Writer) (err E)

Jump to

Keyboard shortcuts

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