eventapi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Kind EventKind       `json:"kind"`
	Data json.RawMessage `json:"data"`
}

Event represents a message for event API.

func NewEvent

func NewEvent(kind EventKind, v interface{}) (*Event, error)

NewEvent returns newly allocated event.

type EventKind

type EventKind string

EventKind is an enumation for kinds of an event.

const (
	// EventAuthorizationKind represetns kind of authorization event.
	EventAuthorizationKind EventKind = "authorization"
)

type Publisher

type Publisher interface {
	Publish(event *Event) error
}

Publisher pushlished event into a queue.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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