Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging upstream #57

Merged
merged 32 commits into from
Jun 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5806b89
Adding in merge
lukekraus45 Jun 13, 2024
849e30c
Updating currency service Dockerfile
lukekraus45 Jun 13, 2024
1ff34b8
Updating quote service
lukekraus45 Jun 13, 2024
e5e5a23
Trying to turn on buildkit
lukekraus45 Jun 13, 2024
3d6ee14
FIxing quote service image nuber
lukekraus45 Jun 13, 2024
c718bc7
Trying to change filepath
lukekraus45 Jun 13, 2024
4bc1f52
FInal quote service update
lukekraus45 Jun 13, 2024
d1b7b88
Trying to fix filepath
lukekraus45 Jun 13, 2024
117d59c
Moving pb directory to same context
lukekraus45 Jun 13, 2024
5fbb125
Fixing checkout service
lukekraus45 Jun 13, 2024
ecc696f
Fixing image build failure accounting service
lukekraus45 Jun 13, 2024
a1772c8
Trying to update permissions on dockerfile
lukekraus45 Jun 13, 2024
e37a02f
Edting product catalog service to match remote
lukekraus45 Jun 13, 2024
5c3b9bd
Trying updated go mod
lukekraus45 Jun 13, 2024
aeef5f7
Trying to update to point to Datadog repo
lukekraus45 Jun 13, 2024
5efe90d
Trying updating go.mod
lukekraus45 Jun 13, 2024
57dbf2b
Trying updated dockerfile
lukekraus45 Jun 13, 2024
90e1e69
Removing readonly flag
lukekraus45 Jun 13, 2024
5ef6f8d
Trying to add permissions
lukekraus45 Jun 13, 2024
378bf38
Trying root user
lukekraus45 Jun 13, 2024
5b4d624
Testing out stripped down dockerfile
lukekraus45 Jun 13, 2024
f5b744a
Trying to repush to make build take
lukekraus45 Jun 17, 2024
59b8757
Trying to add apk add
lukekraus45 Jun 17, 2024
406ddfe
Trying to update accountingservice
lukekraus45 Jun 17, 2024
4c91dde
Updatiang image
lukekraus45 Jun 17, 2024
b5f138e
Trying go generate command
lukekraus45 Jun 17, 2024
8d16626
Updating to match upstream
lukekraus45 Jun 17, 2024
6459f86
Adding go generate
lukekraus45 Jun 17, 2024
6330a9b
Adding go build and copy
lukekraus45 Jun 17, 2024
88c5c74
update docker file
dineshg13 Jun 17, 2024
a7b7da1
update docker file for product catalog
dineshg13 Jun 18, 2024
141744c
update docker file for accounting service
dineshg13 Jun 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Moving pb directory to same context
lukekraus45 committed Jun 13, 2024

Verified

This commit was signed with the committer’s verified signature.
lukekraus45 Luke Kraus
commit 117d59cd3c351b54ec1d394170b3904f102fa797
4 changes: 1 addition & 3 deletions src/currencyservice/Dockerfile
Original file line number Diff line number Diff line change
@@ -30,10 +30,8 @@ RUN git clone https://github.com/open-telemetry/opentelemetry-cpp \
-DWITH_EXAMPLES=OFF -DWITH_OTLP_GRPC=ON -DWITH_ABSEIL=ON \
&& make -j$(nproc || sysctl -n hw.ncpu || echo 1) install && cd ../..

RUN ls

COPY . /currencyservice
COPY ./../../pb/demo.proto /currencyservice/proto/demo.proto
COPY /pb/demo.proto /currencyservice/proto/demo.proto

RUN cd /currencyservice \
&& mkdir -p build && cd build \
315 changes: 315 additions & 0 deletions src/currencyservice/pb/demo.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,315 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package oteldemo;

option go_package = "genproto/oteldemo";

// -----------------Cart service-----------------

service CartService {
rpc AddItem(AddItemRequest) returns (Empty) {}
rpc GetCart(GetCartRequest) returns (Cart) {}
rpc EmptyCart(EmptyCartRequest) returns (Empty) {}
}

message CartItem {
string product_id = 1;
int32 quantity = 2;
}

message AddItemRequest {
string user_id = 1;
CartItem item = 2;
}

message EmptyCartRequest {
string user_id = 1;
}

message GetCartRequest {
string user_id = 1;
}

message Cart {
string user_id = 1;
repeated CartItem items = 2;
}

message Empty {}

// ---------------Recommendation service----------

service RecommendationService {
rpc ListRecommendations(ListRecommendationsRequest) returns (ListRecommendationsResponse){}
}

message ListRecommendationsRequest {
string user_id = 1;
repeated string product_ids = 2;
}

message ListRecommendationsResponse {
repeated string product_ids = 1;
}

// ---------------Product Catalog----------------

