event

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 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 AvroProducer

type AvroProducer struct {
	// contains filtered or unexported fields
}

AvroProducer of output events.

func NewAvroProducer

func NewAvroProducer(outputChannel chan []byte, marshaller Marshaller) *AvroProducer

NewAvroProducer returns a new instance of AvroProducer.

func (*AvroProducer) ImagePublished

func (producer *AvroProducer) ImagePublished(event *ImagePublished) error

ImagePublished produces a new ImagePublished event.

func (*AvroProducer) ImageUploaded

func (producer *AvroProducer) ImageUploaded(event *ImageUploaded) error

ImageUploaded produces a new ImageUploaded event.

type ImagePublished

type ImagePublished struct {
	SrcPath      string `avro:"src_path"`
	DstPath      string `avro:"dst_path"`
	ImageID      string `avro:"image_id"`
	ImageVariant string `avro:"image_variant"`
}

ImagePublished provides an avro structure for an image published event

type ImageUploaded

type ImageUploaded struct {
	Path     string `avro:"path"`
	ImageID  string `avro:"image_id"`
	Filename string `avro:"filename"`
}

ImageUploaded provides an avro structure for an image uploaded event

type Marshaller

type Marshaller interface {
	Marshal(s interface{}) ([]byte, error)
}

Marshaller marshals events into messages.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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