Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorConnectionLost(format string, args ...interface{}) *errors.Error
- func ErrorUnknownError(format string, args ...interface{}) *errors.Error
- func IsConnectionLost(err error) bool
- func IsUnknownError(err error) bool
- func RegisterEmailHTTPServer(s *http.Server, srv EmailHTTPServer)
- func RegisterEmailServer(s grpc.ServiceRegistrar, srv EmailServer)
- type Address
- func (*Address) Descriptor() ([]byte, []int)deprecated
- func (x *Address) GetCity() string
- func (x *Address) GetCountry() string
- func (x *Address) GetState() string
- func (x *Address) GetStreetAddress() string
- func (x *Address) GetZipCode() int32
- func (*Address) ProtoMessage()
- func (x *Address) ProtoReflect() protoreflect.Message
- func (x *Address) Reset()
- func (x *Address) String() string
- type CartItem
- type EmailClient
- type EmailHTTPClient
- type EmailHTTPClientImpl
- type EmailHTTPServer
- type EmailServer
- type EmailServiceErrorReason
- func (EmailServiceErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x EmailServiceErrorReason) Enum() *EmailServiceErrorReason
- func (EmailServiceErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x EmailServiceErrorReason) Number() protoreflect.EnumNumber
- func (x EmailServiceErrorReason) String() string
- func (EmailServiceErrorReason) Type() protoreflect.EnumType
- type Empty
- type Money
- type OrderItem
- type OrderResult
- func (*OrderResult) Descriptor() ([]byte, []int)deprecated
- func (x *OrderResult) GetItems() []*OrderItem
- func (x *OrderResult) GetOrderId() string
- func (x *OrderResult) GetShippingAddress() *Address
- func (x *OrderResult) GetShippingCost() *Money
- func (x *OrderResult) GetShippingTrackingId() string
- func (*OrderResult) ProtoMessage()
- func (x *OrderResult) ProtoReflect() protoreflect.Message
- func (x *OrderResult) Reset()
- func (x *OrderResult) String() string
- type SendOrderConfirmationRequest
- func (*SendOrderConfirmationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendOrderConfirmationRequest) GetEmail() string
- func (x *SendOrderConfirmationRequest) GetOrder() *OrderResult
- func (*SendOrderConfirmationRequest) ProtoMessage()
- func (x *SendOrderConfirmationRequest) ProtoReflect() protoreflect.Message
- func (x *SendOrderConfirmationRequest) Reset()
- func (x *SendOrderConfirmationRequest) String() string
- type UnimplementedEmailServer
- type UnsafeEmailServer
Constants ¶
const (
Email_SendOrderConfirmation_FullMethodName = "/email.service.Email/SendOrderConfirmation"
)
const OperationEmailSendOrderConfirmation = "/email.service.Email/SendOrderConfirmation"
Variables ¶
var ( EmailServiceErrorReason_name = map[int32]string{ 0: "UNKNOWN_ERROR", 1: "CONNECTION_LOST", } EmailServiceErrorReason_value = map[string]int32{ "UNKNOWN_ERROR": 0, "CONNECTION_LOST": 1, } )
Enum value maps for EmailServiceErrorReason.
var Email_ServiceDesc = grpc.ServiceDesc{ ServiceName: "email.service.Email", HandlerType: (*EmailServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendOrderConfirmation", Handler: _Email_SendOrderConfirmation_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "email/email.proto", }
Email_ServiceDesc is the grpc.ServiceDesc for Email service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_email_email_error_proto protoreflect.FileDescriptor
var File_email_email_proto protoreflect.FileDescriptor
Functions ¶
func ErrorConnectionLost ¶
func ErrorUnknownError ¶
func IsConnectionLost ¶
func IsUnknownError ¶
func RegisterEmailHTTPServer ¶
func RegisterEmailHTTPServer(s *http.Server, srv EmailHTTPServer)
func RegisterEmailServer ¶
func RegisterEmailServer(s grpc.ServiceRegistrar, srv EmailServer)
Types ¶
type Address ¶
type Address struct { StreetAddress string `protobuf:"bytes,1,opt,name=street_address,json=streetAddress,proto3" json:"street_address,omitempty"` City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` ZipCode int32 `protobuf:"varint,5,opt,name=zip_code,json=zipCode,proto3" json:"zip_code,omitempty"` // contains filtered or unexported fields }
func (*Address) Descriptor
deprecated
func (*Address) GetCountry ¶
func (*Address) GetStreetAddress ¶
func (*Address) GetZipCode ¶
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) ProtoReflect ¶
func (x *Address) ProtoReflect() protoreflect.Message
type CartItem ¶
type CartItem struct { ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Quantity int32 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*CartItem) Descriptor
deprecated
func (*CartItem) GetProductId ¶
func (*CartItem) GetQuantity ¶
func (*CartItem) ProtoMessage ¶
func (*CartItem) ProtoMessage()
func (*CartItem) ProtoReflect ¶
func (x *CartItem) ProtoReflect() protoreflect.Message
type EmailClient ¶
type EmailClient interface {
SendOrderConfirmation(ctx context.Context, in *SendOrderConfirmationRequest, opts ...grpc.CallOption) (*Empty, error)
}
EmailClient is the client API for Email service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEmailClient ¶
func NewEmailClient(cc grpc.ClientConnInterface) EmailClient
type EmailHTTPClient ¶
type EmailHTTPClient interface {
SendOrderConfirmation(ctx context.Context, req *SendOrderConfirmationRequest, opts ...http.CallOption) (rsp *Empty, err error)
}
func NewEmailHTTPClient ¶
func NewEmailHTTPClient(client *http.Client) EmailHTTPClient
type EmailHTTPClientImpl ¶
type EmailHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*EmailHTTPClientImpl) SendOrderConfirmation ¶
func (c *EmailHTTPClientImpl) SendOrderConfirmation(ctx context.Context, in *SendOrderConfirmationRequest, opts ...http.CallOption) (*Empty, error)
type EmailHTTPServer ¶
type EmailHTTPServer interface {
SendOrderConfirmation(context.Context, *SendOrderConfirmationRequest) (*Empty, error)
}
type EmailServer ¶
type EmailServer interface { SendOrderConfirmation(context.Context, *SendOrderConfirmationRequest) (*Empty, error) // contains filtered or unexported methods }
EmailServer is the server API for Email service. All implementations must embed UnimplementedEmailServer for forward compatibility
type EmailServiceErrorReason ¶
type EmailServiceErrorReason int32
const ( EmailServiceErrorReason_UNKNOWN_ERROR EmailServiceErrorReason = 0 EmailServiceErrorReason_CONNECTION_LOST EmailServiceErrorReason = 1 )
func (EmailServiceErrorReason) Descriptor ¶
func (EmailServiceErrorReason) Descriptor() protoreflect.EnumDescriptor
func (EmailServiceErrorReason) Enum ¶
func (x EmailServiceErrorReason) Enum() *EmailServiceErrorReason
func (EmailServiceErrorReason) EnumDescriptor
deprecated
func (EmailServiceErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use EmailServiceErrorReason.Descriptor instead.
func (EmailServiceErrorReason) Number ¶
func (x EmailServiceErrorReason) Number() protoreflect.EnumNumber
func (EmailServiceErrorReason) String ¶
func (x EmailServiceErrorReason) String() string
func (EmailServiceErrorReason) Type ¶
func (EmailServiceErrorReason) Type() protoreflect.EnumType
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Money ¶
type Money struct { // The 3-letter currency code defined in ISO 4217. CurrencyCode string `protobuf:"bytes,1,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"` // The whole units of the amount. // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. Units int64 `protobuf:"varint,2,opt,name=units,proto3" json:"units,omitempty"` // Number of nano (10^-9) units of the amount. // The value must be between -999,999,999 and +999,999,999 inclusive. // If `units` is positive, `nanos` must be positive or zero. // If `units` is zero, `nanos` can be positive, zero, or negative. // If `units` is negative, `nanos` must be negative or zero. // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. Nanos int32 `protobuf:"varint,3,opt,name=nanos,proto3" json:"nanos,omitempty"` // contains filtered or unexported fields }
func (*Money) Descriptor
deprecated
func (*Money) GetCurrencyCode ¶
func (*Money) ProtoMessage ¶
func (*Money) ProtoMessage()
func (*Money) ProtoReflect ¶
func (x *Money) ProtoReflect() protoreflect.Message
type OrderItem ¶
type OrderItem struct { Item *CartItem `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` Cost *Money `protobuf:"bytes,2,opt,name=cost,proto3" json:"cost,omitempty"` // contains filtered or unexported fields }
func (*OrderItem) Descriptor
deprecated
func (*OrderItem) ProtoMessage ¶
func (*OrderItem) ProtoMessage()
func (*OrderItem) ProtoReflect ¶
func (x *OrderItem) ProtoReflect() protoreflect.Message
type OrderResult ¶
type OrderResult struct { OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` ShippingTrackingId string `protobuf:"bytes,2,opt,name=shipping_tracking_id,json=shippingTrackingId,proto3" json:"shipping_tracking_id,omitempty"` ShippingCost *Money `protobuf:"bytes,3,opt,name=shipping_cost,json=shippingCost,proto3" json:"shipping_cost,omitempty"` ShippingAddress *Address `protobuf:"bytes,4,opt,name=shipping_address,json=shippingAddress,proto3" json:"shipping_address,omitempty"` Items []*OrderItem `protobuf:"bytes,5,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*OrderResult) Descriptor
deprecated
func (*OrderResult) Descriptor() ([]byte, []int)
Deprecated: Use OrderResult.ProtoReflect.Descriptor instead.
func (*OrderResult) GetItems ¶
func (x *OrderResult) GetItems() []*OrderItem
func (*OrderResult) GetOrderId ¶
func (x *OrderResult) GetOrderId() string
func (*OrderResult) GetShippingAddress ¶
func (x *OrderResult) GetShippingAddress() *Address
func (*OrderResult) GetShippingCost ¶
func (x *OrderResult) GetShippingCost() *Money
func (*OrderResult) GetShippingTrackingId ¶
func (x *OrderResult) GetShippingTrackingId() string
func (*OrderResult) ProtoMessage ¶
func (*OrderResult) ProtoMessage()
func (*OrderResult) ProtoReflect ¶
func (x *OrderResult) ProtoReflect() protoreflect.Message
func (*OrderResult) Reset ¶
func (x *OrderResult) Reset()
func (*OrderResult) String ¶
func (x *OrderResult) String() string
type SendOrderConfirmationRequest ¶
type SendOrderConfirmationRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Order *OrderResult `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"` // contains filtered or unexported fields }
func (*SendOrderConfirmationRequest) Descriptor
deprecated
func (*SendOrderConfirmationRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendOrderConfirmationRequest.ProtoReflect.Descriptor instead.
func (*SendOrderConfirmationRequest) GetEmail ¶
func (x *SendOrderConfirmationRequest) GetEmail() string
func (*SendOrderConfirmationRequest) GetOrder ¶
func (x *SendOrderConfirmationRequest) GetOrder() *OrderResult
func (*SendOrderConfirmationRequest) ProtoMessage ¶
func (*SendOrderConfirmationRequest) ProtoMessage()
func (*SendOrderConfirmationRequest) ProtoReflect ¶
func (x *SendOrderConfirmationRequest) ProtoReflect() protoreflect.Message
func (*SendOrderConfirmationRequest) Reset ¶
func (x *SendOrderConfirmationRequest) Reset()
func (*SendOrderConfirmationRequest) String ¶
func (x *SendOrderConfirmationRequest) String() string
type UnimplementedEmailServer ¶
type UnimplementedEmailServer struct { }
UnimplementedEmailServer must be embedded to have forward compatible implementations.
func (UnimplementedEmailServer) SendOrderConfirmation ¶
func (UnimplementedEmailServer) SendOrderConfirmation(context.Context, *SendOrderConfirmationRequest) (*Empty, error)
type UnsafeEmailServer ¶
type UnsafeEmailServer interface {
// contains filtered or unexported methods
}
UnsafeEmailServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EmailServer will result in compilation errors.