service ProductCatalogService {
rpc ListProducts(Empty) returns (ListProductsResponse) {}
rpc GetProduct(GetProductRequest) returns (Product) {}
rpc SearchProducts(SearchProductsRequest) returns (SearchProductsResponse) {}
}

message Product {
string id = 1;
string name = 2;
string description = 3;
string picture = 4;
Money price_usd = 5;

// Categories such as "clothing" or "kitchen" that can be used to look up
// other related products.
repeated string categories = 6;
}

message ListProductsResponse {
repeated Product products = 1;
}

message GetProductRequest {
string id = 1;
}

message SearchProductsRequest {
string query = 1;
}

message SearchProductsResponse {
repeated Product results = 1;
}

// ---------------Shipping Service----------

service ShippingService {
rpc GetQuote(GetQuoteRequest) returns (GetQuoteResponse) {}
rpc ShipOrder(ShipOrderRequest) returns (ShipOrderResponse) {}
}

message GetQuoteRequest {
Address address = 1;
repeated CartItem items = 2;
}

message GetQuoteResponse {
Money cost_usd = 1;
}

message ShipOrderRequest {
Address address = 1;
repeated CartItem items = 2;
}

message ShipOrderResponse {
string tracking_id = 1;
}

message Address {
string street_address = 1;
string city = 2;
string state = 3;
string country = 4;
string zip_code = 5;
}

// -----------------Currency service-----------------

service CurrencyService {
rpc GetSupportedCurrencies(Empty) returns (GetSupportedCurrenciesResponse) {}
rpc Convert(CurrencyConversionRequest) returns (Money) {}
}

// Represents an amount of money with its currency type.
message Money {
// The 3-letter currency code defined in ISO 4217.
string currency_code = 1;

// The whole units of the amount.
// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
int64 units = 2;

// 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.
int32 nanos = 3;
}

message GetSupportedCurrenciesResponse {
// The 3-letter currency code defined in ISO 4217.
repeated string currency_codes = 1;
}

message CurrencyConversionRequest {
Money from = 1;

// The 3-letter currency code defined in ISO 4217.
string to_code = 2;
}

// -------------Payment service-----------------

service PaymentService {
rpc Charge(ChargeRequest) returns (ChargeResponse) {}
}

message CreditCardInfo {
string credit_card_number = 1;
int32 credit_card_cvv = 2;
int32 credit_card_expiration_year = 3;
int32 credit_card_expiration_month = 4;
}

message ChargeRequest {
Money amount = 1;
CreditCardInfo credit_card = 2;
}

message ChargeResponse {
string transaction_id = 1;
}

// -------------Email service-----------------

service EmailService {
rpc SendOrderConfirmation(SendOrderConfirmationRequest) returns (Empty) {}
}

message OrderItem {
CartItem item = 1;
Money cost = 2;
}

message OrderResult {
string order_id = 1;
string shipping_tracking_id = 2;
Money shipping_cost = 3;
Address shipping_address = 4;
repeated OrderItem items = 5;
}

message SendOrderConfirmationRequest {
string email = 1;
OrderResult order = 2;
}


// -------------Checkout service-----------------

service CheckoutService {
rpc PlaceOrder(PlaceOrderRequest) returns (PlaceOrderResponse) {}
}

message PlaceOrderRequest {
string user_id = 1;
string user_currency = 2;

Address address = 3;
string email = 5;
CreditCardInfo credit_card = 6;
}

message PlaceOrderResponse {
OrderResult order = 1;
}

// ------------Ad service------------------

service AdService {
rpc GetAds(AdRequest) returns (AdResponse) {}
}

message AdRequest {
// List of important key words from the current page describing the context.
repeated string context_keys = 1;
}

message AdResponse {
repeated Ad ads = 1;
}

message Ad {
// url to redirect to when an ad is clicked.
string redirect_url = 1;

// short advertisement text to display.
string text = 2;
}

// ------------Feature flag service------------------

service FeatureFlagService {
rpc GetFlag(GetFlagRequest) returns (GetFlagResponse) {}
rpc CreateFlag(CreateFlagRequest) returns (CreateFlagResponse) {}
rpc UpdateFlag(UpdateFlagRequest) returns (UpdateFlagResponse) {}
rpc ListFlags(ListFlagsRequest) returns (ListFlagsResponse) {}
rpc DeleteFlag(DeleteFlagRequest) returns (DeleteFlagResponse) {}
}

message Flag {
string name = 1;
string description = 2;
bool enabled = 3;
}

message GetFlagRequest {
string name = 1;
}

message GetFlagResponse {
Flag flag = 1;
}

message CreateFlagRequest {
string name = 1;
string description = 2;
bool enabled = 3;
}

message CreateFlagResponse {
Flag flag = 1;
}

message UpdateFlagRequest {
string name = 1;
bool enabled = 2;
}

message UpdateFlagResponse {}

message ListFlagsRequest {}

message ListFlagsResponse {
repeated Flag flag = 1;
}

message DeleteFlagRequest {
string name = 1;
}

message DeleteFlagResponse {}