test

package
v0.0.0-...-1cf6fb1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KnownLanguages_name = map[int32]string{
	0: "ENGLISH",
	1: "SPANISH",
}
View Source
var KnownLanguages_value = map[string]int32{
	"ENGLISH": 0,
	"SPANISH": 1,
}

Functions

func NewSerializer

func NewSerializer() eventing.Serializer

Types

type Builder

type Builder struct {
	ID      string
	Events  []eventing.Event
	Version int
}

func NewBuilder

func NewBuilder(id string, version int) *Builder

func (*Builder) EventA

func (b *Builder) EventA(language KnownLanguages, message *EventA_InnerMessage)

func (*Builder) EventB

func (b *Builder) EventB(message *OuterMessage)

type EventA

type EventA struct {
	Id                   string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Version              int32                `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	At                   int64                `protobuf:"varint,3,opt,name=at,proto3" json:"at,omitempty"`
	Language             KnownLanguages       `protobuf:"varint,4,opt,name=language,proto3,enum=test.KnownLanguages" json:"language,omitempty"`
	Message              *EventA_InnerMessage `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*EventA) AggregateID

func (e *EventA) AggregateID() string

AggregateID implements the Event interface

func (*EventA) Descriptor

func (*EventA) Descriptor() ([]byte, []int)

func (*EventA) EventAt

func (e *EventA) EventAt() time.Time

EventAt implements the Event interface

func (EventA) EventName

func (EventA) EventName() string

EventName implements the EventNamer interface

func (*EventA) EventVersion

func (e *EventA) EventVersion() int

EventVersion implements the Event interface

func (*EventA) GetAt

func (m *EventA) GetAt() int64

func (*EventA) GetId

func (m *EventA) GetId() string

func (*EventA) GetLanguage

func (m *EventA) GetLanguage() KnownLanguages

func (*EventA) GetMessage

func (m *EventA) GetMessage() *EventA_InnerMessage

func (*EventA) GetVersion

func (m *EventA) GetVersion() int32

func (*EventA) ProtoMessage

func (*EventA) ProtoMessage()

func (*EventA) Reset

func (m *EventA) Reset()

func (*EventA) String

func (m *EventA) String() string

func (*EventA) XXX_DiscardUnknown

func (m *EventA) XXX_DiscardUnknown()

func (*EventA) XXX_Marshal

func (m *EventA) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventA) XXX_Merge

func (m *EventA) XXX_Merge(src proto.Message)

func (*EventA) XXX_Size

func (m *EventA) XXX_Size() int

func (*EventA) XXX_Unmarshal

func (m *EventA) XXX_Unmarshal(b []byte) error

type EventA_InnerMessage

type EventA_InnerMessage struct {
	Hello                string   `protobuf:"bytes,1,opt,name=hello,proto3" json:"hello,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EventA_InnerMessage) Descriptor

func (*EventA_InnerMessage) Descriptor() ([]byte, []int)

func (*EventA_InnerMessage) GetHello

func (m *EventA_InnerMessage) GetHello() string

func (*EventA_InnerMessage) ProtoMessage

func (*EventA_InnerMessage) ProtoMessage()

func (*EventA_InnerMessage) Reset

func (m *EventA_InnerMessage) Reset()

func (*EventA_InnerMessage) String

func (m *EventA_InnerMessage) String() string

func (*EventA_InnerMessage) XXX_DiscardUnknown

func (m *EventA_InnerMessage) XXX_DiscardUnknown()

func (*EventA_InnerMessage) XXX_Marshal

func (m *EventA_InnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventA_InnerMessage) XXX_Merge

func (m *EventA_InnerMessage) XXX_Merge(src proto.Message)

func (*EventA_InnerMessage) XXX_Size

func (m *EventA_InnerMessage) XXX_Size() int

func (*EventA_InnerMessage) XXX_Unmarshal

func (m *EventA_InnerMessage) XXX_Unmarshal(b []byte) error

type EventB

type EventB struct {
	Id                   string        `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Version              int32         `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	At                   int64         `protobuf:"varint,3,opt,name=at,proto3" json:"at,omitempty"`
	Message              *OuterMessage `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*EventB) AggregateID

func (e *EventB) AggregateID() string

AggregateID implements the Event interface

func (*EventB) Descriptor

func (*EventB) Descriptor() ([]byte, []int)

func (*EventB) EventAt

func (e *EventB) EventAt() time.Time

EventAt implements the Event interface

func (EventB) EventName

func (EventB) EventName() string

