Documentation ¶
Index ¶
- Variables
- func RegisterEventStoreServer(s *grpc.Server, srv EventStoreServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetAggregateId() string
- func (x *Event) GetAggregateType() string
- func (x *Event) GetEventData() string
- func (x *Event) GetEventId() string
- func (x *Event) GetEventType() string
- func (x *Event) GetStream() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventFilter
- func (*EventFilter) Descriptor() ([]byte, []int)deprecated
- func (x *EventFilter) GetAggregateId() string
- func (x *EventFilter) GetEventId() string
- func (*EventFilter) ProtoMessage()
- func (x *EventFilter) ProtoReflect() protoreflect.Message
- func (x *EventFilter) Reset()
- func (x *EventFilter) String() string
- type EventResponse
- type EventStoreClient
- type EventStoreServer
- type OrderCreateCommand
- func (*OrderCreateCommand) Descriptor() ([]byte, []int)deprecated
- func (x *OrderCreateCommand) GetAmount() float32
- func (x *OrderCreateCommand) GetCreatedOn() int64
- func (x *OrderCreateCommand) GetCustomerId() string
- func (x *OrderCreateCommand) GetOrderId() string
- func (x *OrderCreateCommand) GetOrderItems() []*OrderCreateCommand_OrderItem
- func (x *OrderCreateCommand) GetRestaurantId() string
- func (x *OrderCreateCommand) GetStatus() string
- func (*OrderCreateCommand) ProtoMessage()
- func (x *OrderCreateCommand) ProtoReflect() protoreflect.Message
- func (x *OrderCreateCommand) Reset()
- func (x *OrderCreateCommand) String() string
- type OrderCreateCommand_OrderItem
- func (*OrderCreateCommand_OrderItem) Descriptor() ([]byte, []int)deprecated
- func (x *OrderCreateCommand_OrderItem) GetCode() string
- func (x *OrderCreateCommand_OrderItem) GetName() string
- func (x *OrderCreateCommand_OrderItem) GetQuantity() int32
- func (x *OrderCreateCommand_OrderItem) GetUnitPrice() float32
- func (*OrderCreateCommand_OrderItem) ProtoMessage()
- func (x *OrderCreateCommand_OrderItem) ProtoReflect() protoreflect.Message
- func (x *OrderCreateCommand_OrderItem) Reset()
- func (x *OrderCreateCommand_OrderItem) String() string
- type OrderPaymentDebitedCommand
- func (*OrderPaymentDebitedCommand) Descriptor() ([]byte, []int)deprecated
- func (x *OrderPaymentDebitedCommand) GetAmount() float32
- func (x *OrderPaymentDebitedCommand) GetCustomerId() string
- func (x *OrderPaymentDebitedCommand) GetOrderId() string
- func (*OrderPaymentDebitedCommand) ProtoMessage()
- func (x *OrderPaymentDebitedCommand) ProtoReflect() protoreflect.Message
- func (x *OrderPaymentDebitedCommand) Reset()
- func (x *OrderPaymentDebitedCommand) String() string
- type Response
- type UnimplementedEventStoreServer
Constants ¶
This section is empty.
Variables ¶
var File_eventstore_proto protoreflect.FileDescriptor
var File_order_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventStoreServer ¶
func RegisterEventStoreServer(s *grpc.Server, srv EventStoreServer)
Types ¶
type Event ¶
type Event struct { EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` EventType string `protobuf:"bytes,2,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` AggregateId string `protobuf:"bytes,3,opt,name=aggregate_id,json=aggregateId,proto3" json:"aggregate_id,omitempty"` AggregateType string `protobuf:"bytes,4,opt,name=aggregate_type,json=aggregateType,proto3" json:"aggregate_type,omitempty"` EventData string `protobuf:"bytes,5,opt,name=event_data,json=eventData,proto3" json:"event_data,omitempty"` Stream string `protobuf:"bytes,6,opt,name=stream,proto3" json:"stream,omitempty"` // an optional field // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetAggregateId ¶
func (*Event) GetAggregateType ¶
func (*Event) GetEventData ¶
func (*Event) GetEventId ¶
func (*Event) GetEventType ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventFilter ¶
type EventFilter struct { EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` AggregateId string `protobuf:"bytes,2,opt,name=aggregate_id,json=aggregateId,proto3" json:"aggregate_id,omitempty"` // contains filtered or unexported fields }
func (*EventFilter) Descriptor
deprecated
func (*EventFilter) Descriptor() ([]byte, []int)
Deprecated: Use EventFilter.ProtoReflect.Descriptor instead.
func (*EventFilter) GetAggregateId ¶
func (x *EventFilter) GetAggregateId() string
func (*EventFilter) GetEventId ¶
func (x *EventFilter) GetEventId() string
func (*EventFilter) ProtoMessage ¶
func (*EventFilter) ProtoMessage()
func (*EventFilter) ProtoReflect ¶
func (x *EventFilter) ProtoReflect() protoreflect.Message
func (*EventFilter) Reset ¶
func (x *EventFilter) Reset()
func (*EventFilter) String ¶
func (x *EventFilter) String() string
type EventResponse ¶
type EventResponse struct { Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // contains filtered or unexported fields }
func (*EventResponse) Descriptor
deprecated
func (*EventResponse) Descriptor() ([]byte, []int)
Deprecated: Use EventResponse.ProtoReflect.Descriptor instead.
func (*EventResponse) GetEvents ¶
func (x *EventResponse) GetEvents() []*Event
func (*EventResponse) ProtoMessage ¶
func (*EventResponse) ProtoMessage()
func (*EventResponse) ProtoReflect ¶
func (x *EventResponse) ProtoReflect() protoreflect.Message
func (*EventResponse) Reset ¶
func (x *EventResponse) Reset()
func (*EventResponse) String ¶
func (x *EventResponse) String() string
type EventStoreClient ¶
type EventStoreClient interface { // Get all events for the given aggregate and event GetEvents(ctx context.Context, in *EventFilter, opts ...grpc.CallOption) (*EventResponse, error) // Create a new event to the event repository CreateEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*Response, error) }
EventStoreClient is the client API for EventStore service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventStoreClient ¶
func NewEventStoreClient(cc grpc.ClientConnInterface) EventStoreClient
type EventStoreServer ¶
type EventStoreServer interface { // Get all events for the given aggregate and event GetEvents(context.Context, *EventFilter) (*EventResponse, error) // Create a new event to the event repository CreateEvent(context.Context, *Event) (*Response, error) }
EventStoreServer is the server API for EventStore service.
type OrderCreateCommand ¶
type OrderCreateCommand struct { OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` CreatedOn int64 `protobuf:"varint,4,opt,name=created_on,json=createdOn,proto3" json:"created_on,omitempty"` // Date stores as unix int64 value RestaurantId string `protobuf:"bytes,5,opt,name=restaurant_id,json=restaurantId,proto3" json:"restaurant_id,omitempty"` Amount float32 `protobuf:"fixed32,6,opt,name=amount,proto3" json:"amount,omitempty"` OrderItems []*OrderCreateCommand_OrderItem `protobuf:"bytes,7,rep,name=order_items,json=orderItems,proto3" json:"order_items,omitempty"` // contains filtered or unexported fields }
func (*OrderCreateCommand) Descriptor
deprecated
func (*OrderCreateCommand) Descriptor() ([]byte, []int)
Deprecated: Use OrderCreateCommand.ProtoReflect.Descriptor instead.
func (*OrderCreateCommand) GetAmount ¶
func (x *OrderCreateCommand) GetAmount() float32
func (*OrderCreateCommand) GetCreatedOn ¶
func (x *OrderCreateCommand) GetCreatedOn() int64
func (*OrderCreateCommand) GetCustomerId ¶
func (x *OrderCreateCommand) GetCustomerId() string
func (*OrderCreateCommand) GetOrderId ¶
func (x *OrderCreateCommand) GetOrderId() string
func (*OrderCreateCommand) GetOrderItems ¶
func (x *OrderCreateCommand) GetOrderItems() []*OrderCreateCommand_OrderItem
func (*OrderCreateCommand) GetRestaurantId ¶
func (x *OrderCreateCommand) GetRestaurantId() string
func (*OrderCreateCommand) GetStatus ¶
func (x *OrderCreateCommand) GetStatus() string
func (*OrderCreateCommand) ProtoMessage ¶
func (*OrderCreateCommand) ProtoMessage()
func (*OrderCreateCommand) ProtoReflect ¶
func (x *OrderCreateCommand) ProtoReflect() protoreflect.Message
func (*OrderCreateCommand) Reset ¶
func (x *OrderCreateCommand) Reset()
func (*OrderCreateCommand) String ¶
func (x *OrderCreateCommand) String() string
type OrderCreateCommand_OrderItem ¶
type OrderCreateCommand_OrderItem struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` UnitPrice float32 `protobuf:"fixed32,3,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"` Quantity int32 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*OrderCreateCommand_OrderItem) Descriptor
deprecated
func (*OrderCreateCommand_OrderItem) Descriptor() ([]byte, []int)
Deprecated: Use OrderCreateCommand_OrderItem.ProtoReflect.Descriptor instead.
func (*OrderCreateCommand_OrderItem) GetCode ¶
func (x *OrderCreateCommand_OrderItem) GetCode() string
func (*OrderCreateCommand_OrderItem) GetName ¶
func (x *OrderCreateCommand_OrderItem) GetName() string
func (*OrderCreateCommand_OrderItem) GetQuantity ¶
func (x *OrderCreateCommand_OrderItem) GetQuantity() int32
func (*OrderCreateCommand_OrderItem) GetUnitPrice ¶
func (x *OrderCreateCommand_OrderItem) GetUnitPrice() float32
func (*OrderCreateCommand_OrderItem) ProtoMessage ¶
func (*OrderCreateCommand_OrderItem) ProtoMessage()
func (*OrderCreateCommand_OrderItem) ProtoReflect ¶
func (x *OrderCreateCommand_OrderItem) ProtoReflect() protoreflect.Message
func (*OrderCreateCommand_OrderItem) Reset ¶
func (x *OrderCreateCommand_OrderItem) Reset()
func (*OrderCreateCommand_OrderItem) String ¶
func (x *OrderCreateCommand_OrderItem) String() string
type OrderPaymentDebitedCommand ¶
type OrderPaymentDebitedCommand struct { OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` Amount float32 `protobuf:"fixed32,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*OrderPaymentDebitedCommand) Descriptor
deprecated
func (*OrderPaymentDebitedCommand) Descriptor() ([]byte, []int)
Deprecated: Use OrderPaymentDebitedCommand.ProtoReflect.Descriptor instead.
func (*OrderPaymentDebitedCommand) GetAmount ¶
func (x *OrderPaymentDebitedCommand) GetAmount() float32
func (*OrderPaymentDebitedCommand) GetCustomerId ¶
func (x *OrderPaymentDebitedCommand) GetCustomerId() string
func (*OrderPaymentDebitedCommand) GetOrderId ¶
func (x *OrderPaymentDebitedCommand) GetOrderId() string
func (*OrderPaymentDebitedCommand) ProtoMessage ¶
func (*OrderPaymentDebitedCommand) ProtoMessage()
func (*OrderPaymentDebitedCommand) ProtoReflect ¶
func (x *OrderPaymentDebitedCommand) ProtoReflect() protoreflect.Message
func (*OrderPaymentDebitedCommand) Reset ¶
func (x *OrderPaymentDebitedCommand) Reset()
func (*OrderPaymentDebitedCommand) String ¶
func (x *OrderPaymentDebitedCommand) String() string
type Response ¶
type Response struct { IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetIsSuccess ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedEventStoreServer ¶
type UnimplementedEventStoreServer struct { }
UnimplementedEventStoreServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventStoreServer) CreateEvent ¶
func (*UnimplementedEventStoreServer) GetEvents ¶
func (*UnimplementedEventStoreServer) GetEvents(context.Context, *EventFilter) (*EventResponse, error)