Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAdServiceServer(s grpc.ServiceRegistrar, srv AdServiceServer)
- func RegisterCartServiceServer(s grpc.ServiceRegistrar, srv CartServiceServer)
- func RegisterCheckoutServiceServer(s grpc.ServiceRegistrar, srv CheckoutServiceServer)
- func RegisterCurrencyServiceServer(s grpc.ServiceRegistrar, srv CurrencyServiceServer)
- func RegisterEmailServiceServer(s grpc.ServiceRegistrar, srv EmailServiceServer)
- func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer)
- func RegisterProductCatalogServiceServer(s grpc.ServiceRegistrar, srv ProductCatalogServiceServer)
- func RegisterRecommendationServiceServer(s grpc.ServiceRegistrar, srv RecommendationServiceServer)
- func RegisterShippingServiceServer(s grpc.ServiceRegistrar, srv ShippingServiceServer)
- type Ad
- type AdRequest
- type AdResponse
- type AdServiceClient
- type AdServiceServer
- type AddItemRequest
- func (*AddItemRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddItemRequest) GetItem() *CartItem
- func (x *AddItemRequest) GetUserId() string
- func (*AddItemRequest) ProtoMessage()
- func (x *AddItemRequest) ProtoReflect() protoreflect.Message
- func (x *AddItemRequest) Reset()
- func (x *AddItemRequest) String() string
- 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 CacheSizeResponse
- type Cart
- type CartItem
- type CartServiceClient
- type CartServiceServer
- type ChargeRequest
- func (*ChargeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChargeRequest) GetAmount() *Money
- func (x *ChargeRequest) GetCreditCard() *CreditCardInfo
- func (*ChargeRequest) ProtoMessage()
- func (x *ChargeRequest) ProtoReflect() protoreflect.Message
- func (x *ChargeRequest) Reset()
- func (x *ChargeRequest) String() string
- type ChargeResponse
- type CheckoutServiceClient
- type CheckoutServiceServer
- type CreditCardInfo
- func (*CreditCardInfo) Descriptor() ([]byte, []int)deprecated
- func (x *CreditCardInfo) GetCreditCardCvv() int32
- func (x *CreditCardInfo) GetCreditCardExpirationMonth() int32
- func (x *CreditCardInfo) GetCreditCardExpirationYear() int32
- func (x *CreditCardInfo) GetCreditCardNumber() string
- func (*CreditCardInfo) ProtoMessage()
- func (x *CreditCardInfo) ProtoReflect() protoreflect.Message
- func (x *CreditCardInfo) Reset()
- func (x *CreditCardInfo) String() string
- type CurrencyConversionRequest
- func (*CurrencyConversionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CurrencyConversionRequest) GetFrom() *Money
- func (x *CurrencyConversionRequest) GetToCode() string
- func (*CurrencyConversionRequest) ProtoMessage()
- func (x *CurrencyConversionRequest) ProtoReflect() protoreflect.Message
- func (x *CurrencyConversionRequest) Reset()
- func (x *CurrencyConversionRequest) String() string
- type CurrencyServiceClient
- type CurrencyServiceServer
- type EmailServiceClient
- type EmailServiceServer
- type Empty
- type EmptyCartRequest
- type GetCartRequest
- type GetProductRequest
- type GetQuoteRequest
- func (*GetQuoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetQuoteRequest) GetAddress() *Address
- func (x *GetQuoteRequest) GetItems() []*CartItem
- func (*GetQuoteRequest) ProtoMessage()
- func (x *GetQuoteRequest) ProtoReflect() protoreflect.Message
- func (x *GetQuoteRequest) Reset()
- func (x *GetQuoteRequest) String() string
- type GetQuoteResponse
- type GetSupportedCurrenciesResponse
- func (*GetSupportedCurrenciesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetSupportedCurrenciesResponse) GetCurrencyCodes() []string
- func (*GetSupportedCurrenciesResponse) ProtoMessage()
- func (x *GetSupportedCurrenciesResponse) ProtoReflect() protoreflect.Message
- func (x *GetSupportedCurrenciesResponse) Reset()
- func (x *GetSupportedCurrenciesResponse) String() string
- type ListProductsResponse
- func (*ListProductsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListProductsResponse) GetProducts() []*Product
- func (*ListProductsResponse) ProtoMessage()
- func (x *ListProductsResponse) ProtoReflect() protoreflect.Message
- func (x *ListProductsResponse) Reset()
- func (x *ListProductsResponse) String() string
- type ListRecommendationsRequest
- func (*ListRecommendationsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRecommendationsRequest) GetProductIds() []string
- func (x *ListRecommendationsRequest) GetUserId() string
- func (*ListRecommendationsRequest) ProtoMessage()
- func (x *ListRecommendationsRequest) ProtoReflect() protoreflect.Message
- func (x *ListRecommendationsRequest) Reset()
- func (x *ListRecommendationsRequest) String() string
- type ListRecommendationsResponse
- func (*ListRecommendationsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListRecommendationsResponse) GetProductIds() []string
- func (*ListRecommendationsResponse) ProtoMessage()
- func (x *ListRecommendationsResponse) ProtoReflect() protoreflect.Message
- func (x *ListRecommendationsResponse) Reset()
- func (x *ListRecommendationsResponse) String() string
- 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 PaymentServiceClient
- type PaymentServiceServer
- type PlaceOrderRequest
- func (*PlaceOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PlaceOrderRequest) GetAddress() *Address
- func (x *PlaceOrderRequest) GetCreditCard() *CreditCardInfo
- func (x *PlaceOrderRequest) GetEmail() string
- func (x *PlaceOrderRequest) GetUserCurrency() string
- func (x *PlaceOrderRequest) GetUserId() string
- func (*PlaceOrderRequest) ProtoMessage()
- func (x *PlaceOrderRequest) ProtoReflect() protoreflect.Message
- func (x *PlaceOrderRequest) Reset()
- func (x *PlaceOrderRequest) String() string
- type PlaceOrderResponse
- func (*PlaceOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PlaceOrderResponse) GetOrder() *OrderResult
- func (*PlaceOrderResponse) ProtoMessage()
- func (x *PlaceOrderResponse) ProtoReflect() protoreflect.Message
- func (x *PlaceOrderResponse) Reset()
- func (x *PlaceOrderResponse) String() string
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetCategories() []string
- func (x *Product) GetDescription() string
- func (x *Product) GetId() string
- func (x *Product) GetName() string
- func (x *Product) GetPicture() string
- func (x *Product) GetPriceUsd() *Money
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductCatalogServiceClient
- type ProductCatalogServiceServer
- type RecommendationServiceClient
- type RecommendationServiceServer
- type SearchProductsRequest
- func (*SearchProductsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchProductsRequest) GetQuery() string
- func (*SearchProductsRequest) ProtoMessage()
- func (x *SearchProductsRequest) ProtoReflect() protoreflect.Message
- func (x *SearchProductsRequest) Reset()
- func (x *SearchProductsRequest) String() string
- type SearchProductsResponse
- func (*SearchProductsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SearchProductsResponse) GetResults() []*Product
- func (*SearchProductsResponse) ProtoMessage()
- func (x *SearchProductsResponse) ProtoReflect() protoreflect.Message
- func (x *SearchProductsResponse) Reset()
- func (x *SearchProductsResponse) 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 ShipOrderRequest
- func (*ShipOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ShipOrderRequest) GetAddress() *Address
- func (x *ShipOrderRequest) GetItems() []*CartItem
- func (*ShipOrderRequest) ProtoMessage()
- func (x *ShipOrderRequest) ProtoReflect() protoreflect.Message
- func (x *ShipOrderRequest) Reset()
- func (x *ShipOrderRequest) String() string
- type ShipOrderResponse
- func (*ShipOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ShipOrderResponse) GetTrackingId() string
- func (*ShipOrderResponse) ProtoMessage()
- func (x *ShipOrderResponse) ProtoReflect() protoreflect.Message
- func (x *ShipOrderResponse) Reset()
- func (x *ShipOrderResponse) String() string
- type ShippingServiceClient
- type ShippingServiceServer
- type UnimplementedAdServiceServer
- type UnimplementedCartServiceServer
- type UnimplementedCheckoutServiceServer
- type UnimplementedCurrencyServiceServer
- type UnimplementedEmailServiceServer
- type UnimplementedPaymentServiceServer
- type UnimplementedProductCatalogServiceServer
- func (UnimplementedProductCatalogServiceServer) GetProduct(context.Context, *GetProductRequest) (*Product, error)
- func (UnimplementedProductCatalogServiceServer) ListProducts(context.Context, *Empty) (*ListProductsResponse, error)
- func (UnimplementedProductCatalogServiceServer) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error)
- type UnimplementedRecommendationServiceServer
- type UnimplementedShippingServiceServer
- type UnsafeAdServiceServer
- type UnsafeCartServiceServer
- type UnsafeCheckoutServiceServer
- type UnsafeCurrencyServiceServer
- type UnsafeEmailServiceServer
- type UnsafePaymentServiceServer
- type UnsafeProductCatalogServiceServer
- type UnsafeRecommendationServiceServer
- type UnsafeShippingServiceServer
Constants ¶
const ( CartService_AddItem_FullMethodName = "/msdemo.CartService/AddItem" CartService_GetCart_FullMethodName = "/msdemo.CartService/GetCart" CartService_EmptyCart_FullMethodName = "/msdemo.CartService/EmptyCart" )
const ( ProductCatalogService_ListProducts_FullMethodName = "/msdemo.ProductCatalogService/ListProducts" ProductCatalogService_GetProduct_FullMethodName = "/msdemo.ProductCatalogService/GetProduct" ProductCatalogService_SearchProducts_FullMethodName = "/msdemo.ProductCatalogService/SearchProducts" )
const ( ShippingService_GetQuote_FullMethodName = "/msdemo.ShippingService/GetQuote" ShippingService_ShipOrder_FullMethodName = "/msdemo.ShippingService/ShipOrder" )
const ( CurrencyService_GetSupportedCurrencies_FullMethodName = "/msdemo.CurrencyService/GetSupportedCurrencies" CurrencyService_Convert_FullMethodName = "/msdemo.CurrencyService/Convert" )
const ( CheckoutService_PlaceOrder_FullMethodName = "/msdemo.CheckoutService/PlaceOrder" CheckoutService_GetCacheSize_FullMethodName = "/msdemo.CheckoutService/GetCacheSize" )
const (
AdService_GetAds_FullMethodName = "/msdemo.AdService/GetAds"
)
const (
EmailService_SendOrderConfirmation_FullMethodName = "/msdemo.EmailService/SendOrderConfirmation"
)
const (
PaymentService_Charge_FullMethodName = "/msdemo.PaymentService/Charge"
)
const (
RecommendationService_ListRecommendations_FullMethodName = "/msdemo.RecommendationService/ListRecommendations"
)
Variables ¶
var AdService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "msdemo.AdService", HandlerType: (*AdServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAds", Handler: _AdService_GetAds_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", }
AdService_ServiceDesc is the grpc.ServiceDesc for AdService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var CartService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "msdemo.CartService", HandlerType: (*CartServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddItem", Handler: _CartService_AddItem_Handler, }, { MethodName: "GetCart", Handler: _CartService_GetCart_Handler, }, { MethodName: "EmptyCart", Handler: _CartService_EmptyCart_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", }
CartService_ServiceDesc is the grpc.ServiceDesc for CartService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var CheckoutService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "msdemo.CheckoutService", HandlerType: (*CheckoutServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PlaceOrder", Handler: _CheckoutService_PlaceOrder_Handler, }, { MethodName: "GetCacheSize", Handler: _CheckoutService_GetCacheSize_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", }
CheckoutService_ServiceDesc is the grpc.ServiceDesc for CheckoutService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var CurrencyService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "msdemo.CurrencyService", HandlerType: (*CurrencyServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSupportedCurrencies", Handler: _CurrencyService_GetSupportedCurrencies_Handler, }, { MethodName: "Convert", Handler: _CurrencyService_Convert_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", }
CurrencyService_ServiceDesc is the grpc.ServiceDesc for CurrencyService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var EmailService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "msdemo.EmailService", HandlerType: (*EmailServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendOrderConfirmation", Handler: _EmailService_SendOrderConfirmation_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", }
EmailService_ServiceDesc is the grpc.ServiceDesc for EmailService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_demo_proto protoreflect.FileDescriptor
var PaymentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "msdemo.PaymentService", HandlerType: (*PaymentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Charge", Handler: _PaymentService_Charge_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", }
PaymentService_ServiceDesc is the grpc.ServiceDesc for PaymentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ProductCatalogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "msdemo.ProductCatalogService", HandlerType: (*ProductCatalogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListProducts", Handler: _ProductCatalogService_ListProducts_Handler, }, { MethodName: "GetProduct", Handler: _ProductCatalogService_GetProduct_Handler, }, { MethodName: "SearchProducts", Handler: _ProductCatalogService_SearchProducts_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", }
ProductCatalogService_ServiceDesc is the grpc.ServiceDesc for ProductCatalogService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var RecommendationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "msdemo.RecommendationService", HandlerType: (*RecommendationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListRecommendations", Handler: _RecommendationService_ListRecommendations_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", }
RecommendationService_ServiceDesc is the grpc.ServiceDesc for RecommendationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ShippingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "msdemo.ShippingService", HandlerType: (*ShippingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetQuote", Handler: _ShippingService_GetQuote_Handler, }, { MethodName: "ShipOrder", Handler: _ShippingService_ShipOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", }
ShippingService_ServiceDesc is the grpc.ServiceDesc for ShippingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAdServiceServer ¶
func RegisterAdServiceServer(s grpc.ServiceRegistrar, srv AdServiceServer)
func RegisterCartServiceServer ¶
func RegisterCartServiceServer(s grpc.ServiceRegistrar, srv CartServiceServer)
func RegisterCheckoutServiceServer ¶
func RegisterCheckoutServiceServer(s grpc.ServiceRegistrar, srv CheckoutServiceServer)
func RegisterCurrencyServiceServer ¶
func RegisterCurrencyServiceServer(s grpc.ServiceRegistrar, srv CurrencyServiceServer)
func RegisterEmailServiceServer ¶
func RegisterEmailServiceServer(s grpc.ServiceRegistrar, srv EmailServiceServer)
func RegisterPaymentServiceServer ¶
func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer)
func RegisterProductCatalogServiceServer ¶
func RegisterProductCatalogServiceServer(s grpc.ServiceRegistrar, srv ProductCatalogServiceServer)
func RegisterRecommendationServiceServer ¶
func RegisterRecommendationServiceServer(s grpc.ServiceRegistrar, srv RecommendationServiceServer)
func RegisterShippingServiceServer ¶
func RegisterShippingServiceServer(s grpc.ServiceRegistrar, srv ShippingServiceServer)
Types ¶
type Ad ¶
type Ad struct { // url to redirect to when an ad is clicked. RedirectUrl string `protobuf:"bytes,1,opt,name=redirect_url,json=redirectUrl,proto3" json:"redirect_url,omitempty"` // short advertisement text to display. Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*Ad) Descriptor
deprecated
func (*Ad) GetRedirectUrl ¶
func (*Ad) ProtoMessage ¶
func (*Ad) ProtoMessage()
func (*Ad) ProtoReflect ¶
func (x *Ad) ProtoReflect() protoreflect.Message
type AdRequest ¶
type AdRequest struct { // List of important key words from the current page describing the context. ContextKeys []string `protobuf:"bytes,1,rep,name=context_keys,json=contextKeys,proto3" json:"context_keys,omitempty"` // contains filtered or unexported fields }
func (*AdRequest) Descriptor
deprecated
func (*AdRequest) GetContextKeys ¶
func (*AdRequest) ProtoMessage ¶
func (*AdRequest) ProtoMessage()
func (*AdRequest) ProtoReflect ¶
func (x *AdRequest) ProtoReflect() protoreflect.Message
type AdResponse ¶
type AdResponse struct { Ads []*Ad `protobuf:"bytes,1,rep,name=ads,proto3" json:"ads,omitempty"` // contains filtered or unexported fields }
func (*AdResponse) Descriptor
deprecated
func (*AdResponse) Descriptor() ([]byte, []int)
Deprecated: Use AdResponse.ProtoReflect.Descriptor instead.
func (*AdResponse) GetAds ¶
func (x *AdResponse) GetAds() []*Ad
func (*AdResponse) ProtoMessage ¶
func (*AdResponse) ProtoMessage()
func (*AdResponse) ProtoReflect ¶
func (x *AdResponse) ProtoReflect() protoreflect.Message
func (*AdResponse) Reset ¶
func (x *AdResponse) Reset()
func (*AdResponse) String ¶
func (x *AdResponse) String() string
type AdServiceClient ¶
type AdServiceClient interface {
GetAds(ctx context.Context, in *AdRequest, opts ...grpc.CallOption) (*AdResponse, error)
}
AdServiceClient is the client API for AdService 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 NewAdServiceClient ¶
func NewAdServiceClient(cc grpc.ClientConnInterface) AdServiceClient
type AdServiceServer ¶
type AdServiceServer interface {
GetAds(context.Context, *AdRequest) (*AdResponse, error)
}
AdServiceServer is the server API for AdService service. All implementations should embed UnimplementedAdServiceServer for forward compatibility
type AddItemRequest ¶
type AddItemRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Item *CartItem `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*AddItemRequest) Descriptor
deprecated
func (*AddItemRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddItemRequest.ProtoReflect.Descriptor instead.
func (*AddItemRequest) GetItem ¶
func (x *AddItemRequest) GetItem() *CartItem
func (*AddItemRequest) GetUserId ¶
func (x *AddItemRequest) GetUserId() string
func (*AddItemRequest) ProtoMessage ¶
func (*AddItemRequest) ProtoMessage()
func (*AddItemRequest) ProtoReflect ¶
func (x *AddItemRequest) ProtoReflect() protoreflect.Message
func (*AddItemRequest) Reset ¶
func (x *AddItemRequest) Reset()
func (*AddItemRequest) String ¶
func (x *AddItemRequest) String() string
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 CacheSizeResponse ¶
type CacheSizeResponse struct { CacheSize int64 `protobuf:"varint,1,opt,name=cache_size,json=cacheSize,proto3" json:"cache_size,omitempty"` // contains filtered or unexported fields }
func (*CacheSizeResponse) Descriptor
deprecated
func (*CacheSizeResponse) Descriptor() ([]byte, []int)
Deprecated: Use CacheSizeResponse.ProtoReflect.Descriptor instead.
func (*CacheSizeResponse) GetCacheSize ¶
func (x *CacheSizeResponse) GetCacheSize() int64
func (*CacheSizeResponse) ProtoMessage ¶
func (*CacheSizeResponse) ProtoMessage()
func (*CacheSizeResponse) ProtoReflect ¶
func (x *CacheSizeResponse) ProtoReflect() protoreflect.Message
func (*CacheSizeResponse) Reset ¶
func (x *CacheSizeResponse) Reset()
func (*CacheSizeResponse) String ¶
func (x *CacheSizeResponse) String() string
type Cart ¶
type Cart struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Items []*CartItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*Cart) Descriptor
deprecated
func (*Cart) ProtoMessage ¶
func (*Cart) ProtoMessage()
func (*Cart) ProtoReflect ¶
func (x *Cart) 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 CartServiceClient ¶
type CartServiceClient interface { AddItem(ctx context.Context, in *AddItemRequest, opts ...grpc.CallOption) (*Empty, error) GetCart(ctx context.Context, in *GetCartRequest, opts ...grpc.CallOption) (*Cart, error) EmptyCart(ctx context.Context, in *EmptyCartRequest, opts ...grpc.CallOption) (*Empty, error) }
CartServiceClient is the client API for CartService 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 NewCartServiceClient ¶
func NewCartServiceClient(cc grpc.ClientConnInterface) CartServiceClient
type CartServiceServer ¶
type CartServiceServer interface { AddItem(context.Context, *AddItemRequest) (*Empty, error) GetCart(context.Context, *GetCartRequest) (*Cart, error) EmptyCart(context.Context, *EmptyCartRequest) (*Empty, error) }
CartServiceServer is the server API for CartService service. All implementations should embed UnimplementedCartServiceServer for forward compatibility
type ChargeRequest ¶
type ChargeRequest struct { Amount *Money `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` CreditCard *CreditCardInfo `protobuf:"bytes,2,opt,name=credit_card,json=creditCard,proto3" json:"credit_card,omitempty"` // contains filtered or unexported fields }
func (*ChargeRequest) Descriptor
deprecated
func (*ChargeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChargeRequest.ProtoReflect.Descriptor instead.
func (*ChargeRequest) GetAmount ¶
func (x *ChargeRequest) GetAmount() *Money
func (*ChargeRequest) GetCreditCard ¶
func (x *ChargeRequest) GetCreditCard() *CreditCardInfo
func (*ChargeRequest) ProtoMessage ¶
func (*ChargeRequest) ProtoMessage()
func (*ChargeRequest) ProtoReflect ¶
func (x *ChargeRequest) ProtoReflect() protoreflect.Message
func (*ChargeRequest) Reset ¶
func (x *ChargeRequest) Reset()
func (*ChargeRequest) String ¶
func (x *ChargeRequest) String() string
type ChargeResponse ¶
type ChargeResponse struct { TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // contains filtered or unexported fields }
func (*ChargeResponse) Descriptor
deprecated
func (*ChargeResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChargeResponse.ProtoReflect.Descriptor instead.
func (*ChargeResponse) GetTransactionId ¶
func (x *ChargeResponse) GetTransactionId() string
func (*ChargeResponse) ProtoMessage ¶
func (*ChargeResponse) ProtoMessage()
func (*ChargeResponse) ProtoReflect ¶
func (x *ChargeResponse) ProtoReflect() protoreflect.Message
func (*ChargeResponse) Reset ¶
func (x *ChargeResponse) Reset()
func (*ChargeResponse) String ¶
func (x *ChargeResponse) String() string
type CheckoutServiceClient ¶
type CheckoutServiceClient interface { PlaceOrder(ctx context.Context, in *PlaceOrderRequest, opts ...grpc.CallOption) (*PlaceOrderResponse, error) GetCacheSize(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CacheSizeResponse, error) }
CheckoutServiceClient is the client API for CheckoutService 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 NewCheckoutServiceClient ¶
func NewCheckoutServiceClient(cc grpc.ClientConnInterface) CheckoutServiceClient
type CheckoutServiceServer ¶
type CheckoutServiceServer interface { PlaceOrder(context.Context, *PlaceOrderRequest) (*PlaceOrderResponse, error) GetCacheSize(context.Context, *Empty) (*CacheSizeResponse, error) }
CheckoutServiceServer is the server API for CheckoutService service. All implementations should embed UnimplementedCheckoutServiceServer for forward compatibility
type CreditCardInfo ¶
type CreditCardInfo struct { CreditCardNumber string `protobuf:"bytes,1,opt,name=credit_card_number,json=creditCardNumber,proto3" json:"credit_card_number,omitempty"` CreditCardCvv int32 `protobuf:"varint,2,opt,name=credit_card_cvv,json=creditCardCvv,proto3" json:"credit_card_cvv,omitempty"` CreditCardExpirationYear int32 `` /* 138-byte string literal not displayed */ CreditCardExpirationMonth int32 `` /* 141-byte string literal not displayed */ // contains filtered or unexported fields }
func (*CreditCardInfo) Descriptor
deprecated
func (*CreditCardInfo) Descriptor() ([]byte, []int)
Deprecated: Use CreditCardInfo.ProtoReflect.Descriptor instead.
func (*CreditCardInfo) GetCreditCardCvv ¶
func (x *CreditCardInfo) GetCreditCardCvv() int32
func (*CreditCardInfo) GetCreditCardExpirationMonth ¶
func (x *CreditCardInfo) GetCreditCardExpirationMonth() int32
func (*CreditCardInfo) GetCreditCardExpirationYear ¶
func (x *CreditCardInfo) GetCreditCardExpirationYear() int32
func (*CreditCardInfo) GetCreditCardNumber ¶
func (x *CreditCardInfo) GetCreditCardNumber() string
func (*CreditCardInfo) ProtoMessage ¶
func (*CreditCardInfo) ProtoMessage()
func (*CreditCardInfo) ProtoReflect ¶
func (x *CreditCardInfo) ProtoReflect() protoreflect.Message
func (*CreditCardInfo) Reset ¶
func (x *CreditCardInfo) Reset()
func (*CreditCardInfo) String ¶
func (x *CreditCardInfo) String() string
type CurrencyConversionRequest ¶
type CurrencyConversionRequest struct { From *Money `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` // The 3-letter currency code defined in ISO 4217. ToCode string `protobuf:"bytes,2,opt,name=to_code,json=toCode,proto3" json:"to_code,omitempty"` // contains filtered or unexported fields }
func (*CurrencyConversionRequest) Descriptor
deprecated
func (*CurrencyConversionRequest) Descriptor() ([]byte, []int)
Deprecated: Use CurrencyConversionRequest.ProtoReflect.Descriptor instead.
func (*CurrencyConversionRequest) GetFrom ¶
func (x *CurrencyConversionRequest) GetFrom() *Money
func (*CurrencyConversionRequest) GetToCode ¶
func (x *CurrencyConversionRequest) GetToCode() string
func (*CurrencyConversionRequest) ProtoMessage ¶
func (*CurrencyConversionRequest) ProtoMessage()
func (*CurrencyConversionRequest) ProtoReflect ¶
func (x *CurrencyConversionRequest) ProtoReflect() protoreflect.Message
func (*CurrencyConversionRequest) Reset ¶
func (x *CurrencyConversionRequest) Reset()
func (*CurrencyConversionRequest) String ¶
func (x *CurrencyConversionRequest) String() string
type CurrencyServiceClient ¶
type CurrencyServiceClient interface { GetSupportedCurrencies(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetSupportedCurrenciesResponse, error) Convert(ctx context.Context, in *CurrencyConversionRequest, opts ...grpc.CallOption) (*Money, error) }
CurrencyServiceClient is the client API for CurrencyService 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 NewCurrencyServiceClient ¶
func NewCurrencyServiceClient(cc grpc.ClientConnInterface) CurrencyServiceClient
type CurrencyServiceServer ¶
type CurrencyServiceServer interface { GetSupportedCurrencies(context.Context, *Empty) (*GetSupportedCurrenciesResponse, error) Convert(context.Context, *CurrencyConversionRequest) (*Money, error) }
CurrencyServiceServer is the server API for CurrencyService service. All implementations should embed UnimplementedCurrencyServiceServer for forward compatibility
type EmailServiceClient ¶
type EmailServiceClient interface {
SendOrderConfirmation(ctx context.Context, in *SendOrderConfirmationRequest, opts ...grpc.CallOption) (*Empty, error)
}
EmailServiceClient is the client API for EmailService 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 NewEmailServiceClient ¶
func NewEmailServiceClient(cc grpc.ClientConnInterface) EmailServiceClient
type EmailServiceServer ¶
type EmailServiceServer interface {
SendOrderConfirmation(context.Context, *SendOrderConfirmationRequest) (*Empty, error)
}
EmailServiceServer is the server API for EmailService service. All implementations should embed UnimplementedEmailServiceServer for forward compatibility
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 EmptyCartRequest ¶
type EmptyCartRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*EmptyCartRequest) Descriptor
deprecated
func (*EmptyCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use EmptyCartRequest.ProtoReflect.Descriptor instead.
func (*EmptyCartRequest) GetUserId ¶
func (x *EmptyCartRequest) GetUserId() string
func (*EmptyCartRequest) ProtoMessage ¶
func (*EmptyCartRequest) ProtoMessage()
func (*EmptyCartRequest) ProtoReflect ¶
func (x *EmptyCartRequest) ProtoReflect() protoreflect.Message
func (*EmptyCartRequest) Reset ¶
func (x *EmptyCartRequest) Reset()
func (*EmptyCartRequest) String ¶
func (x *EmptyCartRequest) String() string
type GetCartRequest ¶
type GetCartRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*GetCartRequest) Descriptor
deprecated
func (*GetCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCartRequest.ProtoReflect.Descriptor instead.
func (*GetCartRequest) GetUserId ¶
func (x *GetCartRequest) GetUserId() string
func (*GetCartRequest) ProtoMessage ¶
func (*GetCartRequest) ProtoMessage()
func (*GetCartRequest) ProtoReflect ¶
func (x *GetCartRequest) ProtoReflect() protoreflect.Message
func (*GetCartRequest) Reset ¶
func (x *GetCartRequest) Reset()
func (*GetCartRequest) String ¶
func (x *GetCartRequest) String() string
type GetProductRequest ¶
type GetProductRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetProductRequest) Descriptor
deprecated
func (*GetProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetProductRequest.ProtoReflect.Descriptor instead.
func (*GetProductRequest) GetId ¶
func (x *GetProductRequest) GetId() string
func (*GetProductRequest) ProtoMessage ¶
func (*GetProductRequest) ProtoMessage()
func (*GetProductRequest) ProtoReflect ¶
func (x *GetProductRequest) ProtoReflect() protoreflect.Message
func (*GetProductRequest) Reset ¶
func (x *GetProductRequest) Reset()
func (*GetProductRequest) String ¶
func (x *GetProductRequest) String() string
type GetQuoteRequest ¶
type GetQuoteRequest struct { Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Items []*CartItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*GetQuoteRequest) Descriptor
deprecated
func (*GetQuoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetQuoteRequest.ProtoReflect.Descriptor instead.
func (*GetQuoteRequest) GetAddress ¶
func (x *GetQuoteRequest) GetAddress() *Address
func (*GetQuoteRequest) GetItems ¶
func (x *GetQuoteRequest) GetItems() []*CartItem
func (*GetQuoteRequest) ProtoMessage ¶
func (*GetQuoteRequest) ProtoMessage()
func (*GetQuoteRequest) ProtoReflect ¶
func (x *GetQuoteRequest) ProtoReflect() protoreflect.Message
func (*GetQuoteRequest) Reset ¶
func (x *GetQuoteRequest) Reset()
func (*GetQuoteRequest) String ¶
func (x *GetQuoteRequest) String() string
type GetQuoteResponse ¶
type GetQuoteResponse struct { CostUsd *Money `protobuf:"bytes,1,opt,name=cost_usd,json=costUsd,proto3" json:"cost_usd,omitempty"` // contains filtered or unexported fields }
func (*GetQuoteResponse) Descriptor
deprecated
func (*GetQuoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetQuoteResponse.ProtoReflect.Descriptor instead.
func (*GetQuoteResponse) GetCostUsd ¶
func (x *GetQuoteResponse) GetCostUsd() *Money
func (*GetQuoteResponse) ProtoMessage ¶
func (*GetQuoteResponse) ProtoMessage()
func (*GetQuoteResponse) ProtoReflect ¶
func (x *GetQuoteResponse) ProtoReflect() protoreflect.Message
func (*GetQuoteResponse) Reset ¶
func (x *GetQuoteResponse) Reset()
func (*GetQuoteResponse) String ¶
func (x *GetQuoteResponse) String() string
type GetSupportedCurrenciesResponse ¶
type GetSupportedCurrenciesResponse struct { // The 3-letter currency code defined in ISO 4217. CurrencyCodes []string `protobuf:"bytes,1,rep,name=currency_codes,json=currencyCodes,proto3" json:"currency_codes,omitempty"` // contains filtered or unexported fields }
func (*GetSupportedCurrenciesResponse) Descriptor
deprecated
func (*GetSupportedCurrenciesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetSupportedCurrenciesResponse.ProtoReflect.Descriptor instead.
func (*GetSupportedCurrenciesResponse) GetCurrencyCodes ¶
func (x *GetSupportedCurrenciesResponse) GetCurrencyCodes() []string
func (*GetSupportedCurrenciesResponse) ProtoMessage ¶
func (*GetSupportedCurrenciesResponse) ProtoMessage()
func (*GetSupportedCurrenciesResponse) ProtoReflect ¶
func (x *GetSupportedCurrenciesResponse) ProtoReflect() protoreflect.Message
func (*GetSupportedCurrenciesResponse) Reset ¶
func (x *GetSupportedCurrenciesResponse) Reset()
func (*GetSupportedCurrenciesResponse) String ¶
func (x *GetSupportedCurrenciesResponse) String() string
type ListProductsResponse ¶
type ListProductsResponse struct { Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` // contains filtered or unexported fields }
func (*ListProductsResponse) Descriptor
deprecated
func (*ListProductsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListProductsResponse.ProtoReflect.Descriptor instead.
func (*ListProductsResponse) GetProducts ¶
func (x *ListProductsResponse) GetProducts() []*Product
func (*ListProductsResponse) ProtoMessage ¶
func (*ListProductsResponse) ProtoMessage()
func (*ListProductsResponse) ProtoReflect ¶
func (x *ListProductsResponse) ProtoReflect() protoreflect.Message
func (*ListProductsResponse) Reset ¶
func (x *ListProductsResponse) Reset()
func (*ListProductsResponse) String ¶
func (x *ListProductsResponse) String() string
type ListRecommendationsRequest ¶
type ListRecommendationsRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` ProductIds []string `protobuf:"bytes,2,rep,name=product_ids,json=productIds,proto3" json:"product_ids,omitempty"` // contains filtered or unexported fields }
func (*ListRecommendationsRequest) Descriptor
deprecated
func (*ListRecommendationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRecommendationsRequest.ProtoReflect.Descriptor instead.
func (*ListRecommendationsRequest) GetProductIds ¶
func (x *ListRecommendationsRequest) GetProductIds() []string
func (*ListRecommendationsRequest) GetUserId ¶
func (x *ListRecommendationsRequest) GetUserId() string
func (*ListRecommendationsRequest) ProtoMessage ¶
func (*ListRecommendationsRequest) ProtoMessage()
func (*ListRecommendationsRequest) ProtoReflect ¶
func (x *ListRecommendationsRequest) ProtoReflect() protoreflect.Message
func (*ListRecommendationsRequest) Reset ¶
func (x *ListRecommendationsRequest) Reset()
func (*ListRecommendationsRequest) String ¶
func (x *ListRecommendationsRequest) String() string
type ListRecommendationsResponse ¶
type ListRecommendationsResponse struct { ProductIds []string `protobuf:"bytes,1,rep,name=product_ids,json=productIds,proto3" json:"product_ids,omitempty"` // contains filtered or unexported fields }
func (*ListRecommendationsResponse) Descriptor
deprecated
func (*ListRecommendationsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListRecommendationsResponse.ProtoReflect.Descriptor instead.
func (*ListRecommendationsResponse) GetProductIds ¶
func (x *ListRecommendationsResponse) GetProductIds() []string
func (*ListRecommendationsResponse) ProtoMessage ¶
func (*ListRecommendationsResponse) ProtoMessage()
func (*ListRecommendationsResponse) ProtoReflect ¶
func (x *ListRecommendationsResponse) ProtoReflect() protoreflect.Message
func (*ListRecommendationsResponse) Reset ¶
func (x *ListRecommendationsResponse) Reset()
func (*ListRecommendationsResponse) String ¶
func (x *ListRecommendationsResponse) String() string
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 }
Represents an amount of money with its currency type.
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 PaymentServiceClient ¶
type PaymentServiceClient interface {
Charge(ctx context.Context, in *ChargeRequest, opts ...grpc.CallOption) (*ChargeResponse, error)
}
PaymentServiceClient is the client API for PaymentService 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 NewPaymentServiceClient ¶
func NewPaymentServiceClient(cc grpc.ClientConnInterface) PaymentServiceClient
type PaymentServiceServer ¶
type PaymentServiceServer interface {
Charge(context.Context, *ChargeRequest) (*ChargeResponse, error)
}
PaymentServiceServer is the server API for PaymentService service. All implementations should embed UnimplementedPaymentServiceServer for forward compatibility
type PlaceOrderRequest ¶
type PlaceOrderRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` UserCurrency string `protobuf:"bytes,2,opt,name=user_currency,json=userCurrency,proto3" json:"user_currency,omitempty"` Address *Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` CreditCard *CreditCardInfo `protobuf:"bytes,6,opt,name=credit_card,json=creditCard,proto3" json:"credit_card,omitempty"` // contains filtered or unexported fields }
func (*PlaceOrderRequest) Descriptor
deprecated
func (*PlaceOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use PlaceOrderRequest.ProtoReflect.Descriptor instead.
func (*PlaceOrderRequest) GetAddress ¶
func (x *PlaceOrderRequest) GetAddress() *Address
func (*PlaceOrderRequest) GetCreditCard ¶
func (x *PlaceOrderRequest) GetCreditCard() *CreditCardInfo
func (*PlaceOrderRequest) GetEmail ¶
func (x *PlaceOrderRequest) GetEmail() string
func (*PlaceOrderRequest) GetUserCurrency ¶
func (x *PlaceOrderRequest) GetUserCurrency() string
func (*PlaceOrderRequest) GetUserId ¶
func (x *PlaceOrderRequest) GetUserId() string
func (*PlaceOrderRequest) ProtoMessage ¶
func (*PlaceOrderRequest) ProtoMessage()
func (*PlaceOrderRequest) ProtoReflect ¶
func (x *PlaceOrderRequest) ProtoReflect() protoreflect.Message
func (*PlaceOrderRequest) Reset ¶
func (x *PlaceOrderRequest) Reset()
func (*PlaceOrderRequest) String ¶
func (x *PlaceOrderRequest) String() string
type PlaceOrderResponse ¶
type PlaceOrderResponse struct { Order *OrderResult `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` // contains filtered or unexported fields }
func (*PlaceOrderResponse) Descriptor
deprecated
func (*PlaceOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use PlaceOrderResponse.ProtoReflect.Descriptor instead.
func (*PlaceOrderResponse) GetOrder ¶
func (x *PlaceOrderResponse) GetOrder() *OrderResult
func (*PlaceOrderResponse) ProtoMessage ¶
func (*PlaceOrderResponse) ProtoMessage()
func (*PlaceOrderResponse) ProtoReflect ¶
func (x *PlaceOrderResponse) ProtoReflect() protoreflect.Message
func (*PlaceOrderResponse) Reset ¶
func (x *PlaceOrderResponse) Reset()
func (*PlaceOrderResponse) String ¶
func (x *PlaceOrderResponse) String() string
type Product ¶
type Product struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Picture string `protobuf:"bytes,4,opt,name=picture,proto3" json:"picture,omitempty"` PriceUsd *Money `protobuf:"bytes,5,opt,name=price_usd,json=priceUsd,proto3" json:"price_usd,omitempty"` // Categories such as "vintage" or "gardening" that can be used to look up // other related products. Categories []string `protobuf:"bytes,6,rep,name=categories,proto3" json:"categories,omitempty"` // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) GetCategories ¶
func (*Product) GetDescription ¶
func (*Product) GetPicture ¶
func (*Product) GetPriceUsd ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductCatalogServiceClient ¶
type ProductCatalogServiceClient interface { ListProducts(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListProductsResponse, error) GetProduct(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*Product, error) SearchProducts(ctx context.Context, in *SearchProductsRequest, opts ...grpc.CallOption) (*SearchProductsResponse, error) }
ProductCatalogServiceClient is the client API for ProductCatalogService 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 NewProductCatalogServiceClient ¶
func NewProductCatalogServiceClient(cc grpc.ClientConnInterface) ProductCatalogServiceClient
type ProductCatalogServiceServer ¶
type ProductCatalogServiceServer interface { ListProducts(context.Context, *Empty) (*ListProductsResponse, error) GetProduct(context.Context, *GetProductRequest) (*Product, error) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error) }
ProductCatalogServiceServer is the server API for ProductCatalogService service. All implementations should embed UnimplementedProductCatalogServiceServer for forward compatibility
type RecommendationServiceClient ¶
type RecommendationServiceClient interface {
ListRecommendations(ctx context.Context, in *ListRecommendationsRequest, opts ...grpc.CallOption) (*ListRecommendationsResponse, error)
}
RecommendationServiceClient is the client API for RecommendationService 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 NewRecommendationServiceClient ¶
func NewRecommendationServiceClient(cc grpc.ClientConnInterface) RecommendationServiceClient
type RecommendationServiceServer ¶
type RecommendationServiceServer interface {
ListRecommendations(context.Context, *ListRecommendationsRequest) (*ListRecommendationsResponse, error)
}
RecommendationServiceServer is the server API for RecommendationService service. All implementations should embed UnimplementedRecommendationServiceServer for forward compatibility
type SearchProductsRequest ¶
type SearchProductsRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // contains filtered or unexported fields }
func (*SearchProductsRequest) Descriptor
deprecated
func (*SearchProductsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchProductsRequest.ProtoReflect.Descriptor instead.
func (*SearchProductsRequest) GetQuery ¶
func (x *SearchProductsRequest) GetQuery() string
func (*SearchProductsRequest) ProtoMessage ¶
func (*SearchProductsRequest) ProtoMessage()
func (*SearchProductsRequest) ProtoReflect ¶
func (x *SearchProductsRequest) ProtoReflect() protoreflect.Message
func (*SearchProductsRequest) Reset ¶
func (x *SearchProductsRequest) Reset()
func (*SearchProductsRequest) String ¶
func (x *SearchProductsRequest) String() string
type SearchProductsResponse ¶
type SearchProductsResponse struct { Results []*Product `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*SearchProductsResponse) Descriptor
deprecated
func (*SearchProductsResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchProductsResponse.ProtoReflect.Descriptor instead.
func (*SearchProductsResponse) GetResults ¶
func (x *SearchProductsResponse) GetResults() []*Product
func (*SearchProductsResponse) ProtoMessage ¶
func (*SearchProductsResponse) ProtoMessage()
func (*SearchProductsResponse) ProtoReflect ¶
func (x *SearchProductsResponse) ProtoReflect() protoreflect.Message
func (*SearchProductsResponse) Reset ¶
func (x *SearchProductsResponse) Reset()
func (*SearchProductsResponse) String ¶
func (x *SearchProductsResponse) 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 ShipOrderRequest ¶
type ShipOrderRequest struct { Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Items []*CartItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*ShipOrderRequest) Descriptor
deprecated
func (*ShipOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use ShipOrderRequest.ProtoReflect.Descriptor instead.
func (*ShipOrderRequest) GetAddress ¶
func (x *ShipOrderRequest) GetAddress() *Address
func (*ShipOrderRequest) GetItems ¶
func (x *ShipOrderRequest) GetItems() []*CartItem
func (*ShipOrderRequest) ProtoMessage ¶
func (*ShipOrderRequest) ProtoMessage()
func (*ShipOrderRequest) ProtoReflect ¶
func (x *ShipOrderRequest) ProtoReflect() protoreflect.Message
func (*ShipOrderRequest) Reset ¶
func (x *ShipOrderRequest) Reset()
func (*ShipOrderRequest) String ¶
func (x *ShipOrderRequest) String() string
type ShipOrderResponse ¶
type ShipOrderResponse struct { TrackingId string `protobuf:"bytes,1,opt,name=tracking_id,json=trackingId,proto3" json:"tracking_id,omitempty"` // contains filtered or unexported fields }
func (*ShipOrderResponse) Descriptor
deprecated
func (*ShipOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use ShipOrderResponse.ProtoReflect.Descriptor instead.
func (*ShipOrderResponse) GetTrackingId ¶
func (x *ShipOrderResponse) GetTrackingId() string
func (*ShipOrderResponse) ProtoMessage ¶
func (*ShipOrderResponse) ProtoMessage()
func (*ShipOrderResponse) ProtoReflect ¶
func (x *ShipOrderResponse) ProtoReflect() protoreflect.Message
func (*ShipOrderResponse) Reset ¶
func (x *ShipOrderResponse) Reset()
func (*ShipOrderResponse) String ¶
func (x *ShipOrderResponse) String() string
type ShippingServiceClient ¶
type ShippingServiceClient interface { GetQuote(ctx context.Context, in *GetQuoteRequest, opts ...grpc.CallOption) (*GetQuoteResponse, error) ShipOrder(ctx context.Context, in *ShipOrderRequest, opts ...grpc.CallOption) (*ShipOrderResponse, error) }
ShippingServiceClient is the client API for ShippingService 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 NewShippingServiceClient ¶
func NewShippingServiceClient(cc grpc.ClientConnInterface) ShippingServiceClient
type ShippingServiceServer ¶
type ShippingServiceServer interface { GetQuote(context.Context, *GetQuoteRequest) (*GetQuoteResponse, error) ShipOrder(context.Context, *ShipOrderRequest) (*ShipOrderResponse, error) }
ShippingServiceServer is the server API for ShippingService service. All implementations should embed UnimplementedShippingServiceServer for forward compatibility
type UnimplementedAdServiceServer ¶
type UnimplementedAdServiceServer struct { }
UnimplementedAdServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedAdServiceServer) GetAds ¶
func (UnimplementedAdServiceServer) GetAds(context.Context, *AdRequest) (*AdResponse, error)
type UnimplementedCartServiceServer ¶
type UnimplementedCartServiceServer struct { }
UnimplementedCartServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedCartServiceServer) AddItem ¶
func (UnimplementedCartServiceServer) AddItem(context.Context, *AddItemRequest) (*Empty, error)
func (UnimplementedCartServiceServer) EmptyCart ¶
func (UnimplementedCartServiceServer) EmptyCart(context.Context, *EmptyCartRequest) (*Empty, error)
func (UnimplementedCartServiceServer) GetCart ¶
func (UnimplementedCartServiceServer) GetCart(context.Context, *GetCartRequest) (*Cart, error)
type UnimplementedCheckoutServiceServer ¶
type UnimplementedCheckoutServiceServer struct { }
UnimplementedCheckoutServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedCheckoutServiceServer) GetCacheSize ¶
func (UnimplementedCheckoutServiceServer) GetCacheSize(context.Context, *Empty) (*CacheSizeResponse, error)
func (UnimplementedCheckoutServiceServer) PlaceOrder ¶
func (UnimplementedCheckoutServiceServer) PlaceOrder(context.Context, *PlaceOrderRequest) (*PlaceOrderResponse, error)
type UnimplementedCurrencyServiceServer ¶
type UnimplementedCurrencyServiceServer struct { }
UnimplementedCurrencyServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedCurrencyServiceServer) Convert ¶
func (UnimplementedCurrencyServiceServer) Convert(context.Context, *CurrencyConversionRequest) (*Money, error)
func (UnimplementedCurrencyServiceServer) GetSupportedCurrencies ¶
func (UnimplementedCurrencyServiceServer) GetSupportedCurrencies(context.Context, *Empty) (*GetSupportedCurrenciesResponse, error)
type UnimplementedEmailServiceServer ¶
type UnimplementedEmailServiceServer struct { }
UnimplementedEmailServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedEmailServiceServer) SendOrderConfirmation ¶
func (UnimplementedEmailServiceServer) SendOrderConfirmation(context.Context, *SendOrderConfirmationRequest) (*Empty, error)
type UnimplementedPaymentServiceServer ¶
type UnimplementedPaymentServiceServer struct { }
UnimplementedPaymentServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedPaymentServiceServer) Charge ¶
func (UnimplementedPaymentServiceServer) Charge(context.Context, *ChargeRequest) (*ChargeResponse, error)
type UnimplementedProductCatalogServiceServer ¶
type UnimplementedProductCatalogServiceServer struct { }
UnimplementedProductCatalogServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedProductCatalogServiceServer) GetProduct ¶
func (UnimplementedProductCatalogServiceServer) GetProduct(context.Context, *GetProductRequest) (*Product, error)
func (UnimplementedProductCatalogServiceServer) ListProducts ¶
func (UnimplementedProductCatalogServiceServer) ListProducts(context.Context, *Empty) (*ListProductsResponse, error)
func (UnimplementedProductCatalogServiceServer) SearchProducts ¶
func (UnimplementedProductCatalogServiceServer) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error)
type UnimplementedRecommendationServiceServer ¶
type UnimplementedRecommendationServiceServer struct { }
UnimplementedRecommendationServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedRecommendationServiceServer) ListRecommendations ¶
func (UnimplementedRecommendationServiceServer) ListRecommendations(context.Context, *ListRecommendationsRequest) (*ListRecommendationsResponse, error)
type UnimplementedShippingServiceServer ¶
type UnimplementedShippingServiceServer struct { }
UnimplementedShippingServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedShippingServiceServer) GetQuote ¶
func (UnimplementedShippingServiceServer) GetQuote(context.Context, *GetQuoteRequest) (*GetQuoteResponse, error)
func (UnimplementedShippingServiceServer) ShipOrder ¶
func (UnimplementedShippingServiceServer) ShipOrder(context.Context, *ShipOrderRequest) (*ShipOrderResponse, error)
type UnsafeAdServiceServer ¶
type UnsafeAdServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAdServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdServiceServer will result in compilation errors.
type UnsafeCartServiceServer ¶
type UnsafeCartServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCartServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CartServiceServer will result in compilation errors.
type UnsafeCheckoutServiceServer ¶
type UnsafeCheckoutServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCheckoutServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CheckoutServiceServer will result in compilation errors.
type UnsafeCurrencyServiceServer ¶
type UnsafeCurrencyServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCurrencyServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CurrencyServiceServer will result in compilation errors.
type UnsafeEmailServiceServer ¶
type UnsafeEmailServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEmailServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EmailServiceServer will result in compilation errors.
type UnsafePaymentServiceServer ¶
type UnsafePaymentServiceServer interface {
// contains filtered or unexported methods
}
UnsafePaymentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PaymentServiceServer will result in compilation errors.
type UnsafeProductCatalogServiceServer ¶
type UnsafeProductCatalogServiceServer interface {
// contains filtered or unexported methods
}
UnsafeProductCatalogServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProductCatalogServiceServer will result in compilation errors.
type UnsafeRecommendationServiceServer ¶
type UnsafeRecommendationServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRecommendationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RecommendationServiceServer will result in compilation errors.
type UnsafeShippingServiceServer ¶
type UnsafeShippingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeShippingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShippingServiceServer will result in compilation errors.