pb

package
v0.0.0-...-f691fa7 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_eventstore_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetAggregateId

func (x *Event) GetAggregateId() string

func (*Event) GetAggregateType

func (x *Event) GetAggregateType() string

func (*Event) GetEventData

func (x *Event) GetEventData() string

func (*Event) GetEventId

func (x *Event) GetEventId() string

func (*Event) GetEventType

func (x *Event) GetEventType() string

func (*Event) GetStream

func (x *Event) GetStream() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

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 (*OrderCreateCommand_OrderItem) Reset

func (x *OrderCreateCommand_OrderItem) Reset()

func (*OrderCreateCommand_OrderItem) 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 (*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) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetError

func (x *Response) GetError() string

func (*Response) GetIsSuccess

func (x *Response) GetIsSuccess() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedEventStoreServer

type UnimplementedEventStoreServer struct {
}

UnimplementedEventStoreServer can be embedded to have forward compatible implementations.

func (*UnimplementedEventStoreServer) CreateEvent

func (*UnimplementedEventStoreServer) GetEvents

Jump to

Keyboard shortcuts

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