EventName implements the EventNamer interface

func (*EventB) EventVersion

func (e *EventB) EventVersion() int

EventVersion implements the Event interface

func (*EventB) GetAt

func (m *EventB) GetAt() int64

func (*EventB) GetId

func (m *EventB) GetId() string

func (*EventB) GetMessage

func (m *EventB) GetMessage() *OuterMessage

func (*EventB) GetVersion

func (m *EventB) GetVersion() int32

func (*EventB) ProtoMessage

func (*EventB) ProtoMessage()

func (*EventB) Reset

func (m *EventB) Reset()

func (*EventB) String

func (m *EventB) String() string

func (*EventB) XXX_DiscardUnknown

func (m *EventB) XXX_DiscardUnknown()

func (*EventB) XXX_Marshal

func (m *EventB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventB) XXX_Merge

func (m *EventB) XXX_Merge(src proto.Message)

func (*EventB) XXX_Size

func (m *EventB) XXX_Size() int

func (*EventB) XXX_Unmarshal

func (m *EventB) XXX_Unmarshal(b []byte) error

type KnownLanguages

type KnownLanguages int32
const (
	KnownLanguages_ENGLISH KnownLanguages = 0
	KnownLanguages_SPANISH KnownLanguages = 1
)

func (KnownLanguages) EnumDescriptor

func (KnownLanguages) EnumDescriptor() ([]byte, []int)

func (KnownLanguages) String

func (x KnownLanguages) String() string

type OuterMessage

type OuterMessage struct {
	Hola                 string   `protobuf:"bytes,1,opt,name=hola,proto3" json:"hola,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OuterMessage) Descriptor

func (*OuterMessage) Descriptor() ([]byte, []int)

func (*OuterMessage) GetHola

func (m *OuterMessage) GetHola() string

func (*OuterMessage) ProtoMessage

func (*OuterMessage) ProtoMessage()

func (*OuterMessage) Reset

func (m *OuterMessage) Reset()

func (*OuterMessage) String

func (m *OuterMessage) String() string

func (*OuterMessage) XXX_DiscardUnknown

func (m *OuterMessage) XXX_DiscardUnknown()

func (*OuterMessage) XXX_Marshal

func (m *OuterMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OuterMessage) XXX_Merge

func (m *OuterMessage) XXX_Merge(src proto.Message)

func (*OuterMessage) XXX_Size

func (m *OuterMessage) XXX_Size() int

func (*OuterMessage) XXX_Unmarshal

func (m *OuterMessage) XXX_Unmarshal(b []byte) error

type Serializer

type Serializer struct{}

func (Serializer) Deserialize

func (s Serializer) Deserialize(record eventing.Record) (eventing.Event, error)

func (Serializer) Serialize

func (s Serializer) Serialize(event eventing.Event) (eventing.Record, error)

type TestEvent

type TestEvent struct {
	// Types that are valid to be assigned to Event:
	//	*TestEvent_EventA
	//	*TestEvent_EventB
	Event                isTestEvent_Event `protobuf_oneof:"event"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*TestEvent) Descriptor

func (*TestEvent) Descriptor() ([]byte, []int)

func (*TestEvent) GetEvent

func (m *TestEvent) GetEvent() isTestEvent_Event

func (*TestEvent) GetEventA

func (m *TestEvent) GetEventA() *EventA

func (*TestEvent) GetEventB

func (m *TestEvent) GetEventB() *EventB

func (*TestEvent) ProtoMessage

func (*TestEvent) ProtoMessage()

func (*TestEvent) Reset

func (m *TestEvent) Reset()

func (*TestEvent) String

func (m *TestEvent) String() string

func (*TestEvent) XXX_DiscardUnknown

func (m *TestEvent) XXX_DiscardUnknown()

func (*TestEvent) XXX_Marshal

func (m *TestEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TestEvent) XXX_Merge

func (m *TestEvent) XXX_Merge(src proto.Message)

func (*TestEvent) XXX_OneofFuncs

func (*TestEvent) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*TestEvent) XXX_Size

func (m *TestEvent) XXX_Size() int

func (*TestEvent) XXX_Unmarshal

func (m *TestEvent) XXX_Unmarshal(b []byte) error

type TestEvent_EventA

type TestEvent_EventA struct {
	EventA *EventA `protobuf:"bytes,1,opt,name=eventA,proto3,oneof"`
}

type TestEvent_EventB

type TestEvent_EventB struct {
	EventB *EventB `protobuf:"bytes,2,opt,name=eventB,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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