event

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package event provides the Event type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(e *Event, v any) error

Unmarshal unmarshals the CloudEvent representation of v.

Types

type Event

type Event = event.Event

Event is the canonical CloudEvent representation of an object.

func Marshal

func Marshal(v any) (*Event, error)

Marshal returns the CloudEvent representation of v.

func New

func New() *Event

New returns a new Event.

func UnmarshalJSON

func UnmarshalJSON(b []byte) (*Event, error)

UnmarshalJSON unmarshals a CloudEvent from its JSON-encoded form.

type Marshaler

type Marshaler interface {
	MarshalEvent() (*Event, error)
}

Marshaler is the interface implemented by types that can marshal themselves into CloudEvents.

type Unmarshaler

type Unmarshaler interface {
	UnmarshalEvent(*Event) error
}

Unmarshaler is the interface implemented by types that can unmarshal CloudEvent representations of themselves.

type UnsupportedTypeError

type UnsupportedTypeError struct {
	Type reflect.Type
}

An UnsupportedTypeError is returned by Marshal and Unmarshal when attempting to encode or decode an unsupported value type.

func (*UnsupportedTypeError) Error

func (e *UnsupportedTypeError) Error() string

Jump to

Keyboard shortcuts

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