Initial commit for Ads Service. (#21)

* Initial commit for Ads Service.

* update comments for AdsService and AdsServiceClient

* Refactor Ads to Ad
Move building AdService to Docker
Use default setting for Stackdriver Exporter.
Add license text.

* Revert the projectId

- also remove commented code from frontend/rpc.go

* Add adservie to skaffold.yaml

* Remove skaffold-adservice.yaml

* Replace personal projectId with demo projectId.

* Fix the crash in adservice when ran in locally.

* Ignore .skaffold*yaml file and .kubernetes-manifests-*/ dir for easy ProjectID switch.

* Fixed review comments.
1. Changed Ad redirect urls to products.
2. Removed leftovers from Dockerfile/kub*manifests*yaml
3. Added retry for StackDriver.
4. Added log for Ad request.
5. Added comment for gradle caching.
6. Added README.md to src/adservice.

* Added GRPC Health service to Ad Service
Also added
1. timeout to getAd RPC call in frontend.
2. Async thread for stackdriver init.
This commit is contained in:
rghetia 2018-08-22 20:02:46 -04:00 committed by Ahmet Alp Balkan
parent 1d266bfdcf
commit f35fdbcac3
19 changed files with 1455 additions and 270 deletions

View file

@ -24,8 +24,8 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type CartItem struct {
ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId" json:"product_id,omitempty"`
Quantity int32 `protobuf:"varint,2,opt,name=quantity" json:"quantity,omitempty"`
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -35,7 +35,7 @@ func (m *CartItem) Reset() { *m = CartItem{} }
func (m *CartItem) String() string { return proto.CompactTextString(m) }
func (*CartItem) ProtoMessage() {}
func (*CartItem) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{0}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{0}
}
func (m *CartItem) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CartItem.Unmarshal(m, b)
@ -70,8 +70,8 @@ func (m *CartItem) GetQuantity() int32 {
}
type AddItemRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
Item *CartItem `protobuf:"bytes,2,opt,name=item" json:"item,omitempty"`
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -81,7 +81,7 @@ func (m *AddItemRequest) Reset() { *m = AddItemRequest{} }
func (m *AddItemRequest) String() string { return proto.CompactTextString(m) }
func (*AddItemRequest) ProtoMessage() {}
func (*AddItemRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{1}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{1}
}
func (m *AddItemRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddItemRequest.Unmarshal(m, b)
@ -116,7 +116,7 @@ func (m *AddItemRequest) GetItem() *CartItem {
}
type EmptyCartRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -126,7 +126,7 @@ func (m *EmptyCartRequest) Reset() { *m = EmptyCartRequest{} }
func (m *EmptyCartRequest) String() string { return proto.CompactTextString(m) }
func (*EmptyCartRequest) ProtoMessage() {}
func (*EmptyCartRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{2}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{2}
}
func (m *EmptyCartRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EmptyCartRequest.Unmarshal(m, b)
@ -154,7 +154,7 @@ func (m *EmptyCartRequest) GetUserId() string {
}
type GetCartRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -164,7 +164,7 @@ func (m *GetCartRequest) Reset() { *m = GetCartRequest{} }
func (m *GetCartRequest) String() string { return proto.CompactTextString(m) }
func (*GetCartRequest) ProtoMessage() {}
func (*GetCartRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{3}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{3}
}
func (m *GetCartRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCartRequest.Unmarshal(m, b)
@ -192,8 +192,8 @@ func (m *GetCartRequest) GetUserId() string {
}
type Cart struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
Items []*CartItem `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"`
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -203,7 +203,7 @@ func (m *Cart) Reset() { *m = Cart{} }
func (m *Cart) String() string { return proto.CompactTextString(m) }
func (*Cart) ProtoMessage() {}
func (*Cart) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{4}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{4}
}
func (m *Cart) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Cart.Unmarshal(m, b)
@ -247,7 +247,7 @@ func (m *Empty) Reset() { *m = Empty{} }
func (m *Empty) String() string { return proto.CompactTextString(m) }
func (*Empty) ProtoMessage() {}
func (*Empty) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{5}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{5}
}
func (m *Empty) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Empty.Unmarshal(m, b)
@ -268,8 +268,8 @@ func (m *Empty) XXX_DiscardUnknown() {
var xxx_messageInfo_Empty proto.InternalMessageInfo
type ListRecommendationsRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
ProductIds []string `protobuf:"bytes,2,rep,name=product_ids,json=productIds" json:"product_ids,omitempty"`
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -279,7 +279,7 @@ func (m *ListRecommendationsRequest) Reset() { *m = ListRecommendationsR
func (m *ListRecommendationsRequest) String() string { return proto.CompactTextString(m) }
func (*ListRecommendationsRequest) ProtoMessage() {}
func (*ListRecommendationsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{6}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{6}
}
func (m *ListRecommendationsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListRecommendationsRequest.Unmarshal(m, b)
@ -314,7 +314,7 @@ func (m *ListRecommendationsRequest) GetProductIds() []string {
}
type ListRecommendationsResponse struct {
ProductIds []string `protobuf:"bytes,1,rep,name=product_ids,json=productIds" json:"product_ids,omitempty"`
ProductIds []string `protobuf:"bytes,1,rep,name=product_ids,json=productIds,proto3" json:"product_ids,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -324,7 +324,7 @@ func (m *ListRecommendationsResponse) Reset() { *m = ListRecommendations
func (m *ListRecommendationsResponse) String() string { return proto.CompactTextString(m) }
func (*ListRecommendationsResponse) ProtoMessage() {}
func (*ListRecommendationsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{7}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{7}
}
func (m *ListRecommendationsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListRecommendationsResponse.Unmarshal(m, b)
@ -352,11 +352,11 @@ func (m *ListRecommendationsResponse) GetProductIds() []string {
}
type Product struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
Picture string `protobuf:"bytes,4,opt,name=picture" json:"picture,omitempty"`
PriceUsd *Money `protobuf:"bytes,5,opt,name=price_usd,json=priceUsd" json:"price_usd,omitempty"`
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -366,7 +366,7 @@ func (m *Product) Reset() { *m = Product{} }
func (m *Product) String() string { return proto.CompactTextString(m) }
func (*Product) ProtoMessage() {}
func (*Product) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{8}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{8}
}
func (m *Product) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Product.Unmarshal(m, b)
@ -422,7 +422,7 @@ func (m *Product) GetPriceUsd() *Money {
}
type ListProductsResponse struct {
Products []*Product `protobuf:"bytes,1,rep,name=products" json:"products,omitempty"`
Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -432,7 +432,7 @@ func (m *ListProductsResponse) Reset() { *m = ListProductsResponse{} }
func (m *ListProductsResponse) String() string { return proto.CompactTextString(m) }
func (*ListProductsResponse) ProtoMessage() {}
func (*ListProductsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{9}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{9}
}
func (m *ListProductsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListProductsResponse.Unmarshal(m, b)
@ -460,7 +460,7 @@ func (m *ListProductsResponse) GetProducts() []*Product {
}
type GetProductRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -470,7 +470,7 @@ func (m *GetProductRequest) Reset() { *m = GetProductRequest{} }
func (m *GetProductRequest) String() string { return proto.CompactTextString(m) }
func (*GetProductRequest) ProtoMessage() {}
func (*GetProductRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{10}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{10}
}
func (m *GetProductRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetProductRequest.Unmarshal(m, b)
@ -498,7 +498,7 @@ func (m *GetProductRequest) GetId() string {
}
type SearchProductsRequest struct {
Query string `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"`
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -508,7 +508,7 @@ func (m *SearchProductsRequest) Reset() { *m = SearchProductsRequest{} }
func (m *SearchProductsRequest) String() string { return proto.CompactTextString(m) }
func (*SearchProductsRequest) ProtoMessage() {}
func (*SearchProductsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{11}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{11}
}
func (m *SearchProductsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SearchProductsRequest.Unmarshal(m, b)
@ -536,7 +536,7 @@ func (m *SearchProductsRequest) GetQuery() string {
}
type SearchProductsResponse struct {
Results []*Product `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
Results []*Product `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -546,7 +546,7 @@ func (m *SearchProductsResponse) Reset() { *m = SearchProductsResponse{}
func (m *SearchProductsResponse) String() string { return proto.CompactTextString(m) }
func (*SearchProductsResponse) ProtoMessage() {}
func (*SearchProductsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{12}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{12}
}
func (m *SearchProductsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SearchProductsResponse.Unmarshal(m, b)
@ -574,8 +574,8 @@ func (m *SearchProductsResponse) GetResults() []*Product {
}
type GetQuoteRequest struct {
Address *Address `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
Items []*CartItem `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"`
Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Items []*CartItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -585,7 +585,7 @@ func (m *GetQuoteRequest) Reset() { *m = GetQuoteRequest{} }
func (m *GetQuoteRequest) String() string { return proto.CompactTextString(m) }
func (*GetQuoteRequest) ProtoMessage() {}
func (*GetQuoteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{13}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{13}
}
func (m *GetQuoteRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetQuoteRequest.Unmarshal(m, b)
@ -620,7 +620,7 @@ func (m *GetQuoteRequest) GetItems() []*CartItem {
}
type GetQuoteResponse struct {
CostUsd *Money `protobuf:"bytes,1,opt,name=cost_usd,json=costUsd" json:"cost_usd,omitempty"`
CostUsd *Money `protobuf:"bytes,1,opt,name=cost_usd,json=costUsd,proto3" json:"cost_usd,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -630,7 +630,7 @@ func (m *GetQuoteResponse) Reset() { *m = GetQuoteResponse{} }
func (m *GetQuoteResponse) String() string { return proto.CompactTextString(m) }
func (*GetQuoteResponse) ProtoMessage() {}
func (*GetQuoteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{14}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{14}
}
func (m *GetQuoteResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetQuoteResponse.Unmarshal(m, b)
@ -658,8 +658,8 @@ func (m *GetQuoteResponse) GetCostUsd() *Money {
}
type ShipOrderRequest struct {
Address *Address `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
Items []*CartItem `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"`
Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Items []*CartItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -669,7 +669,7 @@ func (m *ShipOrderRequest) Reset() { *m = ShipOrderRequest{} }
func (m *ShipOrderRequest) String() string { return proto.CompactTextString(m) }
func (*ShipOrderRequest) ProtoMessage() {}
func (*ShipOrderRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{15}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{15}
}
func (m *ShipOrderRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ShipOrderRequest.Unmarshal(m, b)
@ -704,7 +704,7 @@ func (m *ShipOrderRequest) GetItems() []*CartItem {
}
type ShipOrderResponse struct {
TrackingId string `protobuf:"bytes,1,opt,name=tracking_id,json=trackingId" json:"tracking_id,omitempty"`
TrackingId string `protobuf:"bytes,1,opt,name=tracking_id,json=trackingId,proto3" json:"tracking_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -714,7 +714,7 @@ func (m *ShipOrderResponse) Reset() { *m = ShipOrderResponse{} }
func (m *ShipOrderResponse) String() string { return proto.CompactTextString(m) }
func (*ShipOrderResponse) ProtoMessage() {}
func (*ShipOrderResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{16}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{16}
}
func (m *ShipOrderResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ShipOrderResponse.Unmarshal(m, b)
@ -742,11 +742,11 @@ func (m *ShipOrderResponse) GetTrackingId() string {
}
type Address struct {
StreetAddress string `protobuf:"bytes,1,opt,name=street_address,json=streetAddress" json:"street_address,omitempty"`
City string `protobuf:"bytes,2,opt,name=city" json:"city,omitempty"`
State string `protobuf:"bytes,3,opt,name=state" json:"state,omitempty"`
Country string `protobuf:"bytes,4,opt,name=country" json:"country,omitempty"`
ZipCode int32 `protobuf:"varint,5,opt,name=zip_code,json=zipCode" json:"zip_code,omitempty"`
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -756,7 +756,7 @@ func (m *Address) Reset() { *m = Address{} }
func (m *Address) String() string { return proto.CompactTextString(m) }
func (*Address) ProtoMessage() {}
func (*Address) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{17}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{17}
}
func (m *Address) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Address.Unmarshal(m, b)
@ -814,17 +814,17 @@ func (m *Address) GetZipCode() int32 {
// Represents an amount of money with its currency type.
type Money struct {
// The 3-letter currency code defined in ISO 4217.
CurrencyCode string `protobuf:"bytes,1,opt,name=currency_code,json=currencyCode" json:"currency_code,omitempty"`
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" json:"units,omitempty"`
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" json:"nanos,omitempty"`
Nanos int32 `protobuf:"varint,3,opt,name=nanos,proto3" json:"nanos,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -834,7 +834,7 @@ func (m *Money) Reset() { *m = Money{} }
func (m *Money) String() string { return proto.CompactTextString(m) }
func (*Money) ProtoMessage() {}
func (*Money) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{18}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{18}
}
func (m *Money) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Money.Unmarshal(m, b)
@ -877,7 +877,7 @@ func (m *Money) GetNanos() int32 {
type GetSupportedCurrenciesResponse struct {
// The 3-letter currency code defined in ISO 4217.
CurrencyCodes []string `protobuf:"bytes,1,rep,name=currency_codes,json=currencyCodes" json:"currency_codes,omitempty"`
CurrencyCodes []string `protobuf:"bytes,1,rep,name=currency_codes,json=currencyCodes,proto3" json:"currency_codes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -887,7 +887,7 @@ func (m *GetSupportedCurrenciesResponse) Reset() { *m = GetSupportedCurr
func (m *GetSupportedCurrenciesResponse) String() string { return proto.CompactTextString(m) }
func (*GetSupportedCurrenciesResponse) ProtoMessage() {}
func (*GetSupportedCurrenciesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{19}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{19}
}
func (m *GetSupportedCurrenciesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSupportedCurrenciesResponse.Unmarshal(m, b)
@ -915,9 +915,9 @@ func (m *GetSupportedCurrenciesResponse) GetCurrencyCodes() []string {
}
type CurrencyConversionRequest struct {
From *Money `protobuf:"bytes,1,opt,name=from" json:"from,omitempty"`
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" json:"to_code,omitempty"`
ToCode string `protobuf:"bytes,2,opt,name=to_code,json=toCode,proto3" json:"to_code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -927,7 +927,7 @@ func (m *CurrencyConversionRequest) Reset() { *m = CurrencyConversionReq
func (m *CurrencyConversionRequest) String() string { return proto.CompactTextString(m) }
func (*CurrencyConversionRequest) ProtoMessage() {}
func (*CurrencyConversionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{20}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{20}
}
func (m *CurrencyConversionRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CurrencyConversionRequest.Unmarshal(m, b)
@ -962,10 +962,10 @@ func (m *CurrencyConversionRequest) GetToCode() string {
}
type CreditCardInfo struct {
CreditCardNumber string `protobuf:"bytes,1,opt,name=credit_card_number,json=creditCardNumber" json:"credit_card_number,omitempty"`
CreditCardCvv int32 `protobuf:"varint,2,opt,name=credit_card_cvv,json=creditCardCvv" json:"credit_card_cvv,omitempty"`
CreditCardExpirationYear int32 `protobuf:"varint,3,opt,name=credit_card_expiration_year,json=creditCardExpirationYear" json:"credit_card_expiration_year,omitempty"`
CreditCardExpirationMonth int32 `protobuf:"varint,4,opt,name=credit_card_expiration_month,json=creditCardExpirationMonth" json:"credit_card_expiration_month,omitempty"`
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 `protobuf:"varint,3,opt,name=credit_card_expiration_year,json=creditCardExpirationYear,proto3" json:"credit_card_expiration_year,omitempty"`
CreditCardExpirationMonth int32 `protobuf:"varint,4,opt,name=credit_card_expiration_month,json=creditCardExpirationMonth,proto3" json:"credit_card_expiration_month,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -975,7 +975,7 @@ func (m *CreditCardInfo) Reset() { *m = CreditCardInfo{} }
func (m *CreditCardInfo) String() string { return proto.CompactTextString(m) }
func (*CreditCardInfo) ProtoMessage() {}
func (*CreditCardInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{21}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{21}
}
func (m *CreditCardInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreditCardInfo.Unmarshal(m, b)
@ -1024,8 +1024,8 @@ func (m *CreditCardInfo) GetCreditCardExpirationMonth() int32 {
}
type ChargeRequest struct {
Amount *Money `protobuf:"bytes,1,opt,name=amount" json:"amount,omitempty"`
CreditCard *CreditCardInfo `protobuf:"bytes,2,opt,name=credit_card,json=creditCard" json:"credit_card,omitempty"`
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1035,7 +1035,7 @@ func (m *ChargeRequest) Reset() { *m = ChargeRequest{} }
func (m *ChargeRequest) String() string { return proto.CompactTextString(m) }
func (*ChargeRequest) ProtoMessage() {}
func (*ChargeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{22}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{22}
}
func (m *ChargeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChargeRequest.Unmarshal(m, b)
@ -1070,7 +1070,7 @@ func (m *ChargeRequest) GetCreditCard() *CreditCardInfo {
}
type ChargeResponse struct {
TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId" json:"transaction_id,omitempty"`
TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1080,7 +1080,7 @@ func (m *ChargeResponse) Reset() { *m = ChargeResponse{} }
func (m *ChargeResponse) String() string { return proto.CompactTextString(m) }
func (*ChargeResponse) ProtoMessage() {}
func (*ChargeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{23}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{23}
}
func (m *ChargeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChargeResponse.Unmarshal(m, b)
@ -1108,8 +1108,8 @@ func (m *ChargeResponse) GetTransactionId() string {
}
type OrderItem struct {
Item *CartItem `protobuf:"bytes,1,opt,name=item" json:"item,omitempty"`
Cost *Money `protobuf:"bytes,2,opt,name=cost" json:"cost,omitempty"`
Item *CartItem `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
Cost *Money `protobuf:"bytes,2,opt,name=cost,proto3" json:"cost,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1119,7 +1119,7 @@ func (m *OrderItem) Reset() { *m = OrderItem{} }
func (m *OrderItem) String() string { return proto.CompactTextString(m) }
func (*OrderItem) ProtoMessage() {}
func (*OrderItem) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{24}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{24}
}
func (m *OrderItem) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrderItem.Unmarshal(m, b)
@ -1154,11 +1154,11 @@ func (m *OrderItem) GetCost() *Money {
}
type OrderResult struct {
OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId" json:"order_id,omitempty"`
ShippingTrackingId string `protobuf:"bytes,2,opt,name=shipping_tracking_id,json=shippingTrackingId" json:"shipping_tracking_id,omitempty"`
ShippingCost *Money `protobuf:"bytes,3,opt,name=shipping_cost,json=shippingCost" json:"shipping_cost,omitempty"`
ShippingAddress *Address `protobuf:"bytes,4,opt,name=shipping_address,json=shippingAddress" json:"shipping_address,omitempty"`
Items []*OrderItem `protobuf:"bytes,5,rep,name=items" json:"items,omitempty"`
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1168,7 +1168,7 @@ func (m *OrderResult) Reset() { *m = OrderResult{} }
func (m *OrderResult) String() string { return proto.CompactTextString(m) }
func (*OrderResult) ProtoMessage() {}
func (*OrderResult) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{25}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{25}
}
func (m *OrderResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrderResult.Unmarshal(m, b)
@ -1224,8 +1224,8 @@ func (m *OrderResult) GetItems() []*OrderItem {
}
type SendOrderConfirmationRequest struct {
Email string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
Order *OrderResult `protobuf:"bytes,2,opt,name=order" json:"order,omitempty"`
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
Order *OrderResult `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1235,7 +1235,7 @@ func (m *SendOrderConfirmationRequest) Reset() { *m = SendOrderConfirmat
func (m *SendOrderConfirmationRequest) String() string { return proto.CompactTextString(m) }
func (*SendOrderConfirmationRequest) ProtoMessage() {}
func (*SendOrderConfirmationRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{26}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{26}
}
func (m *SendOrderConfirmationRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SendOrderConfirmationRequest.Unmarshal(m, b)
@ -1270,11 +1270,11 @@ func (m *SendOrderConfirmationRequest) GetOrder() *OrderResult {
}
type PlaceOrderRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
UserCurrency string `protobuf:"bytes,2,opt,name=user_currency,json=userCurrency" json:"user_currency,omitempty"`
Address *Address `protobuf:"bytes,3,opt,name=address" json:"address,omitempty"`
Email string `protobuf:"bytes,5,opt,name=email" json:"email,omitempty"`
CreditCard *CreditCardInfo `protobuf:"bytes,6,opt,name=credit_card,json=creditCard" json:"credit_card,omitempty"`
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1284,7 +1284,7 @@ func (m *PlaceOrderRequest) Reset() { *m = PlaceOrderRequest{} }
func (m *PlaceOrderRequest) String() string { return proto.CompactTextString(m) }
func (*PlaceOrderRequest) ProtoMessage() {}
func (*PlaceOrderRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{27}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{27}
}
func (m *PlaceOrderRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PlaceOrderRequest.Unmarshal(m, b)
@ -1340,7 +1340,7 @@ func (m *PlaceOrderRequest) GetCreditCard() *CreditCardInfo {
}
type PlaceOrderResponse struct {
Order *OrderResult `protobuf:"bytes,1,opt,name=order" json:"order,omitempty"`
Order *OrderResult `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1350,7 +1350,7 @@ func (m *PlaceOrderResponse) Reset() { *m = PlaceOrderResponse{} }
func (m *PlaceOrderResponse) String() string { return proto.CompactTextString(m) }
func (*PlaceOrderResponse) ProtoMessage() {}
func (*PlaceOrderResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{28}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{28}
}
func (m *PlaceOrderResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PlaceOrderResponse.Unmarshal(m, b)
@ -1377,77 +1377,77 @@ func (m *PlaceOrderResponse) GetOrder() *OrderResult {
return nil
}
type AdsRequest struct {
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" json:"context_keys,omitempty"`
ContextKeys []string `protobuf:"bytes,1,rep,name=context_keys,json=contextKeys,proto3" json:"context_keys,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AdsRequest) Reset() { *m = AdsRequest{} }
func (m *AdsRequest) String() string { return proto.CompactTextString(m) }
func (*AdsRequest) ProtoMessage() {}
func (*AdsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{29}
func (m *AdRequest) Reset() { *m = AdRequest{} }
func (m *AdRequest) String() string { return proto.CompactTextString(m) }
func (*AdRequest) ProtoMessage() {}
func (*AdRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{29}
}
func (m *AdsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AdsRequest.Unmarshal(m, b)
func (m *AdRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AdRequest.Unmarshal(m, b)
}
func (m *AdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AdsRequest.Marshal(b, m, deterministic)
func (m *AdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AdRequest.Marshal(b, m, deterministic)
}
func (dst *AdsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AdsRequest.Merge(dst, src)
func (dst *AdRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AdRequest.Merge(dst, src)
}
func (m *AdsRequest) XXX_Size() int {
return xxx_messageInfo_AdsRequest.Size(m)
func (m *AdRequest) XXX_Size() int {
return xxx_messageInfo_AdRequest.Size(m)
}
func (m *AdsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AdsRequest.DiscardUnknown(m)
func (m *AdRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AdRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AdsRequest proto.InternalMessageInfo
var xxx_messageInfo_AdRequest proto.InternalMessageInfo
func (m *AdsRequest) GetContextKeys() []string {
func (m *AdRequest) GetContextKeys() []string {
if m != nil {
return m.ContextKeys
}
return nil
}
type AdsResponse struct {
Ads []*Ad `protobuf:"bytes,1,rep,name=ads" json:"ads,omitempty"`
type AdResponse struct {
Ads []*Ad `protobuf:"bytes,1,rep,name=ads,proto3" json:"ads,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AdsResponse) Reset() { *m = AdsResponse{} }
func (m *AdsResponse) String() string { return proto.CompactTextString(m) }
func (*AdsResponse) ProtoMessage() {}
func (*AdsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{30}
func (m *AdResponse) Reset() { *m = AdResponse{} }
func (m *AdResponse) String() string { return proto.CompactTextString(m) }
func (*AdResponse) ProtoMessage() {}
func (*AdResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{30}
}
func (m *AdsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AdsResponse.Unmarshal(m, b)
func (m *AdResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AdResponse.Unmarshal(m, b)
}
func (m *AdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AdsResponse.Marshal(b, m, deterministic)
func (m *AdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AdResponse.Marshal(b, m, deterministic)
}
func (dst *AdsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AdsResponse.Merge(dst, src)
func (dst *AdResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AdResponse.Merge(dst, src)
}
func (m *AdsResponse) XXX_Size() int {
return xxx_messageInfo_AdsResponse.Size(m)
func (m *AdResponse) XXX_Size() int {
return xxx_messageInfo_AdResponse.Size(m)
}
func (m *AdsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AdsResponse.DiscardUnknown(m)
func (m *AdResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AdResponse.DiscardUnknown(m)
}
var xxx_messageInfo_AdsResponse proto.InternalMessageInfo
var xxx_messageInfo_AdResponse proto.InternalMessageInfo
func (m *AdsResponse) GetAds() []*Ad {
func (m *AdResponse) GetAds() []*Ad {
if m != nil {
return m.Ads
}
@ -1456,9 +1456,9 @@ func (m *AdsResponse) GetAds() []*Ad {
type Ad struct {
// url to redirect to when an ad is clicked.
RedirectUrl string `protobuf:"bytes,1,opt,name=redirect_url,json=redirectUrl" json:"redirect_url,omitempty"`
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" json:"text,omitempty"`
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1468,7 +1468,7 @@ func (m *Ad) Reset() { *m = Ad{} }
func (m *Ad) String() string { return proto.CompactTextString(m) }
func (*Ad) ProtoMessage() {}
func (*Ad) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_c812a73334c7ff0d, []int{31}
return fileDescriptor_demo_88bb8fdac9cd6be5, []int{31}
}
func (m *Ad) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Ad.Unmarshal(m, b)
@ -1532,8 +1532,8 @@ func init() {
proto.RegisterType((*SendOrderConfirmationRequest)(nil), "hipstershop.SendOrderConfirmationRequest")
proto.RegisterType((*PlaceOrderRequest)(nil), "hipstershop.PlaceOrderRequest")
proto.RegisterType((*PlaceOrderResponse)(nil), "hipstershop.PlaceOrderResponse")
proto.RegisterType((*AdsRequest)(nil), "hipstershop.AdsRequest")
proto.RegisterType((*AdsResponse)(nil), "hipstershop.AdsResponse")
proto.RegisterType((*AdRequest)(nil), "hipstershop.AdRequest")
proto.RegisterType((*AdResponse)(nil), "hipstershop.AdResponse")
proto.RegisterType((*Ad)(nil), "hipstershop.Ad")
}
@ -2255,165 +2255,165 @@ var _CheckoutService_serviceDesc = grpc.ServiceDesc{
Metadata: "demo.proto",
}
// AdsServiceClient is the client API for AdsService service.
// AdServiceClient is the client API for AdService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AdsServiceClient interface {
GetAds(ctx context.Context, in *AdsRequest, opts ...grpc.CallOption) (*AdsResponse, error)
type AdServiceClient interface {
GetAds(ctx context.Context, in *AdRequest, opts ...grpc.CallOption) (*AdResponse, error)
}
type adsServiceClient struct {
type adServiceClient struct {
cc *grpc.ClientConn
}
func NewAdsServiceClient(cc *grpc.ClientConn) AdsServiceClient {
return &adsServiceClient{cc}
func NewAdServiceClient(cc *grpc.ClientConn) AdServiceClient {
return &adServiceClient{cc}
}
func (c *adsServiceClient) GetAds(ctx context.Context, in *AdsRequest, opts ...grpc.CallOption) (*AdsResponse, error) {
out := new(AdsResponse)
err := c.cc.Invoke(ctx, "/hipstershop.AdsService/GetAds", in, out, opts...)
func (c *adServiceClient) GetAds(ctx context.Context, in *AdRequest, opts ...grpc.CallOption) (*AdResponse, error) {
out := new(AdResponse)
err := c.cc.Invoke(ctx, "/hipstershop.AdService/GetAds", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AdsServiceServer is the server API for AdsService service.
type AdsServiceServer interface {
GetAds(context.Context, *AdsRequest) (*AdsResponse, error)
// AdServiceServer is the server API for AdService service.
type AdServiceServer interface {
GetAds(context.Context, *AdRequest) (*AdResponse, error)
}
func RegisterAdsServiceServer(s *grpc.Server, srv AdsServiceServer) {
s.RegisterService(&_AdsService_serviceDesc, srv)
func RegisterAdServiceServer(s *grpc.Server, srv AdServiceServer) {
s.RegisterService(&_AdService_serviceDesc, srv)
}
func _AdsService_GetAds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AdsRequest)
func _AdService_GetAds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdsServiceServer).GetAds(ctx, in)
return srv.(AdServiceServer).GetAds(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hipstershop.AdsService/GetAds",
FullMethod: "/hipstershop.AdService/GetAds",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdsServiceServer).GetAds(ctx, req.(*AdsRequest))
return srv.(AdServiceServer).GetAds(ctx, req.(*AdRequest))
}
return interceptor(ctx, in, info, handler)
}
var _AdsService_serviceDesc = grpc.ServiceDesc{
ServiceName: "hipstershop.AdsService",
HandlerType: (*AdsServiceServer)(nil),
var _AdService_serviceDesc = grpc.ServiceDesc{
ServiceName: "hipstershop.AdService",
HandlerType: (*AdServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetAds",
Handler: _AdsService_GetAds_Handler,
Handler: _AdService_GetAds_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "demo.proto",
}
func init() { proto.RegisterFile("demo.proto", fileDescriptor_demo_c812a73334c7ff0d) }
func init() { proto.RegisterFile("demo.proto", fileDescriptor_demo_88bb8fdac9cd6be5) }
var fileDescriptor_demo_c812a73334c7ff0d = []byte{
// 1484 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xdd, 0x72, 0x13, 0xb7,
0x17, 0xcf, 0x26, 0x71, 0x1c, 0x1f, 0xc7, 0x76, 0xa2, 0x7f, 0x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, 0xd6, 0x71, 0x46, 0xf6, 0x4f, 0x0b, 0x3a, 0xa6, 0xf8,
0x18, 0xb2, 0xaf, 0xe0, 0xd4, 0xf4, 0x31, 0x67, 0xea, 0xb3, 0x5d, 0xab, 0x12, 0x3e, 0x66, 0x3e,
0xc2, 0x73, 0xa8, 0x0f, 0xf5, 0x64, 0xe4, 0x91, 0xe8, 0x72, 0x39, 0x17, 0x66, 0x0d, 0x44, 0xf6,
0x94, 0xf6, 0x82, 0xe7, 0x76, 0x5f, 0x40, 0xfb, 0x99, 0x3b, 0x0e, 0x68, 0x98, 0x65, 0x70, 0x0f,
0x96, 0x92, 0x9e, 0x8c, 0xec, 0xb2, 0xe4, 0xe2, 0x8c, 0x60, 0x6f, 0x4e, 0x3d, 0xcb, 0x1c, 0x32,
0x82, 0x95, 0x7d, 0x55, 0x43, 0x8d, 0xd0, 0x97, 0xea, 0x27, 0xcb, 0x94, 0x56, 0x82, 0xae, 0x56,
0xa2, 0x61, 0x76, 0xbb, 0x99, 0x91, 0xb3, 0xaf, 0xa1, 0xd3, 0x1b, 0x51, 0xef, 0x1d, 0x8b, 0x33,
0x0b, 0x9e, 0x02, 0xe4, 0x95, 0xb7, 0x12, 0xdd, 0x13, 0x9d, 0xc6, 0xbe, 0x30, 0xf3, 0x3c, 0xb3,
0xe6, 0x91, 0x2e, 0xc2, 0x46, 0xfc, 0x3d, 0x58, 0xea, 0xab, 0x31, 0x5c, 0xa0, 0xd3, 0x95, 0x0a,
0x97, 0xc5, 0x78, 0x77, 0xf2, 0xc0, 0x08, 0x7b, 0xbd, 0xa4, 0xff, 0xc1, 0xf8, 0xf2, 0xdf, 0x00,
0x00, 0x00, 0xff, 0xff, 0x0d, 0x93, 0x0f, 0x58, 0xcf, 0x10, 0x00, 0x00,
var fileDescriptor_demo_88bb8fdac9cd6be5 = []byte{
// 1483 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0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16,7 @@ package main
import (
"context"
"time"
pb "github.com/GoogleCloudPlatform/microservices-demo/src/frontend/genproto"
@ -116,20 +117,11 @@ func (fe *frontendServer) getRecommendations(ctx context.Context, userID string,
}
func (fe *frontendServer) getAd(ctx context.Context) ([]*pb.Ad, error) {
return []*pb.Ad{
&pb.Ad{
Text: "Try this OG insta camera from 1960s!",
RedirectUrl: "https://en.wikipedia.org/wiki/Instant_camera#Polaroid_cameras",
},
&pb.Ad{
Text: "Check out the new instagrammy vacation destinations!",
RedirectUrl: "https://en.wikipedia.org/wiki/Italy",
},
}, nil
ctx, cancel := context.WithTimeout(ctx, time.Millisecond*100)
defer cancel()
// TODO(rghetia): uncomment below and revove the code above
// resp, err := pb.NewAdsServiceClient(fe.adSvcConn).GetAds(ctx, &pb.AdsRequest{
// ContextKeys: nil,
// })
// return resp.GetAds(), errors.Wrap(err, "failed to get ads")
resp, err := pb.NewAdServiceClient(fe.adSvcConn).GetAds(ctx, &pb.AdRequest{
ContextKeys: nil,
})
return resp.GetAds(), errors.Wrap(err, "failed to get ads")
}