Documentation
¶
Index ¶
- Variables
- func RegisterAccountServiceServer(s *grpc.Server, srv AccountServiceServer)
- func RegisterEventStoreServer(s *grpc.Server, srv EventStoreServer)
- type AccountServiceClient
- type AccountServiceServer
- type AddFundsRequest
- type AddFundsResponse
- type BalanceRequest
- type BalanceResponse
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetAggregateId() string
- func (x *Event) GetAggregateType() string
- func (x *Event) GetChannel() string
- func (x *Event) GetEventData() string
- func (x *Event) GetEventId() string
- func (x *Event) GetEventType() 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 Response
- type UnimplementedAccountServiceServer
- type UnimplementedEventStoreServer
Constants ¶
This section is empty.
Variables ¶
var File_account_proto protoreflect.FileDescriptor
var File_events_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAccountServiceServer ¶
func RegisterAccountServiceServer(s *grpc.Server, srv AccountServiceServer)
func RegisterEventStoreServer ¶
func RegisterEventStoreServer(s *grpc.Server, srv EventStoreServer)
Types ¶
type AccountServiceClient ¶
type AccountServiceClient interface { GetBalance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error) AddFunds(ctx context.Context, in *AddFundsRequest, opts ...grpc.CallOption) (*AddFundsResponse, error) }
AccountServiceClient is the client API for AccountService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAccountServiceClient ¶
func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient
type AccountServiceServer ¶
type AccountServiceServer interface { GetBalance(context.Context, *BalanceRequest) (*BalanceResponse, error) AddFunds(context.Context, *AddFundsRequest) (*AddFundsResponse, error) }
AccountServiceServer is the server API for AccountService service.
type AddFundsRequest ¶
type AddFundsRequest struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*AddFundsRequest) Descriptor
deprecated
func (*AddFundsRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddFundsRequest.ProtoReflect.Descriptor instead.
func (*AddFundsRequest) GetUserId ¶
func (x *AddFundsRequest) GetUserId() int32
func (*AddFundsRequest) ProtoMessage ¶
func (*AddFundsRequest) ProtoMessage()
func (*AddFundsRequest) ProtoReflect ¶
func (x *AddFundsRequest) ProtoReflect() protoreflect.Message
func (*AddFundsRequest) Reset ¶
func (x *AddFundsRequest) Reset()
func (*AddFundsRequest) String ¶
func (x *AddFundsRequest) String() string
type AddFundsResponse ¶
type AddFundsResponse struct { Total float32 `protobuf:"fixed32,1,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*AddFundsResponse) Descriptor
deprecated
func (*AddFundsResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddFundsResponse.ProtoReflect.Descriptor instead.
func (*AddFundsResponse) GetTotal ¶
func (x *AddFundsResponse) GetTotal() float32
func (*AddFundsResponse) ProtoMessage ¶
func (*AddFundsResponse) ProtoMessage()
func (*AddFundsResponse) ProtoReflect ¶
func (x *AddFundsResponse) ProtoReflect() protoreflect.Message
func (*AddFundsResponse) Reset ¶
func (x *AddFundsResponse) Reset()
func (*AddFundsResponse) String ¶
func (x *AddFundsResponse) String() string
type BalanceRequest ¶
type BalanceRequest struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
Messages
func (*BalanceRequest) Descriptor
deprecated
func (*BalanceRequest) Descriptor() ([]byte, []int)
Deprecated: Use BalanceRequest.ProtoReflect.Descriptor instead.
func (*BalanceRequest) GetUserId ¶
func (x *BalanceRequest) GetUserId() int32
func (*BalanceRequest) ProtoMessage ¶
func (*BalanceRequest) ProtoMessage()
func (*BalanceRequest) ProtoReflect ¶
func (x *BalanceRequest) ProtoReflect() protoreflect.Message
func (*BalanceRequest) Reset ¶
func (x *BalanceRequest) Reset()
func (*BalanceRequest) String ¶
func (x *BalanceRequest) String() string
type BalanceResponse ¶
type BalanceResponse struct { Balance float32 `protobuf:"fixed32,1,opt,name=balance,proto3" json:"balance,omitempty"` // contains filtered or unexported fields }
func (*BalanceResponse) Descriptor
deprecated
func (*BalanceResponse) Descriptor() ([]byte, []int)
Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead.
func (*BalanceResponse) GetBalance ¶
func (x *BalanceResponse) GetBalance() float32
func (*BalanceResponse) ProtoMessage ¶
func (*BalanceResponse) ProtoMessage()
func (*BalanceResponse) ProtoReflect ¶
func (x *BalanceResponse) ProtoReflect() protoreflect.Message
func (*BalanceResponse) Reset ¶
func (x *BalanceResponse) Reset()
func (*BalanceResponse) String ¶
func (x *BalanceResponse) String() string
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"` Channel string `protobuf:"bytes,6,opt,name=channel,proto3" json:"channel,omitempty"` // optional field // contains filtered or unexported fields }
Messages
func (*Event) Descriptor
deprecated
func (*Event) GetAggregateId ¶
func (*Event) GetAggregateType ¶
func (*Event) GetChannel ¶
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 { GetEvents(ctx context.Context, in *EventFilter, opts ...grpc.CallOption) (*EventResponse, error) 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 { GetEvents(context.Context, *EventFilter) (*EventResponse, error) CreateEvent(context.Context, *Event) (*Response, error) }
EventStoreServer is the server API for EventStore service.
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 UnimplementedAccountServiceServer ¶
type UnimplementedAccountServiceServer struct { }
UnimplementedAccountServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedAccountServiceServer) AddFunds ¶
func (*UnimplementedAccountServiceServer) AddFunds(context.Context, *AddFundsRequest) (*AddFundsResponse, error)
func (*UnimplementedAccountServiceServer) GetBalance ¶
func (*UnimplementedAccountServiceServer) GetBalance(context.Context, *BalanceRequest) (*BalanceResponse, error)
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)