types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerId

type ConsumerId struct {
	UUID uuid.UUID `json:"uuid"`
}

ConsumerId represents the consumer id

type ConsumerOffset

type ConsumerOffset struct {
	Offset int `json:"offset"`
}

ConsumerOffset represents consumer offset

func (ConsumerOffset) Increment

func (c ConsumerOffset) Increment() ConsumerOffset

Increment increments consumer offset

type ConsumerOffsetData

type ConsumerOffsetData struct {
	StreamName
	ConsumerId
	ConsumerOffset float64
	EventName
}

ConsumerOffsetData represents consumer calculated data

type ConsumerTotals

type ConsumerTotals struct {
	StreamName
	ConsumerCount float64
}

ConsumerTotals represents consumer totals

type Event

type Event struct {
	EventId   string `json:"eventId"`
	EventData `json:"event"`
	System    `json:"system"`
	Trigger   `json:"trigger"`
	Payload   `json:"payload"`
}

Event represents event

func (*Event) Scan

func (e *Event) Scan(value interface{}) error

Scan unmarshal the event or returns error

func (*Event) ToJSON

func (e *Event) ToJSON() string

ToJSON converts event to json

func (Event) Value

func (e Event) Value() (driver.Value, error)

Value returns marshaled event

type EventData

type EventData struct {
	Name    string `json:"name" validate:"required"`
	Version int    `json:"version"`
}

EventData contains event name and version

type EventId

type EventId struct {
	UUID uuid.UUID `json:"uuid"`
}

EventId represents event id

type EventName

type EventName struct {
	Name string `json:"name"`
}

EventName represents event name

type MaxEventCount

type MaxEventCount struct {
	Count int
}

MaxEventCount represents the max events count

type Payload

type Payload map[string]interface{}

Payload represents event payload

type Period

type Period struct {
	Value string
}

Period represents the period

type ProducerId

type ProducerId struct {
	UUID string
}

ProducerId represents producer id

type SearchTerm

type SearchTerm struct {
	Term string `validate:"required"`
}

SearchTerm describes the search term

type SelectEventsQuery

type SelectEventsQuery struct {
	ConsumerId
	StreamName
	EventName
	MaxEventCount
}

SelectEventsQuery represents the search query for events

type Sequence

type Sequence struct {
	Pointer int
}

Sequence represents event sequence

type StreamCount

type StreamCount struct {
	Value float64
}

StreamCount represents stream count

type StreamName

type StreamName struct {
	Name string
}

StreamName represents stream name

type StreamTotals

type StreamTotals struct {
	StreamName
	ProducerId
	EventCount float64
}

StreamTotals represents stream totals

type System

type System struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Time     string `json:"time"`
	Timezone string `json:"timezone"`
}

System represents the system which sends the event

type Trigger

type Trigger struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

Trigger represents the trigger

Jump to

Keyboard shortcuts

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