Documentation
¶
Overview ¶
Package eventstore is a generated protocol buffer package.
It is generated from these files:
testaggcreated.proto testupdatefoo.proto
It has these top-level messages:
TestAggCreated TestAggFooUpdated
Index ¶
Constants ¶
const ( TestAggCreatedTypeCode = "TACRE" TestAggFooUpdateTypeCode = "TAFU" )
The constants are used as unmarshalling hints when reconstructing the aggregate from its event history
Variables ¶
var ErrUnknownType = errors.New("Unknown event type")
Functions ¶
This section is empty.
Types ¶
type TestAgg ¶
The aggregate for our example. In addition to the aggregate type, we need to capture the commands associated with the aggregate (implemented as exported methods that route events) and event types that are used to apply the state mutations.
func NewTestAgg ¶
Factory method for instantiating the aggregate, which is also the command method for 'create'
func NewTestAggFromHistory ¶
Factory method for recreating the aggregate state from the event history
func (*TestAgg) Apply ¶
The required apply method, called only from commands to route and record events
func (*TestAgg) Route ¶
The required route method to route events to their handlers. Note the handlers may only change state - no other side effects are allowed.
type TestAggCreated ¶
type TestAggCreated struct {
AggregateId string `protobuf:"bytes,1,opt,name=aggregateId" json:"aggregateId,omitempty"`
Foo string `protobuf:"bytes,2,opt,name=foo" json:"foo,omitempty"`
Bar string `protobuf:"bytes,3,opt,name=bar" json:"bar,omitempty"`
Baz string `protobuf:"bytes,4,opt,name=baz" json:"baz,omitempty"`
}
func (*TestAggCreated) Descriptor ¶
func (*TestAggCreated) Descriptor() ([]byte, []int)
func (*TestAggCreated) ProtoMessage ¶
func (*TestAggCreated) ProtoMessage()
func (*TestAggCreated) Reset ¶
func (m *TestAggCreated) Reset()
func (*TestAggCreated) String ¶
func (m *TestAggCreated) String() string
type TestAggFooUpdated ¶
type TestAggFooUpdated struct {
AggregateId string `protobuf:"bytes,1,opt,name=aggregateId" json:"aggregateId,omitempty"`
NewFoo string `protobuf:"bytes,2,opt,name=newFoo" json:"newFoo,omitempty"`
}
func (*TestAggFooUpdated) Descriptor ¶
func (*TestAggFooUpdated) Descriptor() ([]byte, []int)
func (*TestAggFooUpdated) ProtoMessage ¶
func (*TestAggFooUpdated) ProtoMessage()
func (*TestAggFooUpdated) Reset ¶
func (m *TestAggFooUpdated) Reset()
func (*TestAggFooUpdated) String ¶
func (m *TestAggFooUpdated) String() string