Merge branch 'bff' into dev
This commit is contained in:
commit
2fb1349094
@ -13,6 +13,7 @@ hosts
|
|||||||
LICENSE
|
LICENSE
|
||||||
*.testsettings
|
*.testsettings
|
||||||
vsts-docs
|
vsts-docs
|
||||||
|
test
|
||||||
ServiceFabric
|
ServiceFabric
|
||||||
readme
|
readme
|
||||||
k8s
|
k8s
|
||||||
@ -29,4 +30,5 @@ cli-linux
|
|||||||
**/bower_components/
|
**/bower_components/
|
||||||
**/wwwroot/lib/
|
**/wwwroot/lib/
|
||||||
global.json
|
global.json
|
||||||
|
**/appsettings.localhost.json
|
||||||
src/Web/WebSPA/wwwroot/
|
src/Web/WebSPA/wwwroot/
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -260,3 +260,4 @@ pub/
|
|||||||
/src/Web/WebMVC/wwwroot/lib
|
/src/Web/WebMVC/wwwroot/lib
|
||||||
/src/Web/WebMVC/wwwroot/css/site.min.css
|
/src/Web/WebMVC/wwwroot/css/site.min.css
|
||||||
**/.kube/**
|
**/.kube/**
|
||||||
|
.mfractor
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<DockerServiceName>webmvc</DockerServiceName>
|
<DockerServiceName>webmvc</DockerServiceName>
|
||||||
<DockerTargetOS>Linux</DockerTargetOS>
|
<DockerTargetOS>Linux</DockerTargetOS>
|
||||||
<ProjectVersion>2.1</ProjectVersion>
|
<ProjectVersion>2.1</ProjectVersion>
|
||||||
|
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include=".dockerignore" />
|
<None Include=".dockerignore" />
|
||||||
|
@ -24,14 +24,15 @@ services:
|
|||||||
- UseLoadTest=${USE_LOADTEST:-False}
|
- UseLoadTest=${USE_LOADTEST:-False}
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "5103:80"
|
- "5103:80" # Important: In a production environment your should remove the external port (5103) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
catalog.api:
|
catalog.api:
|
||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
- ASPNETCORE_URLS=http://0.0.0.0:80
|
- ASPNETCORE_URLS=http://0.0.0.0:80
|
||||||
- ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word}
|
- ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word}
|
||||||
- PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
- PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5202/api/v1/c/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
|
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
|
||||||
- EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
|
- EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
|
||||||
- EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
|
- EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
|
||||||
@ -43,7 +44,8 @@ services:
|
|||||||
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
ports:
|
ports:
|
||||||
- "5101:80"
|
- "5101:80" # Important: In a production environment your should remove the external port (5101) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
identity.api:
|
identity.api:
|
||||||
environment:
|
environment:
|
||||||
@ -57,6 +59,8 @@ services:
|
|||||||
- MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110
|
- MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110
|
||||||
- BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103
|
- BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103
|
||||||
- OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102
|
- OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102
|
||||||
|
- MobileShoppingAggClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5120
|
||||||
|
- WebShoppingAggClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5121
|
||||||
- UseCustomizationData=True
|
- UseCustomizationData=True
|
||||||
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
@ -81,25 +85,8 @@ services:
|
|||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
- UseLoadTest=${USE_LOADTEST:-False}
|
- UseLoadTest=${USE_LOADTEST:-False}
|
||||||
ports:
|
ports:
|
||||||
- "5102:80"
|
- "5102:80" # Important: In a production environment your should remove the external port (5102) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
ordering.backgroundtasks:
|
|
||||||
environment:
|
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
|
||||||
- ASPNETCORE_URLS=http://0.0.0.0:80
|
|
||||||
- ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
|
|
||||||
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
|
|
||||||
- EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
|
|
||||||
- EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
|
|
||||||
- UseCustomizationData=True
|
|
||||||
- AzureServiceBusEnabled=False
|
|
||||||
- CheckUpdateTime=30000
|
|
||||||
- GracePeriodTime=1
|
|
||||||
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
|
||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
|
||||||
- UseLoadTest=${USE_LOADTEST:-False}
|
|
||||||
ports:
|
|
||||||
- "5111:80"
|
|
||||||
|
|
||||||
marketing.api:
|
marketing.api:
|
||||||
environment:
|
environment:
|
||||||
@ -123,18 +110,16 @@ services:
|
|||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
- UseLoadTest=${USE_LOADTEST:-False}
|
- UseLoadTest=${USE_LOADTEST:-False}
|
||||||
ports:
|
ports:
|
||||||
- "5110:80"
|
- "5110:80" # Important: In a production environment your should remove the external port (5110) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
webspa:
|
webspa:
|
||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
- ASPNETCORE_URLS=http://0.0.0.0:80
|
- ASPNETCORE_URLS=http://0.0.0.0:80
|
||||||
- CatalogUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101
|
|
||||||
- OrderingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102
|
|
||||||
- IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
|
- IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
|
||||||
- BasketUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103
|
- PurchaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5202
|
||||||
- MarketingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110
|
- MarketingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5203
|
||||||
- LocationsUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5109
|
|
||||||
- CatalogUrlHC=http://catalog.api/hc
|
- CatalogUrlHC=http://catalog.api/hc
|
||||||
- OrderingUrlHC=http://ordering.api/hc
|
- OrderingUrlHC=http://ordering.api/hc
|
||||||
- IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
|
- IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
|
||||||
@ -151,12 +136,9 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
- ASPNETCORE_URLS=http://0.0.0.0:80
|
- ASPNETCORE_URLS=http://0.0.0.0:80
|
||||||
- CatalogUrl=http://catalog.api
|
- PurchaseUrl=http://webshoppingapigw
|
||||||
- OrderingUrl=http://ordering.api
|
|
||||||
- BasketUrl=http://basket.api
|
|
||||||
- LocationsUrl=http://locations.api
|
|
||||||
- IdentityUrl=http://10.0.75.1:5105 # Local Mac: Use http://docker.for.mac.localhost:5105 || Local Windows: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. || #Remote access: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
|
- IdentityUrl=http://10.0.75.1:5105 # Local Mac: Use http://docker.for.mac.localhost:5105 || Local Windows: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. || #Remote access: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
|
||||||
- MarketingUrl=http://marketing.api
|
- MarketingUrl=http://webmarketingapigw
|
||||||
- CatalogUrlHC=http://catalog.api/hc
|
- CatalogUrlHC=http://catalog.api/hc
|
||||||
- OrderingUrlHC=http://ordering.api/hc
|
- OrderingUrlHC=http://ordering.api/hc
|
||||||
- IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
|
- IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
|
||||||
@ -199,7 +181,8 @@ services:
|
|||||||
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
ports:
|
ports:
|
||||||
- "5108:80"
|
- "5108:80" # Important: In a production environment your should remove the external port (5108) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
locations.api:
|
locations.api:
|
||||||
environment:
|
environment:
|
||||||
@ -217,25 +200,83 @@ services:
|
|||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
- UseLoadTest=${USE_LOADTEST:-False}
|
- UseLoadTest=${USE_LOADTEST:-False}
|
||||||
ports:
|
ports:
|
||||||
- "5109:80"
|
- "5109:80" # Important: In a production environment your should remove the external port (5109) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
sql.data:
|
sql.data:
|
||||||
environment:
|
environment:
|
||||||
- SA_PASSWORD=Pass@word
|
- SA_PASSWORD=Pass@word
|
||||||
- ACCEPT_EULA=Y
|
- ACCEPT_EULA=Y
|
||||||
ports:
|
ports:
|
||||||
- "5433:1433"
|
- "5433:1433" # Important: In a production environment your should remove the external port
|
||||||
|
|
||||||
nosql.data:
|
nosql.data:
|
||||||
ports:
|
ports:
|
||||||
- "27017:27017"
|
- "27017:27017" # Important: In a production environment your should remove the external port
|
||||||
|
|
||||||
basket.data:
|
basket.data:
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379" # Important: In a production environment your should remove the external port
|
||||||
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
ports:
|
ports:
|
||||||
- "15672:15672"
|
- "15672:15672" # Important: In a production environment your should remove the external port
|
||||||
- "5672:5672"
|
- "5672:5672" # Important: In a production environment your should remove the external port
|
||||||
|
|
||||||
|
mobileshoppingapigw:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "5200:80"
|
||||||
|
volumes:
|
||||||
|
- ./src/ApiGateways/Mobile.Bff.Shopping/apigw:/app/configuration
|
||||||
|
|
||||||
|
mobilemarketingapigw:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "5201:80"
|
||||||
|
volumes:
|
||||||
|
- ./src/ApiGateways/Mobile.Bff.Marketing/apigw:/app/configuration
|
||||||
|
|
||||||
|
webshoppingapigw:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "5202:80"
|
||||||
|
volumes:
|
||||||
|
- ./src/ApiGateways/Web.Bff.Shopping/apigw:/app/configuration
|
||||||
|
|
||||||
|
webmarketingapigw:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "5203:80"
|
||||||
|
volumes:
|
||||||
|
- ./src/ApiGateways/Web.Bff.Marketing/apigw:/app/configuration
|
||||||
|
|
||||||
|
mobileshoppingagg:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- urls__basket=http://basket.api
|
||||||
|
- urls__catalog=http://catalog.api
|
||||||
|
- urls__orders=http://ordering.api
|
||||||
|
- urls__identity=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "5120:80" # Important: In a production environment your should remove the external port (5120) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
|
webshoppingagg:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- urls__basket=http://basket.api
|
||||||
|
- urls__catalog=http://catalog.api
|
||||||
|
- urls__orders=http://ordering.api
|
||||||
|
- urls__identity=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "5121:80" # Important: In a production environment your should remove the external port (5121) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
@ -11,7 +11,7 @@ version: '3.4'
|
|||||||
# Set ASPNETCORE_ENVIRONMENT= Development or Production, depending if you want to show up errors while testing.
|
# Set ASPNETCORE_ENVIRONMENT= Development or Production, depending if you want to show up errors while testing.
|
||||||
#
|
#
|
||||||
# You need to start it with the following CLI command:
|
# You need to start it with the following CLI command:
|
||||||
# docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
|
# docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ services:
|
|||||||
- UseLoadTest=${USE_LOADTEST:-False}
|
- UseLoadTest=${USE_LOADTEST:-False}
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "5103:80"
|
- "80" # The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
catalog.api:
|
catalog.api:
|
||||||
environment:
|
environment:
|
||||||
@ -50,7 +50,7 @@ services:
|
|||||||
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
ports:
|
ports:
|
||||||
- "5101:80"
|
- "80" # The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
identity.api:
|
identity.api:
|
||||||
environment:
|
environment:
|
||||||
@ -64,6 +64,8 @@ services:
|
|||||||
- MarketingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110
|
- MarketingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110
|
||||||
- BasketApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
|
- BasketApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
|
||||||
- OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
|
- OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
|
||||||
|
- MobileShoppingAggClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5120
|
||||||
|
- WebShoppingAggClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5121
|
||||||
- UseCustomizationData=True
|
- UseCustomizationData=True
|
||||||
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
@ -88,25 +90,7 @@ services:
|
|||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
- UseLoadTest=${USE_LOADTEST:-False}
|
- UseLoadTest=${USE_LOADTEST:-False}
|
||||||
ports:
|
ports:
|
||||||
- "5102:80"
|
- "80" # The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
ordering.backgroundtasks:
|
|
||||||
environment:
|
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
|
||||||
- ASPNETCORE_URLS=http://0.0.0.0:80
|
|
||||||
- ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
|
|
||||||
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
|
|
||||||
- EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
|
|
||||||
- EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
|
|
||||||
- UseCustomizationData=True
|
|
||||||
- AzureServiceBusEnabled=False
|
|
||||||
- CheckUpdateTime=30000
|
|
||||||
- GracePeriodTime=1
|
|
||||||
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
|
||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
|
||||||
- UseLoadTest=${USE_LOADTEST:-False}
|
|
||||||
ports:
|
|
||||||
- "5111:80"
|
|
||||||
|
|
||||||
marketing.api:
|
marketing.api:
|
||||||
environment:
|
environment:
|
||||||
@ -130,21 +114,18 @@ services:
|
|||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
- UseLoadTest=${USE_LOADTEST:-False}
|
- UseLoadTest=${USE_LOADTEST:-False}
|
||||||
ports:
|
ports:
|
||||||
- "5110:80"
|
- "80" # The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
webspa:
|
webspa:
|
||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
- ASPNETCORE_URLS=http://0.0.0.0:80
|
- ASPNETCORE_URLS=http://0.0.0.0:80
|
||||||
- CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101
|
|
||||||
- OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
|
|
||||||
- IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
|
- IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
|
||||||
- BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
|
- PurchaseUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5202
|
||||||
- MarketingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110
|
- MarketingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5203
|
||||||
- LocationsUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5109
|
|
||||||
- CatalogUrlHC=http://catalog.api/hc
|
- CatalogUrlHC=http://catalog.api/hc
|
||||||
- OrderingUrlHC=http://ordering.api/hc
|
- OrderingUrlHC=http://ordering.api/hc
|
||||||
- IdentityUrlHC=http://identity.api/hc
|
- IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
|
||||||
- BasketUrlHC=http://basket.api/hc
|
- BasketUrlHC=http://basket.api/hc
|
||||||
- MarketingUrlHC=http://marketing.api/hc
|
- MarketingUrlHC=http://marketing.api/hc
|
||||||
- PaymentUrlHC=http://payment.api/hc
|
- PaymentUrlHC=http://payment.api/hc
|
||||||
@ -158,15 +139,12 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
- ASPNETCORE_URLS=http://0.0.0.0:80
|
- ASPNETCORE_URLS=http://0.0.0.0:80
|
||||||
- CatalogUrl=http://catalog.api
|
- PurchaseUrl=http://webshoppingapigw
|
||||||
- OrderingUrl=http://ordering.api
|
- IdentityUrl=http://10.0.75.1:5105 # Local Mac: Use http://docker.for.mac.localhost:5105 || Local Windows: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. || #Remote access: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
|
||||||
- BasketUrl=http://basket.api
|
- MarketingUrl=http://webmarketingapigw
|
||||||
- LocationsUrl=http://locations.api
|
|
||||||
- IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. #Remote: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
|
|
||||||
- MarketingUrl=http://marketing.api
|
|
||||||
- CatalogUrlHC=http://catalog.api/hc
|
- CatalogUrlHC=http://catalog.api/hc
|
||||||
- OrderingUrlHC=http://ordering.api/hc
|
- OrderingUrlHC=http://ordering.api/hc
|
||||||
- IdentityUrlHC=http://identity.api/hc
|
- IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
|
||||||
- BasketUrlHC=http://basket.api/hc
|
- BasketUrlHC=http://basket.api/hc
|
||||||
- MarketingUrlHC=http://marketing.api/hc
|
- MarketingUrlHC=http://marketing.api/hc
|
||||||
- PaymentUrlHC=http://payment.api/hc
|
- PaymentUrlHC=http://payment.api/hc
|
||||||
@ -206,7 +184,7 @@ services:
|
|||||||
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
|
||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
ports:
|
ports:
|
||||||
- "5108:80"
|
- "80" # The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
locations.api:
|
locations.api:
|
||||||
environment:
|
environment:
|
||||||
@ -224,25 +202,87 @@ services:
|
|||||||
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
- OrchestratorType=${ORCHESTRATOR_TYPE}
|
||||||
- UseLoadTest=${USE_LOADTEST:-False}
|
- UseLoadTest=${USE_LOADTEST:-False}
|
||||||
ports:
|
ports:
|
||||||
- "5109:80"
|
- "80" # The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
sql.data:
|
sql.data:
|
||||||
environment:
|
environment:
|
||||||
- MSSQL_SA_PASSWORD=Pass@word
|
- SA_PASSWORD=Pass@word
|
||||||
- ACCEPT_EULA=Y
|
- ACCEPT_EULA=Y
|
||||||
- MSSQL_PID=Developer
|
|
||||||
ports:
|
ports:
|
||||||
- "5433:1433"
|
- "5433:1433" # Important: In a production environment your should remove the external port
|
||||||
|
|
||||||
nosql.data:
|
nosql.data:
|
||||||
ports:
|
ports:
|
||||||
- "27017:27017"
|
- "27017:27017" # Important: In a production environment your should remove the external port
|
||||||
|
|
||||||
basket.data:
|
basket.data:
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379" # Important: In a production environment your should remove the external port
|
||||||
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
ports:
|
ports:
|
||||||
- "15672:15672"
|
- "15672:15672" # Important: In a production environment your should remove the external port
|
||||||
- "5672:5672"
|
- "5672:5672" # Important: In a production environment your should remove the external port
|
||||||
|
|
||||||
|
mobileshoppingapigw:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "5200:80" # Important: In a production environment your should remove the external port (5200) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
volumes:
|
||||||
|
- ./src/ApiGateways/Mobile.Bff.Shopping/apigw:/app/configuration
|
||||||
|
|
||||||
|
mobilemarketingapigw:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "5201:80" # Important: In a production environment your should remove the external port (5201) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
volumes:
|
||||||
|
- ./src/ApiGateways/Mobile.Bff.Marketing/apigw:/app/configuration
|
||||||
|
|
||||||
|
webshoppingapigw:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "5202:80" # Important: In a production environment your should remove the external port (5202) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
volumes:
|
||||||
|
- ./src/ApiGateways/Web.Bff.Shopping/apigw:/app/configuration
|
||||||
|
|
||||||
|
webmarketingapigw:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "5203:80" # Important: In a production environment your should remove the external port (5203) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
volumes:
|
||||||
|
- ./src/ApiGateways/Web.Bff.Marketing/apigw:/app/configuration
|
||||||
|
|
||||||
|
mobileshoppingagg:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- urls__basket=http://basket.api
|
||||||
|
- urls__catalog=http://catalog.api
|
||||||
|
- urls__orders=http://ordering.api
|
||||||
|
- urls__identity=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "80" # Important: In a production environment your should remove the external port (5120) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
|
webshoppingagg:
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- urls__basket=http://basket.api
|
||||||
|
- urls__catalog=http://catalog.api
|
||||||
|
- urls__orders=http://ordering.api
|
||||||
|
- urls__identity=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
|
||||||
|
ports:
|
||||||
|
- "80" # Important: In a production environment your should remove the external port (5121) kept here for microservice debugging purposes.
|
||||||
|
# The API Gateway redirects and access through the internal port (80).
|
||||||
|
|
||||||
|
@ -38,15 +38,6 @@ services:
|
|||||||
- sql.data
|
- sql.data
|
||||||
- rabbitmq
|
- rabbitmq
|
||||||
|
|
||||||
ordering.backgroundtasks:
|
|
||||||
image: eshop/ordering.backgroundtasks:${TAG:-latest}
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile
|
|
||||||
depends_on:
|
|
||||||
- sql.data
|
|
||||||
- rabbitmq
|
|
||||||
|
|
||||||
marketing.api:
|
marketing.api:
|
||||||
image: eshop/marketing.api:${TAG:-latest}
|
image: eshop/marketing.api:${TAG:-latest}
|
||||||
build:
|
build:
|
||||||
@ -116,3 +107,40 @@ services:
|
|||||||
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
image: rabbitmq:3-management-alpine
|
image: rabbitmq:3-management-alpine
|
||||||
|
|
||||||
|
mobileshoppingapigw:
|
||||||
|
image: eshop/ocelotapigw:${TAG:-latest}
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile
|
||||||
|
|
||||||
|
mobilemarketingapigw:
|
||||||
|
image: eshop/ocelotapigw:${TAG:-latest}
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile
|
||||||
|
|
||||||
|
webshoppingapigw:
|
||||||
|
image: eshop/ocelotapigw:${TAG:-latest}
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile
|
||||||
|
|
||||||
|
webmarketingapigw:
|
||||||
|
image: eshop/ocelotapigw:${TAG:-latest}
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile
|
||||||
|
|
||||||
|
mobileshoppingagg:
|
||||||
|
image: eshop/mobileshoppingagg:${TAG:-latest}
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile
|
||||||
|
|
||||||
|
webshoppingagg:
|
||||||
|
image: eshop/webshoppingagg:${TAG:-latest}
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio 15
|
||||||
VisualStudioVersion = 15.0.27130.2024
|
VisualStudioVersion = 15.0.27130.2027
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}"
|
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}"
|
||||||
EndProject
|
EndProject
|
||||||
@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
.env = .env
|
||||||
Local.testsettings = Local.testsettings
|
Local.testsettings = Local.testsettings
|
||||||
NuGet.config = NuGet.config
|
NuGet.config = NuGet.config
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
@ -97,7 +98,35 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebHost", "WebHost", "{1815
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebHost.Customization", "src\BuildingBlocks\WebHostCustomization\WebHost.Customization\WebHost.Customization.csproj", "{15F4B3AA-89B6-4A0D-9051-414305974781}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebHost.Customization", "src\BuildingBlocks\WebHostCustomization\WebHost.Customization\WebHost.Customization.csproj", "{15F4B3AA-89B6-4A0D-9051-414305974781}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.BackgroundTasks", "src\Services\Ordering\Ordering.BackgroundTasks\Ordering.BackgroundTasks.csproj", "{2FF56999-0266-48B2-ACC1-FEBC482A5105}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGateways", "ApiGateways", "{77849D35-37D4-4802-81DC-9477B2775A40}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGw-Base", "ApiGw-Base", "{EC91ADE9-3D66-4AB2-9FB4-2B585E1F3531}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile.Bff.Marketing", "Mobile.Bff.Marketing", "{DB813A36-11BA-41FE-B258-CA9A7152247B}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
src\ApiGateways\Mobile.Bff.Marketing\apigw\configuration.json = src\ApiGateways\Mobile.Bff.Marketing\apigw\configuration.json
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile.Bff.Shopping", "Mobile.Bff.Shopping", "{0189E4FB-6E2B-4F2E-9B1D-5473D23FC6DB}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
src\ApiGateways\Mobile.Bff.Shopping\apigw\configuration.json = src\ApiGateways\Mobile.Bff.Shopping\apigw\configuration.json
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web.Bff.Marketing", "Web.Bff.Marketing", "{F8F0921C-EE5D-4AED-A4D6-5BF5FAE02CB5}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
src\ApiGateways\Web.Bff.Marketing\apigw\configuration.json = src\ApiGateways\Web.Bff.Marketing\apigw\configuration.json
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web.Bff.Shopping", "Web.Bff.Shopping", "{28C0F5C8-4849-4035-80AB-45639424E73F}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
src\ApiGateways\Web.Bff.Shopping\apigw\configuration.json = src\ApiGateways\Web.Bff.Shopping\apigw\configuration.json
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OcelotApiGw", "src\ApiGateways\ApiGw-Base\OcelotApiGw.csproj", "{3F79558C-485D-49E1-BD3E-E12538D3D308}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggregator", "src\ApiGateways\Mobile.Bff.Shopping\aggregator\Mobile.Shopping.HttpAggregator.csproj", "{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.Shopping.HttpAggregator", "src\ApiGateways\Web.Bff.Shopping\aggregator\Web.Shopping.HttpAggregator.csproj", "{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -1313,54 +1342,150 @@ Global
|
|||||||
{15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x64.Build.0 = Release|Any CPU
|
{15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x86.ActiveCfg = Release|Any CPU
|
{15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x86.Build.0 = Release|Any CPU
|
{15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|ARM.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|x64.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.AppStore|x86.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|ARM.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|iPhone.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|x64.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|x86.ActiveCfg = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Debug|x86.Build.0 = Debug|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|Any CPU.Build.0 = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|ARM.ActiveCfg = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|ARM.Build.0 = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|ARM.Build.0 = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|iPhone.ActiveCfg = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|iPhone.Build.0 = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|iPhone.Build.0 = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|x64.ActiveCfg = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|x64.Build.0 = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|x86.ActiveCfg = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105}.Release|x86.Build.0 = Release|Any CPU
|
{3F79558C-485D-49E1-BD3E-E12538D3D308}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|ARM.Build.0 = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhone.Build.0 = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|ARM.Build.0 = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|iPhone.Build.0 = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@ -1407,7 +1532,15 @@ Global
|
|||||||
{969E793C-C413-490E-9C9D-B2B46DA5AF32} = {EF0337F2-ED00-4643-89FD-EE10863F1870}
|
{969E793C-C413-490E-9C9D-B2B46DA5AF32} = {EF0337F2-ED00-4643-89FD-EE10863F1870}
|
||||||
{1815B651-941C-466B-AE33-D1D7EEB8F77F} = {DB0EFB20-B024-4E5E-A75C-52143C131D25}
|
{1815B651-941C-466B-AE33-D1D7EEB8F77F} = {DB0EFB20-B024-4E5E-A75C-52143C131D25}
|
||||||
{15F4B3AA-89B6-4A0D-9051-414305974781} = {1815B651-941C-466B-AE33-D1D7EEB8F77F}
|
{15F4B3AA-89B6-4A0D-9051-414305974781} = {1815B651-941C-466B-AE33-D1D7EEB8F77F}
|
||||||
{2FF56999-0266-48B2-ACC1-FEBC482A5105} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B}
|
{77849D35-37D4-4802-81DC-9477B2775A40} = {932D8224-11F6-4D07-B109-DA28AD288A63}
|
||||||
|
{EC91ADE9-3D66-4AB2-9FB4-2B585E1F3531} = {77849D35-37D4-4802-81DC-9477B2775A40}
|
||||||
|
{DB813A36-11BA-41FE-B258-CA9A7152247B} = {77849D35-37D4-4802-81DC-9477B2775A40}
|
||||||
|
{0189E4FB-6E2B-4F2E-9B1D-5473D23FC6DB} = {77849D35-37D4-4802-81DC-9477B2775A40}
|
||||||
|
{F8F0921C-EE5D-4AED-A4D6-5BF5FAE02CB5} = {77849D35-37D4-4802-81DC-9477B2775A40}
|
||||||
|
{28C0F5C8-4849-4035-80AB-45639424E73F} = {77849D35-37D4-4802-81DC-9477B2775A40}
|
||||||
|
{3F79558C-485D-49E1-BD3E-E12538D3D308} = {EC91ADE9-3D66-4AB2-9FB4-2B585E1F3531}
|
||||||
|
{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0} = {0189E4FB-6E2B-4F2E-9B1D-5473D23FC6DB}
|
||||||
|
{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1} = {28C0F5C8-4849-4035-80AB-45639424E73F}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}
|
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}
|
||||||
|
@ -6,11 +6,9 @@ metadata:
|
|||||||
app: eshop
|
app: eshop
|
||||||
data:
|
data:
|
||||||
# Basket.API entries
|
# Basket.API entries
|
||||||
BasketBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX for topic in case of using Azure)
|
basket__ConnectionString: REDIS CONNECTION STRING FOR BASKET
|
||||||
BasketRedisConStr: REDIS CONNECTION STRING FOR BASKET
|
|
||||||
# Catalog.API entries
|
# Catalog.API entries
|
||||||
CatalogBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX for topic in case of using Azure)
|
catalog__ConnectionString: Catalog SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
|
||||||
CatalogSqlDb: Catalog SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
|
|
||||||
# Identity.API entries
|
# Identity.API entries
|
||||||
IdentitySqlDb: Identity SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
|
IdentitySqlDb: Identity SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
|
||||||
# Locations.API entries
|
# Locations.API entries
|
||||||
@ -30,5 +28,7 @@ data:
|
|||||||
# Payment.API entries
|
# Payment.API entries
|
||||||
PaymentBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX for topic in case of using Azure)
|
PaymentBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX for topic in case of using Azure)
|
||||||
# Global entries
|
# Global entries
|
||||||
UseAzureServiceBus: "TRUE" IF USE AZURE SB ("FALSE" FOR USING RABBITMQ)
|
all_UseAzureServiceBus: "TRUE" IF USE AZURE SB ("FALSE" FOR USING RABBITMQ)
|
||||||
keystore: REDIS CONNECTION STRING FOR KEYSTORE
|
keystore: REDIS CONNECTION STRING FOR KEYSTORE
|
||||||
|
all_EventBusConnection: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
|
||||||
|
all_InstrumentationKey: APPINSIGHTS KEY
|
||||||
|
@ -5,28 +5,23 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
app: eshop
|
app: eshop
|
||||||
data:
|
data:
|
||||||
BasketBus: rabbitmq
|
basket__ConnectionString: basket-data
|
||||||
BasketRedisConStr: basket-data
|
catalog__ConnectionString: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word;
|
||||||
CatalogBus: rabbitmq
|
catalog__AzureStorageEnabled: "False"
|
||||||
CatalogSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word;
|
identity__ConnectionString: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word;
|
||||||
CatalogAzureStorageEnabled: "False"
|
locations__ConnectionString: mongodb://nosql-data
|
||||||
IdentitySqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word;
|
locations__Database: LocationsDb
|
||||||
LocationsBus: rabbitmq
|
marketing__MongoConnectionString: mongodb://nosql-data
|
||||||
LocationsNoSqlDb: mongodb://nosql-data
|
marketing__MongoDatabase: MarketingDb
|
||||||
LocationsNoSqlDbName: LocationsDb
|
marketing__ConnectionString: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word;
|
||||||
MarketingBus: rabbitmq
|
ordering__ConnectionString: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;
|
||||||
MarketingNoSqlDb: mongodb://nosql-data
|
|
||||||
MarketingNoSqlDbName: MarketingDb
|
|
||||||
MarketingSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word;
|
|
||||||
OrderingBus: rabbitmq
|
|
||||||
OrderingSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;
|
|
||||||
PaymentBus: rabbitmq
|
|
||||||
UseAzureServiceBus: "False"
|
|
||||||
EnableLoadTest: "False"
|
|
||||||
keystore: keystore-data
|
keystore: keystore-data
|
||||||
GracePeriodManager_GracePeriodTime: "1"
|
GracePeriodManager__GracePeriodTime: "1"
|
||||||
GracePeriodManager_CheckUpdateTime: "15000"
|
GracePeriodManager__CheckUpdateTime: "15000"
|
||||||
Instrumentation_Key: ""
|
all__EventBusConnection: rabbitmq
|
||||||
|
all__InstrumentationKey: ""
|
||||||
|
all__EnableLoadTest: "False"
|
||||||
|
all__UseAzureServiceBus: "False"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ if ($buildImages) {
|
|||||||
docker-compose -p .. -f ../docker-compose.yml build
|
docker-compose -p .. -f ../docker-compose.yml build
|
||||||
|
|
||||||
Write-Host "Pushing images to $registry/$dockerOrg..." -ForegroundColor Yellow
|
Write-Host "Pushing images to $registry/$dockerOrg..." -ForegroundColor Yellow
|
||||||
$services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "ordering.backgroundtasks", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus")
|
$services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus", "ocelotapigw", "mobileshoppingagg", "webshoppingagg")
|
||||||
|
|
||||||
foreach ($service in $services) {
|
foreach ($service in $services) {
|
||||||
$imageFqdn = if ($useDockerHub) {"$dockerOrg/${service}"} else {"$registry/$dockerOrg/${service}"}
|
$imageFqdn = if ($useDockerHub) {"$dockerOrg/${service}"} else {"$registry/$dockerOrg/${service}"}
|
||||||
@ -103,8 +103,10 @@ if (-not [string]::IsNullOrEmpty($dockerUser)) {
|
|||||||
Write-Host "Removing existing services & deployments.." -ForegroundColor Yellow
|
Write-Host "Removing existing services & deployments.." -ForegroundColor Yellow
|
||||||
ExecKube -cmd 'delete deployments --all'
|
ExecKube -cmd 'delete deployments --all'
|
||||||
ExecKube -cmd 'delete services --all'
|
ExecKube -cmd 'delete services --all'
|
||||||
|
ExecKube -cmd 'delete configmap internalurls'
|
||||||
ExecKube -cmd 'delete configmap urls'
|
ExecKube -cmd 'delete configmap urls'
|
||||||
ExecKube -cmd 'delete configmap externalcfg'
|
ExecKube -cmd 'delete configmap externalcfg'
|
||||||
|
ExecKube -cmd 'delete configmap ocelot'
|
||||||
|
|
||||||
# start sql, rabbitmq, frontend deployments
|
# start sql, rabbitmq, frontend deployments
|
||||||
if ($deployInfrastructure) {
|
if ($deployInfrastructure) {
|
||||||
@ -113,48 +115,35 @@ if ($deployInfrastructure) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Write-Host 'Deploying ocelot APIGW' -ForegroundColor Yellow
|
||||||
|
|
||||||
|
ExecKube "create configmap ocelot --from-file=mm=ocelot/configuration-mobile-marketing.json --from-file=ms=ocelot/configuration-mobile-shopping.json --from-file=wm=ocelot/configuration-web-marketing.json --from-file=ws=ocelot/configuration-web-shopping.json "
|
||||||
|
ExecKube -cmd "apply -f ocelot/deployment.yaml"
|
||||||
|
ExecKube -cmd "apply -f ocelot/service.yaml"
|
||||||
|
|
||||||
Write-Host 'Deploying code deployments (Web APIs, Web apps, ...)' -ForegroundColor Yellow
|
Write-Host 'Deploying code deployments (Web APIs, Web apps, ...)' -ForegroundColor Yellow
|
||||||
ExecKube -cmd 'create -f services.yaml'
|
ExecKube -cmd 'create -f services.yaml'
|
||||||
|
|
||||||
|
ExecKube -cmd 'create -f internalurls.yaml'
|
||||||
ExecKube -cmd 'create configmap urls `
|
ExecKube -cmd 'create configmap urls `
|
||||||
--from-literal=BasketUrl=http://basket `
|
--from-literal=PicBaseUrl=http://$($externalDns)/webshoppingapigw/api/v1/c/catalog/items/[0]/pic/ `
|
||||||
--from-literal=BasketHealthCheckUrl=http://basket/hc `
|
--from-literal=Marketing_PicBaseUrl=http://$($externalDns)/webmarketingapigw/api/v1/m/campaigns/[0]/pic/ `
|
||||||
--from-literal=CatalogUrl=http://$($externalDns)/catalog-api `
|
--from-literal=mvc_e=http://$($externalDns)/webmvc `
|
||||||
--from-literal=CatalogHealthCheckUrl=http://catalog/hc `
|
--from-literal=marketingapigw_e=http://$($externalDns)/webmarketingapigw `
|
||||||
--from-literal=PicBaseUrl=http://$($externalDns)/catalog-api/api/v1/catalog/items/[0]/pic/ `
|
--from-literal=webshoppingapigw_e=http://$($externalDns)/webshoppingapigw `
|
||||||
--from-literal=Marketing_PicBaseUrl=http://$($externalDns)/marketing-api/api/v1/campaigns/[0]/pic/ `
|
--from-literal=mobileshoppingagg_e=http://$($externalDns)/mobileshoppingagg `
|
||||||
--from-literal=IdentityUrl=http://$($externalDns)/identity `
|
--from-literal=webshoppingagg_e=http://$($externalDns)/webshoppingagg `
|
||||||
--from-literal=IdentityHealthCheckUrl=http://identity/hc `
|
--from-literal=identity_e=http://$($externalDns)/identity `
|
||||||
--from-literal=OrderingUrl=http://ordering `
|
--from-literal=spa_e=http://$($externalDns) `
|
||||||
--from-literal=OrderingHealthCheckUrl=http://ordering/hc `
|
--from-literal=locations_e=http://$($externalDns)/locations-api `
|
||||||
--from-literal=MvcClientExternalUrl=http://$($externalDns)/webmvc `
|
--from-literal=marketing_e=http://$($externalDns)/marketing-api `
|
||||||
--from-literal=WebMvcHealthCheckUrl=http://webmvc/hc `
|
--from-literal=basket_e=http://$($externalDns)/basket-api `
|
||||||
--from-literal=MvcClientOrderingUrl=http://ordering `
|
--from-literal=ordering_e=http://$($externalDns)/ordering-api `
|
||||||
--from-literal=MvcClientCatalogUrl=http://catalog `
|
--from-literal=xamarin_callback_e=http://$($externalDns)/xamarincallback'
|
||||||
--from-literal=MvcClientBasketUrl=http://basket `
|
|
||||||
--from-literal=MvcClientMarketingUrl=http://marketing `
|
|
||||||
--from-literal=MvcClientLocationsUrl=http://locations `
|
|
||||||
--from-literal=MarketingHealthCheckUrl=http://marketing/hc `
|
|
||||||
--from-literal=WebSpaHealthCheckUrl=http://webspa/hc `
|
|
||||||
--from-literal=SpaClientMarketingExternalUrl=http://$($externalDns)/marketing-api `
|
|
||||||
--from-literal=SpaClientOrderingExternalUrl=http://$($externalDns)/ordering-api `
|
|
||||||
--from-literal=SpaClientCatalogExternalUrl=http://$($externalDns)/catalog-api `
|
|
||||||
--from-literal=SpaClientBasketExternalUrl=http://$($externalDns)/basket-api `
|
|
||||||
--from-literal=SpaClientIdentityExternalUrl=http://$($externalDns)/identity `
|
|
||||||
--from-literal=SpaClientLocationsUrl=http://$($externalDns)/locations-api `
|
|
||||||
--from-literal=LocationsHealthCheckUrl=http://locations/hc `
|
|
||||||
--from-literal=SpaClientExternalUrl=http://$($externalDns) `
|
|
||||||
--from-literal=LocationApiClient=http://$($externalDns)/locations-api `
|
|
||||||
--from-literal=MarketingApiClient=http://$($externalDns)/marketing-api `
|
|
||||||
--from-literal=BasketApiClient=http://$($externalDns)/basket-api `
|
|
||||||
--from-literal=OrderingApiClient=http://$($externalDns)/ordering-api `
|
|
||||||
--from-literal=PaymentHealthCheckUrl=http://payment/hc'
|
|
||||||
|
|
||||||
|
|
||||||
ExecKube -cmd 'label configmap urls app=eshop'
|
ExecKube -cmd 'label configmap urls app=eshop'
|
||||||
|
|
||||||
Write-Host "Deploying configuration from $configFile" -ForegroundColor Yellow
|
Write-Host "Deploying configuration from $configFile" -ForegroundColor Yellow
|
||||||
|
|
||||||
ExecKube -cmd "create -f $configFile"
|
ExecKube -cmd "create -f $configFile"
|
||||||
|
|
||||||
Write-Host "Creating deployments..." -ForegroundColor Yellow
|
Write-Host "Creating deployments..." -ForegroundColor Yellow
|
||||||
@ -178,8 +167,14 @@ ExecKube -cmd 'set image deployments/payment payment=${registryPath}${dockerOrg}
|
|||||||
ExecKube -cmd 'set image deployments/webmvc webmvc=${registryPath}${dockerOrg}/webmvc:$imageTag'
|
ExecKube -cmd 'set image deployments/webmvc webmvc=${registryPath}${dockerOrg}/webmvc:$imageTag'
|
||||||
ExecKube -cmd 'set image deployments/webstatus webstatus=${registryPath}${dockerOrg}/webstatus:$imageTag'
|
ExecKube -cmd 'set image deployments/webstatus webstatus=${registryPath}${dockerOrg}/webstatus:$imageTag'
|
||||||
ExecKube -cmd 'set image deployments/webspa webspa=${registryPath}${dockerOrg}/webspa:$imageTag'
|
ExecKube -cmd 'set image deployments/webspa webspa=${registryPath}${dockerOrg}/webspa:$imageTag'
|
||||||
ExecKube -cmd 'set image deployments/orderingbackground orderingbackground=${registryPath}${dockerOrg}/ordering.backgroundtasks:$imageTag'
|
|
||||||
|
|
||||||
|
ExecKube -cmd 'set image deployments/mobileshoppingagg mobileshoppingagg=${registryPath}${dockerOrg}/mobileshoppingagg:$imageTag'
|
||||||
|
ExecKube -cmd 'set image deployments/webshoppingagg webshoppingagg=${registryPath}${dockerOrg}/webshoppingagg:$imageTag'
|
||||||
|
|
||||||
|
ExecKube -cmd 'set image deployments/apigwmm apigwmm=${registryPath}${dockerOrg}/ocelotapigw:$imageTag'
|
||||||
|
ExecKube -cmd 'set image deployments/apigwms apigwms=${registryPath}${dockerOrg}/ocelotapigw:$imageTag'
|
||||||
|
ExecKube -cmd 'set image deployments/apigwwm apigwwm=${registryPath}${dockerOrg}/ocelotapigw:$imageTag'
|
||||||
|
ExecKube -cmd 'set image deployments/apigwws apigwws=${registryPath}${dockerOrg}/ocelotapigw:$imageTag'
|
||||||
|
|
||||||
Write-Host "Execute rollout..." -ForegroundColor Yellow
|
Write-Host "Execute rollout..." -ForegroundColor Yellow
|
||||||
ExecKube -cmd 'rollout resume deployments/basket'
|
ExecKube -cmd 'rollout resume deployments/basket'
|
||||||
@ -192,7 +187,12 @@ ExecKube -cmd 'rollout resume deployments/payment'
|
|||||||
ExecKube -cmd 'rollout resume deployments/webmvc'
|
ExecKube -cmd 'rollout resume deployments/webmvc'
|
||||||
ExecKube -cmd 'rollout resume deployments/webstatus'
|
ExecKube -cmd 'rollout resume deployments/webstatus'
|
||||||
ExecKube -cmd 'rollout resume deployments/webspa'
|
ExecKube -cmd 'rollout resume deployments/webspa'
|
||||||
ExecKube -cmd 'rollout resume deployments/orderingbackground'
|
ExecKube -cmd 'rollout resume deployments/mobileshoppingagg'
|
||||||
|
ExecKube -cmd 'rollout resume deployments/webshoppingagg'
|
||||||
|
ExecKube -cmd 'rollout resume deployments/apigwmm'
|
||||||
|
ExecKube -cmd 'rollout resume deployments/apigwms'
|
||||||
|
ExecKube -cmd 'rollout resume deployments/apigwwm'
|
||||||
|
ExecKube -cmd 'rollout resume deployments/apigwws'
|
||||||
|
|
||||||
Write-Host "WebSPA is exposed at http://$externalDns, WebMVC at http://$externalDns/webmvc, WebStatus at http://$externalDns/webstatus" -ForegroundColor Yellow
|
Write-Host "WebSPA is exposed at http://$externalDns, WebMVC at http://$externalDns/webmvc, WebStatus at http://$externalDns/webstatus" -ForegroundColor Yellow
|
||||||
|
|
||||||
|
@ -21,32 +21,32 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: BasketRedisConStr
|
key: basket__ConnectionString
|
||||||
- name: EventBusConnection
|
- name: EventBusConnection
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: BasketBus
|
key: all__EventBusConnection
|
||||||
- name: AzureServiceBusEnabled
|
- name: AzureServiceBusEnabled
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: UseAzureServiceBus
|
key: all__UseAzureServiceBus
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: Instrumentation_Key
|
key: all__InstrumentationKey
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: IdentityUrl
|
key: identity_e
|
||||||
- name: UseLoadTest
|
- name: UseLoadTest
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: EnableLoadTest
|
key: all__EnableLoadTest
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
ports:
|
ports:
|
||||||
@ -56,15 +56,8 @@ spec:
|
|||||||
path: /hc
|
path: /hc
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 300
|
||||||
periodSeconds: 60
|
periodSeconds: 240
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /liveness
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 120
|
|
||||||
periodSeconds: 60
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-key
|
- name: registry-key
|
||||||
---
|
---
|
||||||
@ -91,7 +84,7 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: CatalogSqlDb
|
key: catalog__ConnectionString
|
||||||
- name: PicBaseUrl
|
- name: PicBaseUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
@ -101,17 +94,17 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: CatalogAzureStorageEnabled
|
key: catalog__AzureStorageEnabled
|
||||||
- name: EventBusConnection
|
- name: EventBusConnection
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: CatalogBus
|
key: all__EventBusConnection
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: Instrumentation_Key
|
key: all__InstrumentationKey
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
ports:
|
ports:
|
||||||
@ -121,15 +114,8 @@ spec:
|
|||||||
path: /hc
|
path: /hc
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 300
|
||||||
periodSeconds: 60
|
periodSeconds: 240
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /liveness
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 120
|
|
||||||
periodSeconds: 60
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-key
|
- name: registry-key
|
||||||
---
|
---
|
||||||
@ -156,7 +142,7 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: IdentitySqlDb
|
key: identity__ConnectionString
|
||||||
- name: DPConnectionString
|
- name: DPConnectionString
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
@ -168,37 +154,52 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: MvcClientExternalUrl
|
key: mvc_e
|
||||||
- name: SpaClient
|
- name: SpaClient
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: SpaClientExternalUrl
|
key: spa_e
|
||||||
- name: LocationApiClient
|
- name: LocationApiClient
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: LocationApiClient
|
key: locations_e
|
||||||
- name: MarketingApiClient
|
- name: MarketingApiClient
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: MarketingApiClient
|
key: marketing_e
|
||||||
- name: BasketApiClient
|
- name: BasketApiClient
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: BasketApiClient
|
key: basket_e
|
||||||
- name: OrderingApiClient
|
- name: OrderingApiClient
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: OrderingApiClient
|
key: ordering_e
|
||||||
|
- name: MobileShoppingAggClient
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: urls
|
||||||
|
key: mobileshoppingagg_e
|
||||||
|
- name: WebShoppingAggClient
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: urls
|
||||||
|
key: webshoppingagg_e
|
||||||
|
- name: XamarinCallback
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: urls
|
||||||
|
key: xamarin_callback_e
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: Instrumentation_Key
|
key: all__InstrumentationKey
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
ports:
|
ports:
|
||||||
@ -208,15 +209,8 @@ spec:
|
|||||||
path: /hc
|
path: /hc
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 300
|
||||||
periodSeconds: 60
|
periodSeconds: 240
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /liveness
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 120
|
|
||||||
periodSeconds: 60
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-key
|
- name: registry-key
|
||||||
---
|
---
|
||||||
@ -243,107 +237,42 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: OrderingSqlDb
|
key: ordering__ConnectionString
|
||||||
- name: EventBusConnection
|
- name: EventBusConnection
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: OrderingBus
|
key: all__EventBusConnection
|
||||||
- name: AzureServiceBusEnabled
|
- name: AzureServiceBusEnabled
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: UseAzureServiceBus
|
key: all__UseAzureServiceBus
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: IdentityUrl
|
key: identity_e
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: externalcfg
|
|
||||||
key: Instrumentation_Key
|
|
||||||
- name: UseLoadTest
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: externalcfg
|
|
||||||
key: EnableLoadTest
|
|
||||||
- name: OrchestratorType
|
|
||||||
value: 'K8S'
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /hc
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 60
|
|
||||||
periodSeconds: 60
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /liveness
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 120
|
|
||||||
periodSeconds: 60
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: registry-key
|
|
||||||
---
|
|
||||||
apiVersion: extensions/v1beta1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: orderingbackground
|
|
||||||
spec:
|
|
||||||
paused: true
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: eshop
|
|
||||||
component: orderingbackground
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: orderingbackground
|
|
||||||
image: eshop/ordering.backgroundtasks
|
|
||||||
imagePullPolicy: Always
|
|
||||||
env:
|
|
||||||
- name: PATH_BASE
|
|
||||||
value: /ordering-backgroundtasks
|
|
||||||
- name: ConnectionString
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: externalcfg
|
|
||||||
key: OrderingSqlDb
|
|
||||||
- name: EventBusConnection
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: externalcfg
|
|
||||||
key: OrderingBus
|
|
||||||
- name: AzureServiceBusEnabled
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: externalcfg
|
|
||||||
key: UseAzureServiceBus
|
|
||||||
- name: CheckUpdateTime
|
- name: CheckUpdateTime
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: GracePeriodManager_CheckUpdateTime
|
key: GracePeriodManager__CheckUpdateTime
|
||||||
- name: GracePeriodTime
|
- name: GracePeriodTime
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: GracePeriodManager_GracePeriodTime
|
key: GracePeriodManager__GracePeriodTime
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: Instrumentation_Key
|
key: all__InstrumentationKey
|
||||||
- name: UseLoadTest
|
- name: UseLoadTest
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: EnableLoadTest
|
key: all__EnableLoadTest
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
ports:
|
ports:
|
||||||
@ -353,15 +282,8 @@ spec:
|
|||||||
path: /hc
|
path: /hc
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 300
|
||||||
periodSeconds: 60
|
periodSeconds: 240
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /liveness
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 120
|
|
||||||
periodSeconds: 60
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-key
|
- name: registry-key
|
||||||
---
|
---
|
||||||
@ -388,42 +310,42 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: LocationsNoSqlDb
|
key: locations__ConnectionString
|
||||||
- name: Database
|
- name: Database
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: LocationsNoSqlDbName
|
key: locations__Database
|
||||||
- name: AzureServiceBusEnabled
|
- name: AzureServiceBusEnabled
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: UseAzureServiceBus
|
key: all__UseAzureServiceBus
|
||||||
- name: EventBusConnection
|
- name: EventBusConnection
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: LocationsBus
|
key: all__EventBusConnection
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: IdentityUrl
|
key: identity
|
||||||
- name: IdentityUrlExternal
|
- name: IdentityUrlExternal
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: IdentityUrl
|
key: identity_e
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: Instrumentation_Key
|
key: all__InstrumentationKey
|
||||||
- name: UseLoadTest
|
- name: UseLoadTest
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: EnableLoadTest
|
key: all__EnableLoadTest
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
ports:
|
ports:
|
||||||
@ -433,15 +355,8 @@ spec:
|
|||||||
path: /hc
|
path: /hc
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 50
|
initialDelaySeconds: 300
|
||||||
periodSeconds: 60
|
periodSeconds: 240
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /liveness
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 120
|
|
||||||
periodSeconds: 60
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-key
|
- name: registry-key
|
||||||
---
|
---
|
||||||
@ -468,37 +383,37 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: MarketingSqlDb
|
key: marketing__ConnectionString
|
||||||
- name: MongoConnectionString
|
- name: MongoConnectionString
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: MarketingNoSqlDb
|
key: marketing__MongoConnectionString
|
||||||
- name: MongoDatabase
|
- name: MongoDatabase
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: MarketingNoSqlDbName
|
key: marketing__MongoDatabase
|
||||||
- name: AzureServiceBusEnabled
|
- name: AzureServiceBusEnabled
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: UseAzureServiceBus
|
key: all__UseAzureServiceBus
|
||||||
- name: EventBusConnection
|
- name: EventBusConnection
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: MarketingBus
|
key: all__EventBusConnection
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: IdentityUrl
|
key: identity
|
||||||
- name: IdentityUrlExternal
|
- name: IdentityUrlExternal
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: IdentityUrl
|
key: identity_e
|
||||||
- name: PicBaseUrl
|
- name: PicBaseUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
@ -508,12 +423,12 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: Instrumentation_Key
|
key: all__InstrumentationKey
|
||||||
- name: UseLoadTest
|
- name: UseLoadTest
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: EnableLoadTest
|
key: all__EnableLoadTest
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
ports:
|
ports:
|
||||||
@ -523,15 +438,8 @@ spec:
|
|||||||
path: /hc
|
path: /hc
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 300
|
||||||
periodSeconds: 60
|
periodSeconds: 240
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /liveness
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 120
|
|
||||||
periodSeconds: 60
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-key
|
- name: registry-key
|
||||||
---
|
---
|
||||||
@ -558,17 +466,17 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: UseAzureServiceBus
|
key: all__UseAzureServiceBus
|
||||||
- name: EventBusConnection
|
- name: EventBusConnection
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: PaymentBus
|
key: all__EventBusConnection
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: Instrumentation_Key
|
key: all__InstrumentationKey
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
ports:
|
ports:
|
||||||
@ -578,15 +486,8 @@ spec:
|
|||||||
path: /hc
|
path: /hc
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 300
|
||||||
periodSeconds: 60
|
periodSeconds: 240
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /liveness
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 120
|
|
||||||
periodSeconds: 60
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-key
|
- name: registry-key
|
||||||
---
|
---
|
||||||
@ -616,81 +517,66 @@ spec:
|
|||||||
key: keystore
|
key: keystore
|
||||||
- name: IsClusterEnv
|
- name: IsClusterEnv
|
||||||
value: 'True'
|
value: 'True'
|
||||||
- name: BasketUrl
|
- name: PurchaseUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: MvcClientBasketUrl
|
key: apigwws
|
||||||
- name: CallBackUrl
|
- name: CallBackUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: MvcClientExternalUrl
|
key: mvc_e
|
||||||
- name: LocationsUrl
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: urls
|
|
||||||
key: MvcClientLocationsUrl
|
|
||||||
- name: CatalogUrl
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: urls
|
|
||||||
key: MvcClientCatalogUrl
|
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: IdentityUrl
|
key: identity_e
|
||||||
- name: OrderingUrl
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: urls
|
|
||||||
key: MvcClientOrderingUrl
|
|
||||||
- name: MarketingUrl
|
- name: MarketingUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: MvcClientMarketingUrl
|
key: apigwwm
|
||||||
- name: BasketUrlHC
|
- name: BasketUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: BasketHealthCheckUrl
|
key: basket__hc
|
||||||
- name: CatalogUrlHC
|
- name: CatalogUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: CatalogHealthCheckUrl
|
key: catalog__hc
|
||||||
- name: IdentityUrlHC
|
- name: IdentityUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: IdentityHealthCheckUrl
|
key: identity__hc
|
||||||
- name: OrderingUrlHC
|
- name: OrderingUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: OrderingHealthCheckUrl
|
key: ordering__hc
|
||||||
- name: MarketingUrlHC
|
- name: MarketingUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: MarketingHealthCheckUrl
|
key: marketing__hc
|
||||||
- name: PaymentUrlHC
|
- name: PaymentUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: PaymentHealthCheckUrl
|
key: payment__hc
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: Instrumentation_Key
|
key: all__InstrumentationKey
|
||||||
- name: UseLoadTest
|
- name: UseLoadTest
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: EnableLoadTest
|
key: all__EnableLoadTest
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
ports:
|
ports:
|
||||||
@ -700,15 +586,8 @@ spec:
|
|||||||
path: /hc
|
path: /hc
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 300
|
||||||
periodSeconds: 60
|
periodSeconds: 240
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /liveness
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 120
|
|
||||||
periodSeconds: 60
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-key
|
- name: registry-key
|
||||||
---
|
---
|
||||||
@ -734,53 +613,53 @@ spec:
|
|||||||
- name: BasketUrl
|
- name: BasketUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: BasketHealthCheckUrl
|
key: basket__hc
|
||||||
- name: CatalogUrl
|
- name: CatalogUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: CatalogHealthCheckUrl
|
key: catalog__hc
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: IdentityHealthCheckUrl
|
key: identity__hc
|
||||||
- name: OrderingUrl
|
- name: OrderingUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: OrderingHealthCheckUrl
|
key: ordering__hc
|
||||||
- name: LocationsUrl
|
- name: LocationsUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: LocationsHealthCheckUrl
|
key: locations__hc
|
||||||
- name: MarketingUrl
|
- name: MarketingUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: MarketingHealthCheckUrl
|
key: marketing__hc
|
||||||
- name: mvc
|
- name: mvc
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: WebMvcHealthCheckUrl
|
key: mvc__hc
|
||||||
- name: spa
|
- name: spa
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: WebSpaHealthCheckUrl
|
key: spa__hc
|
||||||
- name: PaymentUrl
|
- name: PaymentUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: PaymentHealthCheckUrl
|
key: payment__hc
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: Instrumentation_Key
|
key: all__InstrumentationKey
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
ports:
|
ports:
|
||||||
@ -814,76 +693,61 @@ spec:
|
|||||||
key: keystore
|
key: keystore
|
||||||
- name: IsClusterEnv
|
- name: IsClusterEnv
|
||||||
value: 'True'
|
value: 'True'
|
||||||
- name: BasketUrl
|
- name: PurchaseUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: SpaClientBasketExternalUrl
|
key: webshoppingapigw_e
|
||||||
- name: CallBackUrl
|
- name: CallBackUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: SpaClientExternalUrl
|
key: spa_e
|
||||||
- name: CatalogUrl
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: urls
|
|
||||||
key: SpaClientCatalogExternalUrl
|
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: SpaClientIdentityExternalUrl
|
key: identity_e
|
||||||
- name: OrderingUrl
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: urls
|
|
||||||
key: SpaClientOrderingExternalUrl
|
|
||||||
- name: MarketingUrl
|
- name: MarketingUrl
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: urls
|
||||||
key: SpaClientMarketingExternalUrl
|
key: marketingapigw_e
|
||||||
- name: LocationsUrl
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: urls
|
|
||||||
key: SpaClientLocationsUrl
|
|
||||||
- name: BasketUrlHC
|
- name: BasketUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: BasketHealthCheckUrl
|
key: basket__hc
|
||||||
- name: CatalogUrlHC
|
- name: CatalogUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: CatalogHealthCheckUrl
|
key: catalog__hc
|
||||||
- name: IdentityUrlHC
|
- name: IdentityUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: IdentityHealthCheckUrl
|
key: identity__hc
|
||||||
- name: OrderingUrlHC
|
- name: OrderingUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: OrderingHealthCheckUrl
|
key: ordering__hc
|
||||||
- name: MarketingUrlHC
|
- name: MarketingUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: MarketingHealthCheckUrl
|
key: marketing__hc
|
||||||
- name: PaymentUrlHC
|
- name: PaymentUrlHC
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: urls
|
name: internalurls
|
||||||
key: PaymentHealthCheckUrl
|
key: payment__hc
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: externalcfg
|
name: externalcfg
|
||||||
key: Instrumentation_Key
|
key: all__InstrumentationKey
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
ports:
|
ports:
|
||||||
@ -893,14 +757,96 @@ spec:
|
|||||||
path: /hc
|
path: /hc
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 300
|
||||||
periodSeconds: 60
|
periodSeconds: 240
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /liveness
|
|
||||||
port: 80
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 120
|
|
||||||
periodSeconds: 60
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-key
|
- name: registry-key
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: webshoppingagg
|
||||||
|
spec:
|
||||||
|
paused: true
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: webshoppingagg
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: webshoppingagg
|
||||||
|
image: eshop/webshoppingagg
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: ASPNETCORE_URLS
|
||||||
|
value: http://0.0.0.0:80
|
||||||
|
- name: urls__basket
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: basket
|
||||||
|
- name: urls__catalog
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: catalog
|
||||||
|
- name: urls__orders
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: ordering
|
||||||
|
- name: urls__identity
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: identity
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: registry-key
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mobileshoppingagg
|
||||||
|
spec:
|
||||||
|
paused: true
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: mobileshoppingagg
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mobileshoppingagg
|
||||||
|
image: eshop/mobileshoppingagg
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: ASPNETCORE_URLS
|
||||||
|
value: http://0.0.0.0:80
|
||||||
|
- name: urls__basket
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: basket
|
||||||
|
- name: urls__catalog
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: catalog
|
||||||
|
- name: urls__orders
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: ordering
|
||||||
|
- name: urls__identity
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: identity
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: registry-key
|
||||||
|
---
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: eshop
|
|
||||||
component: frontend
|
|
||||||
name: frontend
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: 8080
|
|
||||||
selector:
|
|
||||||
app: eshop
|
|
||||||
component: frontend
|
|
||||||
type: LoadBalancer
|
|
||||||
---
|
|
||||||
apiVersion: extensions/v1beta1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: frontend
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: eshop
|
|
||||||
component: frontend
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx
|
|
||||||
image: nginx:1.13.8-alpine
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
ports:
|
|
||||||
- containerPort: 8080
|
|
||||||
lifecycle:
|
|
||||||
preStop:
|
|
||||||
exec:
|
|
||||||
command: ["/usr/sbin/nginx","-s","quit"]
|
|
||||||
volumeMounts:
|
|
||||||
- name: config
|
|
||||||
mountPath: /etc/nginx
|
|
||||||
volumes:
|
|
||||||
- name: config
|
|
||||||
configMap:
|
|
||||||
name: config-files
|
|
||||||
items:
|
|
||||||
- key: nginx-conf
|
|
||||||
path: nginx.conf
|
|
@ -3,11 +3,9 @@
|
|||||||
[parameter(Mandatory=$true)][string]$location,
|
[parameter(Mandatory=$true)][string]$location,
|
||||||
[parameter(Mandatory=$false)][string]$registryName,
|
[parameter(Mandatory=$false)][string]$registryName,
|
||||||
[parameter(Mandatory=$true)][string]$serviceName,
|
[parameter(Mandatory=$true)][string]$serviceName,
|
||||||
[parameter(Mandatory=$true)][string]$dnsName,
|
|
||||||
[parameter(Mandatory=$true)][string]$createAcr=$true,
|
[parameter(Mandatory=$true)][string]$createAcr=$true,
|
||||||
[parameter(Mandatory=$false)][int]$nodeCount=2,
|
[parameter(Mandatory=$false)][int]$nodeCount=3,
|
||||||
[parameter(Mandatory=$false)][string]$nodeVMSize="Standard_D2_v2",
|
[parameter(Mandatory=$false)][string]$nodeVMSize="Standard_D2_v2"
|
||||||
[parameter(Mandatory=$false)][string]$kubernetesVersion="1.7.7"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create resource group
|
# Create resource group
|
||||||
@ -22,7 +20,7 @@ if ($createAcr -eq $true) {
|
|||||||
|
|
||||||
# Create kubernetes orchestrator
|
# Create kubernetes orchestrator
|
||||||
Write-Host "Creating kubernetes orchestrator..." -ForegroundColor Yellow
|
Write-Host "Creating kubernetes orchestrator..." -ForegroundColor Yellow
|
||||||
az aks create --resource-group=$resourceGroupName --name=$serviceName --dns-name-prefix=$dnsName --generate-ssh-keys --node-count=$nodeCount --node-vm-size=$nodeVMSize --kubernetes-version $kubernetesVersion
|
az aks create --resource-group=$resourceGroupName --name=$serviceName --generate-ssh-keys --node-count=$nodeCount --node-vm-size=$nodeVMSize
|
||||||
|
|
||||||
# Retrieve kubernetes cluster configuration and save it under ~/.kube/config
|
# Retrieve kubernetes cluster configuration and save it under ~/.kube/config
|
||||||
az aks get-credentials --resource-group=$resourceGroupName --name=$serviceName
|
az aks get-credentials --resource-group=$resourceGroupName --name=$serviceName
|
||||||
|
@ -11,22 +11,10 @@ spec:
|
|||||||
rules:
|
rules:
|
||||||
- http:
|
- http:
|
||||||
paths:
|
paths:
|
||||||
- path: /basket-api
|
|
||||||
backend:
|
|
||||||
serviceName: basket
|
|
||||||
servicePort: 80
|
|
||||||
- path: /catalog-api
|
|
||||||
backend:
|
|
||||||
serviceName: catalog
|
|
||||||
servicePort: 80
|
|
||||||
- path: /identity
|
- path: /identity
|
||||||
backend:
|
backend:
|
||||||
serviceName: identity
|
serviceName: identity
|
||||||
servicePort: 80
|
servicePort: 80
|
||||||
- path: /ordering-api
|
|
||||||
backend:
|
|
||||||
serviceName: ordering
|
|
||||||
servicePort: 80
|
|
||||||
- path: /webmvc
|
- path: /webmvc
|
||||||
backend:
|
backend:
|
||||||
serviceName: webmvc
|
serviceName: webmvc
|
||||||
@ -35,18 +23,34 @@ spec:
|
|||||||
backend:
|
backend:
|
||||||
serviceName: webstatus
|
serviceName: webstatus
|
||||||
servicePort: 80
|
servicePort: 80
|
||||||
- path: /marketing-api
|
- path: /webshoppingapigw
|
||||||
backend:
|
backend:
|
||||||
serviceName: marketing
|
serviceName: ocelotapigw-ws
|
||||||
|
servicePort: 80
|
||||||
|
- path: /webmarketingapigw
|
||||||
|
backend:
|
||||||
|
serviceName: ocelotapigw-wm
|
||||||
|
servicePort: 80
|
||||||
|
- path: /mobilemarketingapigw
|
||||||
|
backend:
|
||||||
|
serviceName: ocelotapigw-mm
|
||||||
|
servicePort: 80
|
||||||
|
- path: /mobileshoppingapigw
|
||||||
|
backend:
|
||||||
|
serviceName: ocelotapigw-ms
|
||||||
|
servicePort: 80
|
||||||
|
- path: /webshoppingagg
|
||||||
|
backend:
|
||||||
|
serviceName: webshoppingagg
|
||||||
|
servicePort: 80
|
||||||
|
- path: /mobileshoppingagg
|
||||||
|
backend:
|
||||||
|
serviceName: mobileshoppingagg
|
||||||
servicePort: 80
|
servicePort: 80
|
||||||
- path: /payment-api
|
- path: /payment-api
|
||||||
backend:
|
backend:
|
||||||
serviceName: payment
|
serviceName: payment
|
||||||
servicePort: 80
|
servicePort: 80
|
||||||
- path: /locations-api
|
|
||||||
backend:
|
|
||||||
serviceName: locations
|
|
||||||
servicePort: 80
|
|
||||||
- path: /
|
- path: /
|
||||||
backend:
|
backend:
|
||||||
serviceName: webspa
|
serviceName: webspa
|
||||||
|
31
k8s/internalurls.yaml
Normal file
31
k8s/internalurls.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: internalurls
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
data:
|
||||||
|
# Internal Services & healthchecks
|
||||||
|
basket: http://basket
|
||||||
|
basket__hc: http://basket/hc
|
||||||
|
catalog: http://catalog
|
||||||
|
catalog__hc: http://catalog/hc
|
||||||
|
identity: http://identity
|
||||||
|
identity__hc: http://identity/hc
|
||||||
|
ordering: http://ordering
|
||||||
|
ordering__hc: http://ordering/hc
|
||||||
|
marketing: http://marketing
|
||||||
|
marketing__hc: http://marketing/hc
|
||||||
|
locations: http://locations
|
||||||
|
locations__hc: http://locations/hc
|
||||||
|
payment__hc: http://payment/hc
|
||||||
|
mvc__hc: http://webmvc/hc
|
||||||
|
spa__hc: http://webspa/hc
|
||||||
|
# Aggreggators
|
||||||
|
mobileshoppingagg: http://mobileshoppingagg
|
||||||
|
webshoppingagg: http://webshoppingagg
|
||||||
|
# API GWs
|
||||||
|
apigwmm: http://ocelotapigw-mm
|
||||||
|
apigwms: http://ocelotapigw-ms
|
||||||
|
apigwwm: http://ocelotapigw-wm
|
||||||
|
apigwws: http://ocelotapigw-ws
|
34
k8s/ocelot/configuration-mobile-marketing.json
Normal file
34
k8s/ocelot/configuration-mobile-marketing.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"ReRoutes": [
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "marketing",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/m/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "locations",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/l/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"GlobalConfiguration": {
|
||||||
|
"RequestIdKey": "OcRequestId",
|
||||||
|
"AdministrationPath": "/administration"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
142
k8s/ocelot/configuration-mobile-shopping.json
Normal file
142
k8s/ocelot/configuration-mobile-shopping.json
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
{
|
||||||
|
"ReRoutes": [
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "catalog",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/c/{everything}",
|
||||||
|
"UpstreamHttpMethod": [ "GET" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "basket",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/b/{everything}",
|
||||||
|
"UpstreamHttpMethod": [],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "ordering",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/o/{everything}",
|
||||||
|
"UpstreamHttpMethod": [],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "mobileshoppingagg",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/{everything}",
|
||||||
|
"UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "ordering",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/orders-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "basket",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/basket-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "catalog",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/catalog-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "marketing",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/marketing-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "payment",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/payment-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "locations.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/location-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"GlobalConfiguration": {
|
||||||
|
"RequestIdKey": "OcRequestId",
|
||||||
|
"AdministrationPath": "/administration"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
34
k8s/ocelot/configuration-web-marketing.json
Normal file
34
k8s/ocelot/configuration-web-marketing.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"ReRoutes": [
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "marketing",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/m/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "locations",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/l/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"GlobalConfiguration": {
|
||||||
|
"RequestIdKey": "OcRequestId",
|
||||||
|
"AdministrationPath": "/administration"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
142
k8s/ocelot/configuration-web-shopping.json
Normal file
142
k8s/ocelot/configuration-web-shopping.json
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
{
|
||||||
|
"ReRoutes": [
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "catalog",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/c/{everything}",
|
||||||
|
"UpstreamHttpMethod": [ "GET" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "basket",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/b/{everything}",
|
||||||
|
"UpstreamHttpMethod": [],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "ordering",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/o/{everything}",
|
||||||
|
"UpstreamHttpMethod": [],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "webshoppingagg",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/{everything}",
|
||||||
|
"UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "ordering",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/orders-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "basket",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/basket-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "catalog",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/catalog-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "marketing",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/marketing-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "payment",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/payment-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "locations.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/location-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"GlobalConfiguration": {
|
||||||
|
"RequestIdKey": "OcRequestId",
|
||||||
|
"AdministrationPath": "/administration"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
155
k8s/ocelot/deployment.yaml
Normal file
155
k8s/ocelot/deployment.yaml
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: apigwmm
|
||||||
|
spec:
|
||||||
|
paused: true
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: apigwmm
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: apigwmm
|
||||||
|
image: eshop/ocelotapigw
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: PATH_BASE
|
||||||
|
value: /mobilemarketingapigw
|
||||||
|
- name: IdentityUrl
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: identity
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /app/configuration
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: ocelot
|
||||||
|
items:
|
||||||
|
- key: mm
|
||||||
|
path: configuration.json
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: registry-key
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: apigwms
|
||||||
|
spec:
|
||||||
|
paused: true
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: apigwms
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: apigwms
|
||||||
|
image: eshop/ocelotapigw
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: PATH_BASE
|
||||||
|
value: /mobileshoppingapigw
|
||||||
|
- name: IdentityUrl
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: identity
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /app/configuration
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: ocelot
|
||||||
|
items:
|
||||||
|
- key: ms
|
||||||
|
path: configuration.json
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: registry-key
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: apigwwm
|
||||||
|
spec:
|
||||||
|
paused: true
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: apigwwm
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: apigwwm
|
||||||
|
image: eshop/ocelotapigw
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: PATH_BASE
|
||||||
|
value: /webmarketingapigw
|
||||||
|
- name: IdentityUrl
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: identity
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /app/configuration
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: ocelot
|
||||||
|
items:
|
||||||
|
- key: wm
|
||||||
|
path: configuration.json
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: registry-key
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: apigwws
|
||||||
|
spec:
|
||||||
|
paused: true
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: apigwws
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: apigwws
|
||||||
|
image: eshop/ocelotapigw
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: PATH_BASE
|
||||||
|
value: /webshoppingapigw
|
||||||
|
- name: IdentityUrl
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: internalurls
|
||||||
|
key: identity
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /app/configuration
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: ocelot
|
||||||
|
items:
|
||||||
|
- key: ws
|
||||||
|
path: configuration.json
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: registry-key
|
55
k8s/ocelot/service.yaml
Normal file
55
k8s/ocelot/service.yaml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: ocelotapigw-mm
|
||||||
|
name: ocelotapigw-mm
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
selector:
|
||||||
|
app: eshop
|
||||||
|
component: apigwmm
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: ocelotapigw-ms
|
||||||
|
name: ocelotapigw-ms
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
selector:
|
||||||
|
app: eshop
|
||||||
|
component: apigwms
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: ocelotapigw-wm
|
||||||
|
name: ocelotapigw-wm
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
selector:
|
||||||
|
app: eshop
|
||||||
|
component: apigwwm
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: ocelotapigw-ws
|
||||||
|
name: ocelotapigw-ws
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
selector:
|
||||||
|
app: eshop
|
||||||
|
component: apigwws
|
@ -112,6 +112,34 @@ spec:
|
|||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: webshoppingagg
|
||||||
|
name: webshoppingagg
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
selector:
|
||||||
|
app: eshop
|
||||||
|
component: webshoppingagg
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eshop
|
||||||
|
component: mobileshoppingagg
|
||||||
|
name: mobileshoppingagg
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
selector:
|
||||||
|
app: eshop
|
||||||
|
component: mobileshoppingagg
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: eshop
|
app: eshop
|
||||||
|
19
src/ApiGateways/ApiGw-Base/Dockerfile
Normal file
19
src/ApiGateways/ApiGw-Base/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
FROM microsoft/aspnetcore:2.0 AS base
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||||
|
WORKDIR /src
|
||||||
|
COPY src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj src/ApiGateways/ApiGw-Base/
|
||||||
|
RUN dotnet restore src/ApiGateways/ApiGw-Base/
|
||||||
|
COPY . .
|
||||||
|
WORKDIR /src/src/ApiGateways/ApiGw-Base/
|
||||||
|
RUN dotnet build -c Release -o /app
|
||||||
|
|
||||||
|
FROM build AS publish
|
||||||
|
RUN dotnet publish -c Release -o /app
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app .
|
||||||
|
ENTRYPOINT ["dotnet", "OcelotApiGw.dll"]
|
16
src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj
Normal file
16
src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="wwwroot\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||||
|
<PackageReference Include="Ocelot" Version="3.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
31
src/ApiGateways/ApiGw-Base/Program.cs
Normal file
31
src/ApiGateways/ApiGw-Base/Program.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
namespace OcelotApiGw
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
BuildWebHost(args).Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IWebHost BuildWebHost(string[] args)
|
||||||
|
{
|
||||||
|
var builder = WebHost.CreateDefaultBuilder(args);
|
||||||
|
builder.ConfigureServices(s => s.AddSingleton(builder))
|
||||||
|
.ConfigureAppConfiguration(ic => ic.AddJsonFile(Path.Combine("configuration", "configuration.json")))
|
||||||
|
.UseStartup<Startup>();
|
||||||
|
var host = builder.Build();
|
||||||
|
return host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
27
src/ApiGateways/ApiGw-Base/Properties/launchSettings.json
Normal file
27
src/ApiGateways/ApiGw-Base/Properties/launchSettings.json
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:56755/",
|
||||||
|
"sslPort": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"OcelotApiGw": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "http://localhost:64021/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
91
src/ApiGateways/ApiGw-Base/Startup.cs
Normal file
91
src/ApiGateways/ApiGw-Base/Startup.cs
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using CacheManager.Core;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Ocelot.DependencyInjection;
|
||||||
|
using Ocelot.Middleware;
|
||||||
|
|
||||||
|
namespace OcelotApiGw
|
||||||
|
{
|
||||||
|
public class Startup
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IConfiguration _cfg;
|
||||||
|
|
||||||
|
public Startup(IConfiguration configuration)
|
||||||
|
{
|
||||||
|
_cfg = configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ConfigureServices(IServiceCollection services)
|
||||||
|
{
|
||||||
|
var identityUrl = _cfg.GetValue<string>("IdentityUrl");
|
||||||
|
var authenticationProviderKey = "IdentityApiKey";
|
||||||
|
|
||||||
|
services.AddCors(options =>
|
||||||
|
{
|
||||||
|
options.AddPolicy("CorsPolicy",
|
||||||
|
builder => builder.AllowAnyOrigin()
|
||||||
|
.AllowAnyMethod()
|
||||||
|
.AllowAnyHeader()
|
||||||
|
.AllowCredentials());
|
||||||
|
});
|
||||||
|
|
||||||
|
services.AddAuthentication()
|
||||||
|
.AddJwtBearer(authenticationProviderKey, x =>
|
||||||
|
{
|
||||||
|
x.Authority = identityUrl;
|
||||||
|
x.RequireHttpsMetadata = false;
|
||||||
|
x.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters()
|
||||||
|
{
|
||||||
|
ValidAudiences = new[] { "orders", "basket", "locations", "marketing", "mobileshoppingagg", "webshoppingagg" }
|
||||||
|
};
|
||||||
|
x.Events = new Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerEvents()
|
||||||
|
{
|
||||||
|
OnAuthenticationFailed = async ctx =>
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
},
|
||||||
|
OnTokenValidated = async ctx =>
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
OnMessageReceived = async ctx =>
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
services.AddOcelot(_cfg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||||
|
{
|
||||||
|
var pathBase = _cfg["PATH_BASE"];
|
||||||
|
if (!string.IsNullOrEmpty(pathBase))
|
||||||
|
{
|
||||||
|
app.UsePathBase(pathBase);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (env.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseDeveloperExceptionPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
loggerFactory.AddConsole(_cfg.GetSection("Logging"));
|
||||||
|
|
||||||
|
app.UseCors("CorsPolicy");
|
||||||
|
|
||||||
|
app.UseOcelot().Wait();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
src/ApiGateways/ApiGw-Base/appsettings.json
Normal file
10
src/ApiGateways/ApiGw-Base/appsettings.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"IncludeScopes": true,
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Trace",
|
||||||
|
"System": "Information",
|
||||||
|
"Microsoft": "Information"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"ReRoutes": [
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "marketing.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/m/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "locations.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/l/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"GlobalConfiguration": {
|
||||||
|
"RequestIdKey": "OcRequestId",
|
||||||
|
"AdministrationPath": "/administration"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config
|
||||||
|
{
|
||||||
|
public class UrlsConfig
|
||||||
|
{
|
||||||
|
public class CatalogOperations
|
||||||
|
{
|
||||||
|
public static string GetItemById(int id) => $"/api/v1/catalog/items/{id}";
|
||||||
|
public static string GetItemsById(IEnumerable<int> ids) => $"/api/v1/catalog/items?ids={string.Join(',', ids)}";
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BasketOperations
|
||||||
|
{
|
||||||
|
public static string GetItemById(string id) => $"/api/v1/basket/{id}";
|
||||||
|
public static string UpdateBasket() => "/api/v1/basket";
|
||||||
|
}
|
||||||
|
|
||||||
|
public class OrdersOperations
|
||||||
|
{
|
||||||
|
public static string GetOrderDraft() => "/api/v1/orders/draft";
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Basket { get; set; }
|
||||||
|
public string Catalog { get; set; }
|
||||||
|
public string Orders { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,133 @@
|
|||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers
|
||||||
|
{
|
||||||
|
[Route("api/v1/[controller]")]
|
||||||
|
[Authorize]
|
||||||
|
public class BasketController : Controller
|
||||||
|
{
|
||||||
|
private readonly ICatalogService _catalog;
|
||||||
|
private readonly IBasketService _basket;
|
||||||
|
public BasketController(ICatalogService catalogService, IBasketService basketService)
|
||||||
|
{
|
||||||
|
_catalog = catalogService;
|
||||||
|
_basket = basketService;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[HttpPut]
|
||||||
|
public async Task<IActionResult> UpdateAllBasket([FromBody] UpdateBasketRequest data)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (data.Items == null || !data.Items.Any())
|
||||||
|
{
|
||||||
|
return BadRequest("Need to pass at least one basket line");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the current basket
|
||||||
|
var currentBasket = await _basket.GetById(data.BuyerId);
|
||||||
|
if (currentBasket == null)
|
||||||
|
{
|
||||||
|
currentBasket = new BasketData(data.BuyerId);
|
||||||
|
}
|
||||||
|
|
||||||
|
var catalogItems = await _catalog.GetCatalogItems(data.Items.Select(x => x.ProductId));
|
||||||
|
var newBasket = new BasketData(data.BuyerId);
|
||||||
|
|
||||||
|
foreach (var bitem in data.Items)
|
||||||
|
{
|
||||||
|
var catalogItem = catalogItems.SingleOrDefault(ci => ci.Id == bitem.ProductId);
|
||||||
|
if (catalogItem == null)
|
||||||
|
{
|
||||||
|
return BadRequest($"Basket refers to a non-existing catalog item ({bitem.ProductId})");
|
||||||
|
}
|
||||||
|
|
||||||
|
newBasket.Items.Add(new BasketDataItem()
|
||||||
|
{
|
||||||
|
Id = bitem.Id,
|
||||||
|
ProductId = catalogItem.Id.ToString(),
|
||||||
|
ProductName = catalogItem.Name,
|
||||||
|
PictureUrl = catalogItem.PictureUri,
|
||||||
|
UnitPrice = catalogItem.Price,
|
||||||
|
Quantity = bitem.Quantity
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
await _basket.Update(newBasket);
|
||||||
|
return Ok(newBasket);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPut]
|
||||||
|
[Route("items")]
|
||||||
|
public async Task<IActionResult> UpdateQuantities([FromBody] UpdateBasketItemsRequest data)
|
||||||
|
{
|
||||||
|
if (!data.Updates.Any())
|
||||||
|
{
|
||||||
|
return BadRequest("No updates sent");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the current basket
|
||||||
|
var currentBasket = await _basket.GetById(data.BasketId);
|
||||||
|
if (currentBasket == null)
|
||||||
|
{
|
||||||
|
return BadRequest($"Basket with id {data.BasketId} not found.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update with new quantities
|
||||||
|
foreach (var update in data.Updates)
|
||||||
|
{
|
||||||
|
var basketItem = currentBasket.Items.SingleOrDefault(bitem => bitem.Id == update.BasketItemId);
|
||||||
|
if (basketItem == null)
|
||||||
|
{
|
||||||
|
return BadRequest($"Basket item with id {update.BasketItemId} not found");
|
||||||
|
}
|
||||||
|
basketItem.Quantity = update.NewQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Save the updated basket
|
||||||
|
await _basket.Update(currentBasket);
|
||||||
|
return Ok(currentBasket);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[Route("items")]
|
||||||
|
public async Task<IActionResult> AddBasketItem([FromBody] AddBasketItemRequest data)
|
||||||
|
{
|
||||||
|
if (data == null || data.Quantity == 0)
|
||||||
|
{
|
||||||
|
return BadRequest("Invalid payload");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 1: Get the item from catalog
|
||||||
|
var item = await _catalog.GetCatalogItem(data.CatalogItemId);
|
||||||
|
|
||||||
|
//item.PictureUri =
|
||||||
|
|
||||||
|
// Step 2: Get current basket status
|
||||||
|
var currentBasket = (await _basket.GetById(data.BasketId)) ?? new BasketData(data.BasketId);
|
||||||
|
// Step 3: Merge current status with new product
|
||||||
|
currentBasket.Items.Add(new BasketDataItem()
|
||||||
|
{
|
||||||
|
UnitPrice = item.Price,
|
||||||
|
PictureUrl = item.PictureUri,
|
||||||
|
ProductId = item.Id.ToString(),
|
||||||
|
ProductName = item.Name,
|
||||||
|
Quantity = data.Quantity,
|
||||||
|
Id = Guid.NewGuid().ToString()
|
||||||
|
});
|
||||||
|
|
||||||
|
// Step 4: Update basket
|
||||||
|
await _basket.Update(currentBasket);
|
||||||
|
|
||||||
|
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers
|
||||||
|
{
|
||||||
|
[Route("")]
|
||||||
|
public class HomeController : Controller
|
||||||
|
{
|
||||||
|
[HttpGet()]
|
||||||
|
public IActionResult Index()
|
||||||
|
{
|
||||||
|
return new RedirectResult("~/swagger");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers
|
||||||
|
{
|
||||||
|
[Route("api/v1/[controller]")]
|
||||||
|
[Authorize]
|
||||||
|
public class OrderController : Controller
|
||||||
|
{
|
||||||
|
private readonly IBasketService _basketService;
|
||||||
|
private readonly IOrderApiClient _orderClient;
|
||||||
|
public OrderController(IBasketService basketService, IOrderApiClient orderClient)
|
||||||
|
{
|
||||||
|
_basketService = basketService;
|
||||||
|
_orderClient = orderClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Route("draft/{basketId}")]
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IActionResult> GetOrderDraft(string basketId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(basketId))
|
||||||
|
{
|
||||||
|
return BadRequest("Need a valid basketid");
|
||||||
|
}
|
||||||
|
// Get the basket data and build a order draft based on it
|
||||||
|
var basket = await _basketService.GetById(basketId);
|
||||||
|
if (basket == null)
|
||||||
|
{
|
||||||
|
return BadRequest($"No basket found for id {basketId}");
|
||||||
|
}
|
||||||
|
|
||||||
|
var orderDraft = await _orderClient.GetOrderDraftFromBasket(basket);
|
||||||
|
return Ok(orderDraft);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile
Normal file
19
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||||
|
WORKDIR /src
|
||||||
|
COPY . .
|
||||||
|
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||||
|
WORKDIR /src/src/ApiGateways/Mobile.Bff.Shopping/aggregator
|
||||||
|
RUN dotnet build --no-restore -c Release -o /app
|
||||||
|
|
||||||
|
FROM build AS publish
|
||||||
|
RUN dotnet publish --no-restore -c Release -o /app
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app .
|
||||||
|
ENTRYPOINT ["dotnet", "Mobile.Shopping.HttpAggregator.dll"]
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Filters
|
||||||
|
{
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Swashbuckle.AspNetCore.Swagger;
|
||||||
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace Basket.API.Infrastructure.Filters
|
||||||
|
{
|
||||||
|
public class AuthorizeCheckOperationFilter : IOperationFilter
|
||||||
|
{
|
||||||
|
public void Apply(Operation operation, OperationFilterContext context)
|
||||||
|
{
|
||||||
|
// Check for authorize attribute
|
||||||
|
var hasAuthorize = context.ApiDescription.ControllerAttributes().OfType<AuthorizeAttribute>().Any() ||
|
||||||
|
context.ApiDescription.ActionAttributes().OfType<AuthorizeAttribute>().Any();
|
||||||
|
|
||||||
|
if (hasAuthorize)
|
||||||
|
{
|
||||||
|
operation.Responses.Add("401", new Response { Description = "Unauthorized" });
|
||||||
|
operation.Responses.Add("403", new Response { Description = "Forbidden" });
|
||||||
|
|
||||||
|
operation.Security = new List<IDictionary<string, IEnumerable<string>>>();
|
||||||
|
operation.Security.Add(new Dictionary<string, IEnumerable<string>>
|
||||||
|
{
|
||||||
|
{ "oauth2", new [] { "Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator" } }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
|
<AssemblyName>Mobile.Shopping.HttpAggregator</AssemblyName>
|
||||||
|
<RootNamespace>Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator</RootNamespace>
|
||||||
|
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="wwwroot\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\BuildingBlocks\Resilience\Resilience.Http\Resilience.Http.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class AddBasketItemRequest
|
||||||
|
{
|
||||||
|
public int CatalogItemId { get; set; }
|
||||||
|
public string BasketId { get; set; }
|
||||||
|
|
||||||
|
public int Quantity { get; set; }
|
||||||
|
|
||||||
|
public AddBasketItemRequest()
|
||||||
|
{
|
||||||
|
Quantity = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class BasketData
|
||||||
|
{
|
||||||
|
public string BuyerId { get; set; }
|
||||||
|
public List<BasketDataItem> Items { get; set; }
|
||||||
|
|
||||||
|
public BasketData(string buyerId)
|
||||||
|
{
|
||||||
|
BuyerId = buyerId;
|
||||||
|
Items = new List<BasketDataItem>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BasketDataItem
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
public string ProductId { get; set; }
|
||||||
|
public string ProductName { get; set; }
|
||||||
|
public decimal UnitPrice { get; set; }
|
||||||
|
public decimal OldUnitPrice { get; set; }
|
||||||
|
public int Quantity { get; set; }
|
||||||
|
public string PictureUrl { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class CatalogItem
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public decimal Price { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string PictureUri { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class OrderData
|
||||||
|
{
|
||||||
|
public string OrderNumber { get; set; }
|
||||||
|
public DateTime Date { get; set; }
|
||||||
|
public string Status { get; set; }
|
||||||
|
public decimal Total { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public string City { get; set; }
|
||||||
|
public string Street { get; set; }
|
||||||
|
public string State { get; set; }
|
||||||
|
public string Country { get; set; }
|
||||||
|
public string ZipCode { get; set; }
|
||||||
|
public string CardNumber { get; set; }
|
||||||
|
public string CardHolderName { get; set; }
|
||||||
|
public bool IsDraft { get; set; }
|
||||||
|
public DateTime CardExpiration { get; set; }
|
||||||
|
public string CardExpirationShort { get; set; }
|
||||||
|
public string CardSecurityNumber { get; set; }
|
||||||
|
|
||||||
|
public int CardTypeId { get; set; }
|
||||||
|
|
||||||
|
public string Buyer { get; set; }
|
||||||
|
|
||||||
|
public List<OrderItemData> OrderItems { get; } = new List<OrderItemData>();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class OrderItemData
|
||||||
|
{
|
||||||
|
public int ProductId { get; set; }
|
||||||
|
public string ProductName { get; set; }
|
||||||
|
public decimal UnitPrice { get; set; }
|
||||||
|
public decimal Discount { get; set; }
|
||||||
|
public int Units { get; set; }
|
||||||
|
public string PictureUrl { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class UpdateBasketItemsRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public string BasketId { get; set; }
|
||||||
|
|
||||||
|
public ICollection<UpdateBasketItemData> Updates { get; set; }
|
||||||
|
|
||||||
|
public UpdateBasketItemsRequest()
|
||||||
|
{
|
||||||
|
Updates = new List<UpdateBasketItemData>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UpdateBasketItemData
|
||||||
|
{
|
||||||
|
public string BasketItemId { get; set; }
|
||||||
|
public int NewQty { get; set; }
|
||||||
|
|
||||||
|
public UpdateBasketItemData()
|
||||||
|
{
|
||||||
|
NewQty = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class UpdateBasketRequest
|
||||||
|
{
|
||||||
|
public string BuyerId { get; set; }
|
||||||
|
|
||||||
|
public IEnumerable<UpdateBasketRequestItemData> Items { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UpdateBasketRequestItemData
|
||||||
|
{
|
||||||
|
public string Id { get; set; } // Basket id
|
||||||
|
public int ProductId { get; set; } // Catalog item id
|
||||||
|
public int Quantity { get; set; } // Quantity
|
||||||
|
}
|
||||||
|
}
|
36
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Program.cs
Normal file
36
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Program.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
BuildWebHost(args).Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IWebHost BuildWebHost(string[] args) =>
|
||||||
|
WebHost
|
||||||
|
.CreateDefaultBuilder(args)
|
||||||
|
.ConfigureAppConfiguration(cb =>
|
||||||
|
{
|
||||||
|
var sources = cb.Sources;
|
||||||
|
sources.Insert(3, new Microsoft.Extensions.Configuration.Json.JsonConfigurationSource()
|
||||||
|
{
|
||||||
|
Optional = true,
|
||||||
|
Path = "appsettings.localhost.json",
|
||||||
|
ReloadOnChange = false
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.UseStartup<Startup>()
|
||||||
|
.Build();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:57425/",
|
||||||
|
"sslPort": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "api/values",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PurchaseForMvc": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "api/values",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "http://localhost:61632/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Authentication;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public class BasketService : IBasketService
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IHttpClient _apiClient;
|
||||||
|
private readonly ILogger<BasketService> _logger;
|
||||||
|
private readonly UrlsConfig _urls;
|
||||||
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||||
|
|
||||||
|
public BasketService(IHttpClient httpClient, IHttpContextAccessor httpContextAccessor, ILogger<BasketService> logger, IOptionsSnapshot<UrlsConfig> config)
|
||||||
|
{
|
||||||
|
_apiClient = httpClient;
|
||||||
|
_logger = logger;
|
||||||
|
_urls = config.Value;
|
||||||
|
_httpContextAccessor = httpContextAccessor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<BasketData> GetById(string id)
|
||||||
|
{
|
||||||
|
var token = await GetUserTokenAsync();
|
||||||
|
var data = await _apiClient.GetStringAsync(_urls.Basket + UrlsConfig.BasketOperations.GetItemById(id), token);
|
||||||
|
var basket = !string.IsNullOrEmpty(data) ? JsonConvert.DeserializeObject<BasketData>(data) : null;
|
||||||
|
return basket;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task Update(BasketData currentBasket)
|
||||||
|
{
|
||||||
|
var token = await GetUserTokenAsync();
|
||||||
|
var data = await _apiClient.PostAsync<BasketData>(_urls.Basket + UrlsConfig.BasketOperations.UpdateBasket(), currentBasket, token);
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
async Task<string> GetUserTokenAsync()
|
||||||
|
{
|
||||||
|
var context = _httpContextAccessor.HttpContext;
|
||||||
|
return await context.GetTokenAsync("access_token");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public class CatalogService : ICatalogService
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IHttpClient _apiClient;
|
||||||
|
private readonly ILogger<CatalogService> _logger;
|
||||||
|
private readonly UrlsConfig _urls;
|
||||||
|
|
||||||
|
public CatalogService(IHttpClient httpClient, ILogger<CatalogService> logger, IOptionsSnapshot<UrlsConfig> config)
|
||||||
|
{
|
||||||
|
_apiClient = httpClient;
|
||||||
|
_logger = logger;
|
||||||
|
_urls = config.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<CatalogItem> GetCatalogItem(int id)
|
||||||
|
{
|
||||||
|
var data = await _apiClient.GetStringAsync(_urls.Catalog + UrlsConfig.CatalogOperations.GetItemById(id));
|
||||||
|
var item = JsonConvert.DeserializeObject<CatalogItem>(data);
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<CatalogItem>> GetCatalogItems(IEnumerable<int> ids)
|
||||||
|
{
|
||||||
|
var data = await _apiClient.GetStringAsync(_urls.Catalog + UrlsConfig.CatalogOperations.GetItemsById(ids));
|
||||||
|
var item = JsonConvert.DeserializeObject<CatalogItem[]>(data);
|
||||||
|
return item;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public interface IBasketService
|
||||||
|
{
|
||||||
|
Task<BasketData> GetById(string id);
|
||||||
|
Task Update(BasketData currentBasket);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public interface ICatalogService
|
||||||
|
{
|
||||||
|
Task<CatalogItem> GetCatalogItem(int id);
|
||||||
|
Task<IEnumerable<CatalogItem>> GetCatalogItems(IEnumerable<int> ids);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public interface IOrderApiClient
|
||||||
|
{
|
||||||
|
Task<OrderData> GetOrderDraftFromBasket(BasketData basket);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public class OrderApiClient : IOrderApiClient
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IHttpClient _apiClient;
|
||||||
|
private readonly ILogger<OrderApiClient> _logger;
|
||||||
|
private readonly UrlsConfig _urls;
|
||||||
|
|
||||||
|
public OrderApiClient(IHttpClient httpClient, ILogger<OrderApiClient> logger, IOptionsSnapshot<UrlsConfig> config)
|
||||||
|
{
|
||||||
|
_apiClient = httpClient;
|
||||||
|
_logger = logger;
|
||||||
|
_urls = config.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<OrderData> GetOrderDraftFromBasket(BasketData basket)
|
||||||
|
{
|
||||||
|
var url = _urls.Orders + UrlsConfig.OrdersOperations.GetOrderDraft();
|
||||||
|
var response = await _apiClient.PostAsync<BasketData>(url, basket);
|
||||||
|
response.EnsureSuccessStatusCode();
|
||||||
|
var jsonResponse = await response.Content.ReadAsStringAsync();
|
||||||
|
return JsonConvert.DeserializeObject<OrderData>(jsonResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
138
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs
Normal file
138
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IdentityModel.Tokens.Jwt;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Filters.Basket.API.Infrastructure.Filters;
|
||||||
|
using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services;
|
||||||
|
using Swashbuckle.AspNetCore.Swagger;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
||||||
|
{
|
||||||
|
public class Startup
|
||||||
|
{
|
||||||
|
public Startup(IConfiguration configuration)
|
||||||
|
{
|
||||||
|
Configuration = configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IConfiguration Configuration { get; }
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
|
public void ConfigureServices(IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||||
|
services.AddSingleton<IHttpClient, StandardHttpClient>();
|
||||||
|
services.AddTransient<ICatalogService, CatalogService>();
|
||||||
|
services.AddTransient<IBasketService, BasketService>();
|
||||||
|
services.AddTransient<IOrderApiClient, OrderApiClient>();
|
||||||
|
|
||||||
|
services.AddOptions();
|
||||||
|
services.Configure<UrlsConfig>(Configuration.GetSection("urls"));
|
||||||
|
|
||||||
|
services.AddMvc();
|
||||||
|
|
||||||
|
services.AddSwaggerGen(options =>
|
||||||
|
{
|
||||||
|
options.DescribeAllEnumsAsStrings();
|
||||||
|
options.SwaggerDoc("v1", new Swashbuckle.AspNetCore.Swagger.Info
|
||||||
|
{
|
||||||
|
Title = "Shopping Aggregator for Mobile Clients",
|
||||||
|
Version = "v1",
|
||||||
|
Description = "Shopping Aggregator for Mobile Clients",
|
||||||
|
TermsOfService = "Terms Of Service"
|
||||||
|
});
|
||||||
|
|
||||||
|
options.AddSecurityDefinition("oauth2", new OAuth2Scheme
|
||||||
|
{
|
||||||
|
Type = "oauth2",
|
||||||
|
Flow = "implicit",
|
||||||
|
AuthorizationUrl = $"{Configuration.GetValue<string>("IdentityUrlExternal")}/connect/authorize",
|
||||||
|
TokenUrl = $"{Configuration.GetValue<string>("IdentityUrlExternal")}/connect/token",
|
||||||
|
Scopes = new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "mobileshoppingagg", "Shopping Aggregator for Mobile Clients" }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
options.OperationFilter<AuthorizeCheckOperationFilter>();
|
||||||
|
});
|
||||||
|
|
||||||
|
services.AddCors(options =>
|
||||||
|
{
|
||||||
|
options.AddPolicy("CorsPolicy",
|
||||||
|
builder => builder.AllowAnyOrigin()
|
||||||
|
.AllowAnyMethod()
|
||||||
|
.AllowAnyHeader()
|
||||||
|
.AllowCredentials());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
|
||||||
|
var identityUrl = Configuration.GetValue<string>("urls:identity");
|
||||||
|
services.AddAuthentication(options =>
|
||||||
|
{
|
||||||
|
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||||
|
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||||
|
|
||||||
|
}).AddJwtBearer(options =>
|
||||||
|
{
|
||||||
|
options.Authority = identityUrl;
|
||||||
|
options.RequireHttpsMetadata = false;
|
||||||
|
options.Audience = "mobileshoppingagg";
|
||||||
|
options.Events = new JwtBearerEvents()
|
||||||
|
{
|
||||||
|
OnAuthenticationFailed = async ctx =>
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
},
|
||||||
|
OnTokenValidated = async ctx =>
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||||
|
{
|
||||||
|
|
||||||
|
var pathBase = Configuration["PATH_BASE"];
|
||||||
|
if (!string.IsNullOrEmpty(pathBase))
|
||||||
|
{
|
||||||
|
loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'");
|
||||||
|
app.UsePathBase(pathBase);
|
||||||
|
}
|
||||||
|
|
||||||
|
app.UseCors("CorsPolicy");
|
||||||
|
|
||||||
|
if (env.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseDeveloperExceptionPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
app.UseAuthentication();
|
||||||
|
|
||||||
|
app.UseMvc();
|
||||||
|
|
||||||
|
app.UseSwagger().UseSwaggerUI(c =>
|
||||||
|
{
|
||||||
|
c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Purchase BFF V1");
|
||||||
|
c.ConfigureOAuth2("Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregatorwaggerui", "", "", "Purchase BFF Swagger UI");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"IncludeScopes": false,
|
||||||
|
"Debug": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Console": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Warning"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"urls": {
|
||||||
|
"basket": "http://localhost:55105",
|
||||||
|
"catalog": "http://localhost:55101",
|
||||||
|
"orders": "http://localhost:55102",
|
||||||
|
"identity": "http://localhost:55105"
|
||||||
|
}
|
||||||
|
}
|
142
src/ApiGateways/Mobile.Bff.Shopping/apigw/configuration.json
Normal file
142
src/ApiGateways/Mobile.Bff.Shopping/apigw/configuration.json
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
{
|
||||||
|
"ReRoutes": [
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "catalog.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/c/{everything}",
|
||||||
|
"UpstreamHttpMethod": [ "GET" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "basket.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/b/{everything}",
|
||||||
|
"UpstreamHttpMethod": [],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "ordering.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/o/{everything}",
|
||||||
|
"UpstreamHttpMethod": [],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "mobileshoppingagg",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/{everything}",
|
||||||
|
"UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "ordering.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/orders-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "basket.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/basket-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "catalog.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/catalog-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "marketing.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/marketing-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "payment.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/payment-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "locations.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/location-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"GlobalConfiguration": {
|
||||||
|
"RequestIdKey": "OcRequestId",
|
||||||
|
"AdministrationPath": "/administration"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
34
src/ApiGateways/Web.Bff.Marketing/apigw/configuration.json
Normal file
34
src/ApiGateways/Web.Bff.Marketing/apigw/configuration.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"ReRoutes": [
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "marketing.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/m/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "locations.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/l/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"GlobalConfiguration": {
|
||||||
|
"RequestIdKey": "OcRequestId",
|
||||||
|
"AdministrationPath": "/administration"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config
|
||||||
|
{
|
||||||
|
public class UrlsConfig
|
||||||
|
{
|
||||||
|
public class CatalogOperations
|
||||||
|
{
|
||||||
|
public static string GetItemById(int id) => $"/api/v1/catalog/items/{id}";
|
||||||
|
public static string GetItemsById(IEnumerable<int> ids) => $"/api/v1/catalog/items?ids={string.Join(',', ids)}";
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BasketOperations
|
||||||
|
{
|
||||||
|
public static string GetItemById(string id) => $"/api/v1/basket/{id}";
|
||||||
|
public static string UpdateBasket() => "/api/v1/basket";
|
||||||
|
}
|
||||||
|
|
||||||
|
public class OrdersOperations
|
||||||
|
{
|
||||||
|
public static string GetOrderDraft() => "/api/v1/orders/draft";
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Basket { get; set; }
|
||||||
|
public string Catalog { get; set; }
|
||||||
|
public string Orders { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,133 @@
|
|||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers
|
||||||
|
{
|
||||||
|
[Route("api/v1/[controller]")]
|
||||||
|
[Authorize]
|
||||||
|
public class BasketController : Controller
|
||||||
|
{
|
||||||
|
private readonly ICatalogService _catalog;
|
||||||
|
private readonly IBasketService _basket;
|
||||||
|
public BasketController(ICatalogService catalogService, IBasketService basketService)
|
||||||
|
{
|
||||||
|
_catalog = catalogService;
|
||||||
|
_basket = basketService;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[HttpPut]
|
||||||
|
public async Task<IActionResult> UpdateAllBasket([FromBody] UpdateBasketRequest data)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (data.Items == null || !data.Items.Any())
|
||||||
|
{
|
||||||
|
return BadRequest("Need to pass at least one basket line");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the current basket
|
||||||
|
var currentBasket = await _basket.GetById(data.BuyerId);
|
||||||
|
if (currentBasket == null)
|
||||||
|
{
|
||||||
|
currentBasket = new BasketData(data.BuyerId);
|
||||||
|
}
|
||||||
|
|
||||||
|
var catalogItems = await _catalog.GetCatalogItems(data.Items.Select(x => x.ProductId));
|
||||||
|
var newBasket = new BasketData(data.BuyerId);
|
||||||
|
|
||||||
|
foreach (var bitem in data.Items)
|
||||||
|
{
|
||||||
|
var catalogItem = catalogItems.SingleOrDefault(ci => ci.Id == bitem.ProductId);
|
||||||
|
if (catalogItem == null)
|
||||||
|
{
|
||||||
|
return BadRequest($"Basket refers to a non-existing catalog item ({bitem.ProductId})");
|
||||||
|
}
|
||||||
|
|
||||||
|
newBasket.Items.Add(new BasketDataItem()
|
||||||
|
{
|
||||||
|
Id = bitem.Id,
|
||||||
|
ProductId = catalogItem.Id.ToString(),
|
||||||
|
ProductName = catalogItem.Name,
|
||||||
|
PictureUrl = catalogItem.PictureUri,
|
||||||
|
UnitPrice = catalogItem.Price,
|
||||||
|
Quantity = bitem.Quantity
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
await _basket.Update(newBasket);
|
||||||
|
return Ok(newBasket);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPut]
|
||||||
|
[Route("items")]
|
||||||
|
public async Task<IActionResult> UpdateQuantities([FromBody] UpdateBasketItemsRequest data)
|
||||||
|
{
|
||||||
|
if (!data.Updates.Any())
|
||||||
|
{
|
||||||
|
return BadRequest("No updates sent");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the current basket
|
||||||
|
var currentBasket = await _basket.GetById(data.BasketId);
|
||||||
|
if (currentBasket == null)
|
||||||
|
{
|
||||||
|
return BadRequest($"Basket with id {data.BasketId} not found.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update with new quantities
|
||||||
|
foreach (var update in data.Updates)
|
||||||
|
{
|
||||||
|
var basketItem = currentBasket.Items.SingleOrDefault(bitem => bitem.Id == update.BasketItemId);
|
||||||
|
if (basketItem == null)
|
||||||
|
{
|
||||||
|
return BadRequest($"Basket item with id {update.BasketItemId} not found");
|
||||||
|
}
|
||||||
|
basketItem.Quantity = update.NewQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Save the updated basket
|
||||||
|
await _basket.Update(currentBasket);
|
||||||
|
return Ok(currentBasket);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[Route("items")]
|
||||||
|
public async Task<IActionResult> AddBasketItem([FromBody] AddBasketItemRequest data)
|
||||||
|
{
|
||||||
|
if (data == null || data.Quantity == 0)
|
||||||
|
{
|
||||||
|
return BadRequest("Invalid payload");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 1: Get the item from catalog
|
||||||
|
var item = await _catalog.GetCatalogItem(data.CatalogItemId);
|
||||||
|
|
||||||
|
//item.PictureUri =
|
||||||
|
|
||||||
|
// Step 2: Get current basket status
|
||||||
|
var currentBasket = (await _basket.GetById(data.BasketId)) ?? new BasketData(data.BasketId);
|
||||||
|
// Step 3: Merge current status with new product
|
||||||
|
currentBasket.Items.Add(new BasketDataItem()
|
||||||
|
{
|
||||||
|
UnitPrice = item.Price,
|
||||||
|
PictureUrl = item.PictureUri,
|
||||||
|
ProductId = item.Id.ToString(),
|
||||||
|
ProductName = item.Name,
|
||||||
|
Quantity = data.Quantity,
|
||||||
|
Id = Guid.NewGuid().ToString()
|
||||||
|
});
|
||||||
|
|
||||||
|
// Step 4: Update basket
|
||||||
|
await _basket.Update(currentBasket);
|
||||||
|
|
||||||
|
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers
|
||||||
|
{
|
||||||
|
[Route("")]
|
||||||
|
public class HomeController : Controller
|
||||||
|
{
|
||||||
|
[HttpGet()]
|
||||||
|
public IActionResult Index()
|
||||||
|
{
|
||||||
|
return new RedirectResult("~/swagger");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers
|
||||||
|
{
|
||||||
|
[Route("api/v1/[controller]")]
|
||||||
|
[Authorize]
|
||||||
|
public class OrderController : Controller
|
||||||
|
{
|
||||||
|
private readonly IBasketService _basketService;
|
||||||
|
private readonly IOrderApiClient _orderClient;
|
||||||
|
public OrderController(IBasketService basketService, IOrderApiClient orderClient)
|
||||||
|
{
|
||||||
|
_basketService = basketService;
|
||||||
|
_orderClient = orderClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Route("draft/{basketId}")]
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IActionResult> GetOrderDraft(string basketId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(basketId))
|
||||||
|
{
|
||||||
|
return BadRequest("Need a valid basketid");
|
||||||
|
}
|
||||||
|
// Get the basket data and build a order draft based on it
|
||||||
|
var basket = await _basketService.GetById(basketId);
|
||||||
|
if (basket == null)
|
||||||
|
{
|
||||||
|
return BadRequest($"No basket found for id {basketId}");
|
||||||
|
}
|
||||||
|
|
||||||
|
var orderDraft = await _orderClient.GetOrderDraftFromBasket(basket);
|
||||||
|
return Ok(orderDraft);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile
Normal file
18
src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||||
|
WORKDIR /src
|
||||||
|
COPY . .
|
||||||
|
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||||
|
WORKDIR /src/src/ApiGateways/Web.Bff.Shopping/aggregator
|
||||||
|
RUN dotnet build --no-restore -c Release -o /app
|
||||||
|
|
||||||
|
FROM build AS publish
|
||||||
|
RUN dotnet publish --no-restore -c Release -o /app
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app .
|
||||||
|
ENTRYPOINT ["dotnet", "Web.Shopping.HttpAggregator.dll"]
|
@ -0,0 +1,33 @@
|
|||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Filters
|
||||||
|
{
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Swashbuckle.AspNetCore.Swagger;
|
||||||
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace Basket.API.Infrastructure.Filters
|
||||||
|
{
|
||||||
|
public class AuthorizeCheckOperationFilter : IOperationFilter
|
||||||
|
{
|
||||||
|
public void Apply(Operation operation, OperationFilterContext context)
|
||||||
|
{
|
||||||
|
// Check for authorize attribute
|
||||||
|
var hasAuthorize = context.ApiDescription.ControllerAttributes().OfType<AuthorizeAttribute>().Any() ||
|
||||||
|
context.ApiDescription.ActionAttributes().OfType<AuthorizeAttribute>().Any();
|
||||||
|
|
||||||
|
if (hasAuthorize)
|
||||||
|
{
|
||||||
|
operation.Responses.Add("401", new Response { Description = "Unauthorized" });
|
||||||
|
operation.Responses.Add("403", new Response { Description = "Forbidden" });
|
||||||
|
|
||||||
|
operation.Security = new List<IDictionary<string, IEnumerable<string>>>();
|
||||||
|
operation.Security.Add(new Dictionary<string, IEnumerable<string>>
|
||||||
|
{
|
||||||
|
{ "oauth2", new [] { "Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator" } }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class AddBasketItemRequest
|
||||||
|
{
|
||||||
|
public int CatalogItemId { get; set; }
|
||||||
|
public string BasketId { get; set; }
|
||||||
|
|
||||||
|
public int Quantity { get; set; }
|
||||||
|
|
||||||
|
public AddBasketItemRequest()
|
||||||
|
{
|
||||||
|
Quantity = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class BasketData
|
||||||
|
{
|
||||||
|
public string BuyerId { get; set; }
|
||||||
|
public List<BasketDataItem> Items { get; set; }
|
||||||
|
|
||||||
|
public BasketData(string buyerId)
|
||||||
|
{
|
||||||
|
BuyerId = buyerId;
|
||||||
|
Items = new List<BasketDataItem>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BasketDataItem
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
public string ProductId { get; set; }
|
||||||
|
public string ProductName { get; set; }
|
||||||
|
public decimal UnitPrice { get; set; }
|
||||||
|
public decimal OldUnitPrice { get; set; }
|
||||||
|
public int Quantity { get; set; }
|
||||||
|
public string PictureUrl { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class CatalogItem
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public decimal Price { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string PictureUri { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class OrderData
|
||||||
|
{
|
||||||
|
public string OrderNumber { get; set; }
|
||||||
|
public DateTime Date { get; set; }
|
||||||
|
public string Status { get; set; }
|
||||||
|
public decimal Total { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public string City { get; set; }
|
||||||
|
public string Street { get; set; }
|
||||||
|
public string State { get; set; }
|
||||||
|
public string Country { get; set; }
|
||||||
|
public string ZipCode { get; set; }
|
||||||
|
public string CardNumber { get; set; }
|
||||||
|
public string CardHolderName { get; set; }
|
||||||
|
public bool IsDraft { get; set; }
|
||||||
|
public DateTime CardExpiration { get; set; }
|
||||||
|
public string CardExpirationShort { get; set; }
|
||||||
|
public string CardSecurityNumber { get; set; }
|
||||||
|
|
||||||
|
public int CardTypeId { get; set; }
|
||||||
|
|
||||||
|
public string Buyer { get; set; }
|
||||||
|
|
||||||
|
public List<OrderItemData> OrderItems { get; } = new List<OrderItemData>();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class OrderItemData
|
||||||
|
{
|
||||||
|
public int ProductId { get; set; }
|
||||||
|
public string ProductName { get; set; }
|
||||||
|
public decimal UnitPrice { get; set; }
|
||||||
|
public decimal Discount { get; set; }
|
||||||
|
public int Units { get; set; }
|
||||||
|
public string PictureUrl { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class UpdateBasketItemsRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public string BasketId { get; set; }
|
||||||
|
|
||||||
|
public ICollection<UpdateBasketItemData> Updates { get; set; }
|
||||||
|
|
||||||
|
public UpdateBasketItemsRequest()
|
||||||
|
{
|
||||||
|
Updates = new List<UpdateBasketItemData>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UpdateBasketItemData
|
||||||
|
{
|
||||||
|
public string BasketItemId { get; set; }
|
||||||
|
public int NewQty { get; set; }
|
||||||
|
|
||||||
|
public UpdateBasketItemData()
|
||||||
|
{
|
||||||
|
NewQty = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models
|
||||||
|
{
|
||||||
|
public class UpdateBasketRequest
|
||||||
|
{
|
||||||
|
public string BuyerId { get; set; }
|
||||||
|
|
||||||
|
public IEnumerable<UpdateBasketRequestItemData> Items { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UpdateBasketRequestItemData
|
||||||
|
{
|
||||||
|
public string Id { get; set; } // Basket id
|
||||||
|
public int ProductId { get; set; } // Catalog item id
|
||||||
|
public int Quantity { get; set; } // Quantity
|
||||||
|
}
|
||||||
|
}
|
36
src/ApiGateways/Web.Bff.Shopping/aggregator/Program.cs
Normal file
36
src/ApiGateways/Web.Bff.Shopping/aggregator/Program.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
BuildWebHost(args).Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IWebHost BuildWebHost(string[] args) =>
|
||||||
|
WebHost
|
||||||
|
.CreateDefaultBuilder(args)
|
||||||
|
.ConfigureAppConfiguration(cb =>
|
||||||
|
{
|
||||||
|
var sources = cb.Sources;
|
||||||
|
sources.Insert(3, new Microsoft.Extensions.Configuration.Json.JsonConfigurationSource()
|
||||||
|
{
|
||||||
|
Optional = true,
|
||||||
|
Path = "appsettings.localhost.json",
|
||||||
|
ReloadOnChange = false
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.UseStartup<Startup>()
|
||||||
|
.Build();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:57425/",
|
||||||
|
"sslPort": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "api/values",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PurchaseForMvc": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "api/values",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "http://localhost:61632/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Authentication;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public class BasketService : IBasketService
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IHttpClient _apiClient;
|
||||||
|
private readonly ILogger<BasketService> _logger;
|
||||||
|
private readonly UrlsConfig _urls;
|
||||||
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||||
|
|
||||||
|
public BasketService(IHttpClient httpClient, IHttpContextAccessor httpContextAccessor, ILogger<BasketService> logger, IOptionsSnapshot<UrlsConfig> config)
|
||||||
|
{
|
||||||
|
_apiClient = httpClient;
|
||||||
|
_logger = logger;
|
||||||
|
_urls = config.Value;
|
||||||
|
_httpContextAccessor = httpContextAccessor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<BasketData> GetById(string id)
|
||||||
|
{
|
||||||
|
var token = await GetUserTokenAsync();
|
||||||
|
var data = await _apiClient.GetStringAsync(_urls.Basket + UrlsConfig.BasketOperations.GetItemById(id), token);
|
||||||
|
var basket = !string.IsNullOrEmpty(data) ? JsonConvert.DeserializeObject<BasketData>(data) : null;
|
||||||
|
return basket;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task Update(BasketData currentBasket)
|
||||||
|
{
|
||||||
|
var token = await GetUserTokenAsync();
|
||||||
|
var data = await _apiClient.PostAsync<BasketData>(_urls.Basket + UrlsConfig.BasketOperations.UpdateBasket(), currentBasket, token);
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
async Task<string> GetUserTokenAsync()
|
||||||
|
{
|
||||||
|
var context = _httpContextAccessor.HttpContext;
|
||||||
|
return await context.GetTokenAsync("access_token");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public class CatalogService : ICatalogService
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IHttpClient _apiClient;
|
||||||
|
private readonly ILogger<CatalogService> _logger;
|
||||||
|
private readonly UrlsConfig _urls;
|
||||||
|
|
||||||
|
public CatalogService(IHttpClient httpClient, ILogger<CatalogService> logger, IOptionsSnapshot<UrlsConfig> config)
|
||||||
|
{
|
||||||
|
_apiClient = httpClient;
|
||||||
|
_logger = logger;
|
||||||
|
_urls = config.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<CatalogItem> GetCatalogItem(int id)
|
||||||
|
{
|
||||||
|
var data = await _apiClient.GetStringAsync(_urls.Catalog + UrlsConfig.CatalogOperations.GetItemById(id));
|
||||||
|
var item = JsonConvert.DeserializeObject<CatalogItem>(data);
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<CatalogItem>> GetCatalogItems(IEnumerable<int> ids)
|
||||||
|
{
|
||||||
|
var data = await _apiClient.GetStringAsync(_urls.Catalog + UrlsConfig.CatalogOperations.GetItemsById(ids));
|
||||||
|
var item = JsonConvert.DeserializeObject<CatalogItem[]>(data);
|
||||||
|
return item;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public interface IBasketService
|
||||||
|
{
|
||||||
|
Task<BasketData> GetById(string id);
|
||||||
|
Task Update(BasketData currentBasket);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public interface ICatalogService
|
||||||
|
{
|
||||||
|
Task<CatalogItem> GetCatalogItem(int id);
|
||||||
|
Task<IEnumerable<CatalogItem>> GetCatalogItems(IEnumerable<int> ids);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public interface IOrderApiClient
|
||||||
|
{
|
||||||
|
Task<OrderData> GetOrderDraftFromBasket(BasketData basket);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
|
||||||
|
{
|
||||||
|
public class OrderApiClient : IOrderApiClient
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IHttpClient _apiClient;
|
||||||
|
private readonly ILogger<OrderApiClient> _logger;
|
||||||
|
private readonly UrlsConfig _urls;
|
||||||
|
|
||||||
|
public OrderApiClient(IHttpClient httpClient, ILogger<OrderApiClient> logger, IOptionsSnapshot<UrlsConfig> config)
|
||||||
|
{
|
||||||
|
_apiClient = httpClient;
|
||||||
|
_logger = logger;
|
||||||
|
_urls = config.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<OrderData> GetOrderDraftFromBasket(BasketData basket)
|
||||||
|
{
|
||||||
|
var url = _urls.Orders + UrlsConfig.OrdersOperations.GetOrderDraft();
|
||||||
|
var response = await _apiClient.PostAsync<BasketData>(url, basket);
|
||||||
|
response.EnsureSuccessStatusCode();
|
||||||
|
var jsonResponse = await response.Content.ReadAsStringAsync();
|
||||||
|
return JsonConvert.DeserializeObject<OrderData>(jsonResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
138
src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs
Normal file
138
src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IdentityModel.Tokens.Jwt;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Filters.Basket.API.Infrastructure.Filters;
|
||||||
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services;
|
||||||
|
using Swashbuckle.AspNetCore.Swagger;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
||||||
|
{
|
||||||
|
public class Startup
|
||||||
|
{
|
||||||
|
public Startup(IConfiguration configuration)
|
||||||
|
{
|
||||||
|
Configuration = configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IConfiguration Configuration { get; }
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
|
public void ConfigureServices(IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||||
|
services.AddSingleton<IHttpClient, StandardHttpClient>();
|
||||||
|
services.AddTransient<ICatalogService, CatalogService>();
|
||||||
|
services.AddTransient<IBasketService, BasketService>();
|
||||||
|
services.AddTransient<IOrderApiClient, OrderApiClient>();
|
||||||
|
|
||||||
|
services.AddOptions();
|
||||||
|
services.Configure<UrlsConfig>(Configuration.GetSection("urls"));
|
||||||
|
|
||||||
|
services.AddMvc();
|
||||||
|
|
||||||
|
services.AddSwaggerGen(options =>
|
||||||
|
{
|
||||||
|
options.DescribeAllEnumsAsStrings();
|
||||||
|
options.SwaggerDoc("v1", new Swashbuckle.AspNetCore.Swagger.Info
|
||||||
|
{
|
||||||
|
Title = "Shopping Aggregator for Web Clients",
|
||||||
|
Version = "v1",
|
||||||
|
Description = "Shopping Aggregator for Web Clients",
|
||||||
|
TermsOfService = "Terms Of Service"
|
||||||
|
});
|
||||||
|
|
||||||
|
options.AddSecurityDefinition("oauth2", new OAuth2Scheme
|
||||||
|
{
|
||||||
|
Type = "oauth2",
|
||||||
|
Flow = "implicit",
|
||||||
|
AuthorizationUrl = $"{Configuration.GetValue<string>("IdentityUrlExternal")}/connect/authorize",
|
||||||
|
TokenUrl = $"{Configuration.GetValue<string>("IdentityUrlExternal")}/connect/token",
|
||||||
|
Scopes = new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "webshoppingagg", "Shopping Aggregator for Web Clients" }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
options.OperationFilter<AuthorizeCheckOperationFilter>();
|
||||||
|
});
|
||||||
|
|
||||||
|
services.AddCors(options =>
|
||||||
|
{
|
||||||
|
options.AddPolicy("CorsPolicy",
|
||||||
|
builder => builder.AllowAnyOrigin()
|
||||||
|
.AllowAnyMethod()
|
||||||
|
.AllowAnyHeader()
|
||||||
|
.AllowCredentials());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
|
||||||
|
var identityUrl = Configuration.GetValue<string>("urls:identity");
|
||||||
|
services.AddAuthentication(options =>
|
||||||
|
{
|
||||||
|
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||||
|
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||||
|
|
||||||
|
}).AddJwtBearer(options =>
|
||||||
|
{
|
||||||
|
options.Authority = identityUrl;
|
||||||
|
options.RequireHttpsMetadata = false;
|
||||||
|
options.Audience = "webshoppingagg";
|
||||||
|
options.Events = new JwtBearerEvents()
|
||||||
|
{
|
||||||
|
OnAuthenticationFailed = async ctx =>
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
},
|
||||||
|
OnTokenValidated = async ctx =>
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||||
|
{
|
||||||
|
|
||||||
|
var pathBase = Configuration["PATH_BASE"];
|
||||||
|
if (!string.IsNullOrEmpty(pathBase))
|
||||||
|
{
|
||||||
|
loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'");
|
||||||
|
app.UsePathBase(pathBase);
|
||||||
|
}
|
||||||
|
|
||||||
|
app.UseCors("CorsPolicy");
|
||||||
|
|
||||||
|
if (env.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseDeveloperExceptionPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
app.UseAuthentication();
|
||||||
|
|
||||||
|
app.UseMvc();
|
||||||
|
|
||||||
|
app.UseSwagger().UseSwaggerUI(c =>
|
||||||
|
{
|
||||||
|
c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Purchase BFF V1");
|
||||||
|
c.ConfigureOAuth2("Microsoft.eShopOnContainers.Web.Shopping.HttpAggregatorwaggerui", "", "", "Purchase BFF Swagger UI");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
|
<AssemblyName>Web.Shopping.HttpAggregator</AssemblyName>
|
||||||
|
<RootNamespace>Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator</RootNamespace>
|
||||||
|
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="wwwroot\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\BuildingBlocks\Resilience\Resilience.Http\Resilience.Http.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
15
src/ApiGateways/Web.Bff.Shopping/aggregator/appsettings.json
Normal file
15
src/ApiGateways/Web.Bff.Shopping/aggregator/appsettings.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"IncludeScopes": false,
|
||||||
|
"Debug": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Console": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Warning"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"urls": {
|
||||||
|
"basket": "http://localhost:55105",
|
||||||
|
"catalog": "http://localhost:55101",
|
||||||
|
"orders": "http://localhost:55102",
|
||||||
|
"identity": "http://localhost:55105"
|
||||||
|
}
|
||||||
|
}
|
142
src/ApiGateways/Web.Bff.Shopping/apigw/configuration.json
Normal file
142
src/ApiGateways/Web.Bff.Shopping/apigw/configuration.json
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
{
|
||||||
|
"ReRoutes": [
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "catalog.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/c/{everything}",
|
||||||
|
"UpstreamHttpMethod": [ "GET" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "basket.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/b/{everything}",
|
||||||
|
"UpstreamHttpMethod": [],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{version}/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "ordering.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{version}/o/{everything}",
|
||||||
|
"UpstreamHttpMethod": [],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "webshoppingagg",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/{everything}",
|
||||||
|
"UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
|
||||||
|
"AuthenticationOptions": {
|
||||||
|
"AuthenticationProviderKey": "IdentityApiKey",
|
||||||
|
"AllowedScopes": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "ordering.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/orders-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "basket.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/basket-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "catalog.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/catalog-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "marketing.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/marketing-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "payment.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/payment-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{everything}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "locations.api",
|
||||||
|
"Port": 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/location-api/{everything}",
|
||||||
|
"UpstreamHttpMethod": []
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"GlobalConfiguration": {
|
||||||
|
"RequestIdKey": "OcRequestId",
|
||||||
|
"AdministrationPath": "/administration"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -97,6 +97,11 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http
|
|||||||
throw new HttpRequestException();
|
throw new HttpRequestException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return await response.Content.ReadAsStringAsync();
|
return await response.Content.ReadAsStringAsync();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,11 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http
|
|||||||
|
|
||||||
var response = await _client.SendAsync(requestMessage);
|
var response = await _client.SendAsync(requestMessage);
|
||||||
|
|
||||||
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return await response.Content.ReadAsStringAsync();
|
return await response.Content.ReadAsStringAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ namespace eShopOnContainers.Core.Extensions
|
|||||||
}
|
}
|
||||||
|
|
||||||
return collection;
|
return collection;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -4,7 +4,7 @@
|
|||||||
{
|
{
|
||||||
public const string AzureTag = "Azure";
|
public const string AzureTag = "Azure";
|
||||||
public const string MockTag = "Mock";
|
public const string MockTag = "Mock";
|
||||||
public const string DefaultEndpoint = "http://13.88.8.119";
|
public const string DefaultEndpoint = "http://YOUR_IP_OR_DNS_NAME"; // i.e.: "http://YOUR_IP" or "http://YOUR_DNS_NAME"
|
||||||
|
|
||||||
private string _baseEndpoint;
|
private string _baseEndpoint;
|
||||||
private static readonly GlobalSetting _instance = new GlobalSetting();
|
private static readonly GlobalSetting _instance = new GlobalSetting();
|
||||||
@ -38,18 +38,8 @@
|
|||||||
|
|
||||||
public string RegisterWebsite { get; set; }
|
public string RegisterWebsite { get; set; }
|
||||||
|
|
||||||
public string CatalogEndpoint { get; set; }
|
|
||||||
|
|
||||||
public string OrdersEndpoint { get; set; }
|
|
||||||
|
|
||||||
public string BasketEndpoint { get; set; }
|
|
||||||
|
|
||||||
public string IdentityEndpoint { get; set; }
|
public string IdentityEndpoint { get; set; }
|
||||||
|
|
||||||
public string LocationEndpoint { get; set; }
|
|
||||||
|
|
||||||
public string MarketingEndpoint { get; set; }
|
|
||||||
|
|
||||||
public string UserInfoEndpoint { get; set; }
|
public string UserInfoEndpoint { get; set; }
|
||||||
|
|
||||||
public string TokenEndpoint { get; set; }
|
public string TokenEndpoint { get; set; }
|
||||||
@ -62,18 +52,17 @@
|
|||||||
|
|
||||||
private void UpdateEndpoint(string baseEndpoint)
|
private void UpdateEndpoint(string baseEndpoint)
|
||||||
{
|
{
|
||||||
RegisterWebsite = $"{baseEndpoint}:5105/Account/Register";
|
var identityBaseEndpoint = $"{baseEndpoint}/identity";
|
||||||
CatalogEndpoint = $"{baseEndpoint}:5101";
|
RegisterWebsite = $"{identityBaseEndpoint}/Account/Register";
|
||||||
OrdersEndpoint = $"{baseEndpoint}:5102";
|
LogoutCallback = $"{identityBaseEndpoint}/Account/Redirecting";
|
||||||
BasketEndpoint = $"{baseEndpoint}:5103";
|
|
||||||
IdentityEndpoint = $"{baseEndpoint}:5105/connect/authorize";
|
var connectBaseEndpoint = $"{identityBaseEndpoint}/connect";
|
||||||
UserInfoEndpoint = $"{baseEndpoint}:5105/connect/userinfo";
|
IdentityEndpoint = $"{connectBaseEndpoint}/authorize";
|
||||||
TokenEndpoint = $"{baseEndpoint}:5105/connect/token";
|
UserInfoEndpoint = $"{connectBaseEndpoint}/userinfo";
|
||||||
LogoutEndpoint = $"{baseEndpoint}:5105/connect/endsession";
|
TokenEndpoint = $"{connectBaseEndpoint}/token";
|
||||||
IdentityCallback = $"{baseEndpoint}:5105/xamarincallback";
|
LogoutEndpoint = $"{connectBaseEndpoint}/endsession";
|
||||||
LogoutCallback = $"{baseEndpoint}:5105/Account/Redirecting";
|
|
||||||
LocationEndpoint = $"{baseEndpoint}:5109";
|
IdentityCallback = $"{baseEndpoint}/xamarincallback";
|
||||||
MarketingEndpoint = $"{baseEndpoint}:5110";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,7 +11,7 @@ namespace eShopOnContainers.Core.Services.Basket
|
|||||||
private readonly IRequestProvider _requestProvider;
|
private readonly IRequestProvider _requestProvider;
|
||||||
private readonly IFixUriService _fixUriService;
|
private readonly IFixUriService _fixUriService;
|
||||||
|
|
||||||
private const string ApiUrlBase = "api/v1/basket";
|
private const string ApiUrlBase = "mobileshoppingapigw/api/v1/b/basket";
|
||||||
|
|
||||||
public BasketService(IRequestProvider requestProvider, IFixUriService fixUriService)
|
public BasketService(IRequestProvider requestProvider, IFixUriService fixUriService)
|
||||||
{
|
{
|
||||||
@ -21,15 +21,23 @@ namespace eShopOnContainers.Core.Services.Basket
|
|||||||
|
|
||||||
public async Task<CustomerBasket> GetBasketAsync(string guidUser, string token)
|
public async Task<CustomerBasket> GetBasketAsync(string guidUser, string token)
|
||||||
{
|
{
|
||||||
var builder = new UriBuilder(GlobalSetting.Instance.BasketEndpoint)
|
var builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint)
|
||||||
{
|
{
|
||||||
Path = $"{ApiUrlBase}/{guidUser}"
|
Path = $"{ApiUrlBase}/{guidUser}"
|
||||||
};
|
};
|
||||||
|
|
||||||
var uri = builder.ToString();
|
var uri = builder.ToString();
|
||||||
|
|
||||||
CustomerBasket basket =
|
CustomerBasket basket;
|
||||||
await _requestProvider.GetAsync<CustomerBasket>(uri, token);
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
basket = await _requestProvider.GetAsync<CustomerBasket>(uri, token);
|
||||||
|
}
|
||||||
|
catch (HttpRequestExceptionEx exception) when (exception.HttpCode == System.Net.HttpStatusCode.NotFound)
|
||||||
|
{
|
||||||
|
basket = null;
|
||||||
|
}
|
||||||
|
|
||||||
_fixUriService.FixBasketItemPictureUri(basket?.Items);
|
_fixUriService.FixBasketItemPictureUri(basket?.Items);
|
||||||
return basket;
|
return basket;
|
||||||
@ -37,7 +45,7 @@ namespace eShopOnContainers.Core.Services.Basket
|
|||||||
|
|
||||||
public async Task<CustomerBasket> UpdateBasketAsync(CustomerBasket customerBasket, string token)
|
public async Task<CustomerBasket> UpdateBasketAsync(CustomerBasket customerBasket, string token)
|
||||||
{
|
{
|
||||||
var builder = new UriBuilder(GlobalSetting.Instance.BasketEndpoint)
|
var builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint)
|
||||||
{
|
{
|
||||||
Path = ApiUrlBase
|
Path = ApiUrlBase
|
||||||
};
|
};
|
||||||
@ -49,7 +57,7 @@ namespace eShopOnContainers.Core.Services.Basket
|
|||||||
|
|
||||||
public async Task CheckoutAsync(BasketCheckout basketCheckout, string token)
|
public async Task CheckoutAsync(BasketCheckout basketCheckout, string token)
|
||||||
{
|
{
|
||||||
var builder = new UriBuilder(GlobalSetting.Instance.BasketEndpoint)
|
var builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint)
|
||||||
{
|
{
|
||||||
Path = $"{ApiUrlBase}/checkout"
|
Path = $"{ApiUrlBase}/checkout"
|
||||||
};
|
};
|
||||||
@ -60,7 +68,7 @@ namespace eShopOnContainers.Core.Services.Basket
|
|||||||
|
|
||||||
public async Task ClearBasketAsync(string guidUser, string token)
|
public async Task ClearBasketAsync(string guidUser, string token)
|
||||||
{
|
{
|
||||||
var builder = new UriBuilder(GlobalSetting.Instance.BasketEndpoint)
|
var builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint)
|
||||||
{
|
{
|
||||||
Path = $"{ApiUrlBase}/{guidUser}"
|
Path = $"{ApiUrlBase}/{guidUser}"
|
||||||
};
|
};
|
||||||
|
@ -14,6 +14,8 @@ namespace eShopOnContainers.Core.Services.Catalog
|
|||||||
private readonly IRequestProvider _requestProvider;
|
private readonly IRequestProvider _requestProvider;
|
||||||
private readonly IFixUriService _fixUriService;
|
private readonly IFixUriService _fixUriService;
|
||||||
|
|
||||||
|
private const string ApiUrlBase = "mobileshoppingapigw/api/v1/c/catalog";
|
||||||
|
|
||||||
public CatalogService(IRequestProvider requestProvider, IFixUriService fixUriService)
|
public CatalogService(IRequestProvider requestProvider, IFixUriService fixUriService)
|
||||||
{
|
{
|
||||||
_requestProvider = requestProvider;
|
_requestProvider = requestProvider;
|
||||||
@ -22,8 +24,8 @@ namespace eShopOnContainers.Core.Services.Catalog
|
|||||||
|
|
||||||
public async Task<ObservableCollection<CatalogItem>> FilterAsync(int catalogBrandId, int catalogTypeId)
|
public async Task<ObservableCollection<CatalogItem>> FilterAsync(int catalogBrandId, int catalogTypeId)
|
||||||
{
|
{
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint);
|
||||||
builder.Path = string.Format("api/v1/catalog/items/type/{0}/brand/{1}", catalogTypeId, catalogBrandId);
|
builder.Path = $"{ApiUrlBase}/items/type/{catalogTypeId}/brand/{catalogBrandId}";
|
||||||
string uri = builder.ToString();
|
string uri = builder.ToString();
|
||||||
|
|
||||||
CatalogRoot catalog = await _requestProvider.GetAsync<CatalogRoot>(uri);
|
CatalogRoot catalog = await _requestProvider.GetAsync<CatalogRoot>(uri);
|
||||||
@ -36,8 +38,8 @@ namespace eShopOnContainers.Core.Services.Catalog
|
|||||||
|
|
||||||
public async Task<ObservableCollection<CatalogItem>> GetCatalogAsync()
|
public async Task<ObservableCollection<CatalogItem>> GetCatalogAsync()
|
||||||
{
|
{
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint);
|
||||||
builder.Path = "api/v1/catalog/items";
|
builder.Path = $"{ApiUrlBase}/items";
|
||||||
string uri = builder.ToString();
|
string uri = builder.ToString();
|
||||||
|
|
||||||
CatalogRoot catalog = await _requestProvider.GetAsync<CatalogRoot>(uri);
|
CatalogRoot catalog = await _requestProvider.GetAsync<CatalogRoot>(uri);
|
||||||
@ -53,8 +55,8 @@ namespace eShopOnContainers.Core.Services.Catalog
|
|||||||
|
|
||||||
public async Task<ObservableCollection<CatalogBrand>> GetCatalogBrandAsync()
|
public async Task<ObservableCollection<CatalogBrand>> GetCatalogBrandAsync()
|
||||||
{
|
{
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint);
|
||||||
builder.Path = "api/v1/catalog/catalogbrands";
|
builder.Path = $"{ApiUrlBase}/catalogbrands";
|
||||||
string uri = builder.ToString();
|
string uri = builder.ToString();
|
||||||
|
|
||||||
IEnumerable<CatalogBrand> brands = await _requestProvider.GetAsync<IEnumerable<CatalogBrand>>(uri);
|
IEnumerable<CatalogBrand> brands = await _requestProvider.GetAsync<IEnumerable<CatalogBrand>>(uri);
|
||||||
@ -67,8 +69,8 @@ namespace eShopOnContainers.Core.Services.Catalog
|
|||||||
|
|
||||||
public async Task<ObservableCollection<CatalogType>> GetCatalogTypeAsync()
|
public async Task<ObservableCollection<CatalogType>> GetCatalogTypeAsync()
|
||||||
{
|
{
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint);
|
||||||
builder.Path = "api/v1/catalog/catalogtypes";
|
builder.Path = $"{ApiUrlBase}/catalogtypes";
|
||||||
string uri = builder.ToString();
|
string uri = builder.ToString();
|
||||||
|
|
||||||
IEnumerable<CatalogType> types = await _requestProvider.GetAsync<IEnumerable<CatalogType>>(uri);
|
IEnumerable<CatalogType> types = await _requestProvider.GetAsync<IEnumerable<CatalogType>>(uri);
|
||||||
|
@ -15,8 +15,8 @@ namespace eShopOnContainers.Core.Services.Location
|
|||||||
|
|
||||||
public async Task UpdateUserLocation(eShopOnContainers.Core.Models.Location.Location newLocReq, string token)
|
public async Task UpdateUserLocation(eShopOnContainers.Core.Models.Location.Location newLocReq, string token)
|
||||||
{
|
{
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.LocationEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint);
|
||||||
builder.Path = "api/v1/locations";
|
builder.Path = "/mobilemarketingapigw/api/v1/l/locations";
|
||||||
string uri = builder.ToString();
|
string uri = builder.ToString();
|
||||||
await _requestProvider.PostAsync(uri, newLocReq, token);
|
await _requestProvider.PostAsync(uri, newLocReq, token);
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,8 @@ namespace eShopOnContainers.Core.Services.Marketing
|
|||||||
private readonly IRequestProvider _requestProvider;
|
private readonly IRequestProvider _requestProvider;
|
||||||
private readonly IFixUriService _fixUriService;
|
private readonly IFixUriService _fixUriService;
|
||||||
|
|
||||||
|
private const string ApiUrlBase = "mobilemarketingapigw/api/v1/m/campaigns";
|
||||||
|
|
||||||
public CampaignService(IRequestProvider requestProvider, IFixUriService fixUriService)
|
public CampaignService(IRequestProvider requestProvider, IFixUriService fixUriService)
|
||||||
{
|
{
|
||||||
_requestProvider = requestProvider;
|
_requestProvider = requestProvider;
|
||||||
@ -21,8 +23,8 @@ namespace eShopOnContainers.Core.Services.Marketing
|
|||||||
|
|
||||||
public async Task<ObservableCollection<CampaignItem>> GetAllCampaignsAsync(string token)
|
public async Task<ObservableCollection<CampaignItem>> GetAllCampaignsAsync(string token)
|
||||||
{
|
{
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.MarketingEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint);
|
||||||
builder.Path = "api/v1/campaigns/user";
|
builder.Path = $"{ApiUrlBase}/user";
|
||||||
string uri = builder.ToString();
|
string uri = builder.ToString();
|
||||||
|
|
||||||
CampaignRoot campaign = await _requestProvider.GetAsync<CampaignRoot>(uri, token);
|
CampaignRoot campaign = await _requestProvider.GetAsync<CampaignRoot>(uri, token);
|
||||||
@ -38,8 +40,8 @@ namespace eShopOnContainers.Core.Services.Marketing
|
|||||||
|
|
||||||
public async Task<CampaignItem> GetCampaignByIdAsync(int campaignId, string token)
|
public async Task<CampaignItem> GetCampaignByIdAsync(int campaignId, string token)
|
||||||
{
|
{
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.MarketingEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint);
|
||||||
builder.Path = $"api/v1/campaigns/{campaignId}";
|
builder.Path = $"{ApiUrlBase}/{campaignId}";
|
||||||
string uri = builder.ToString();
|
string uri = builder.ToString();
|
||||||
return await _requestProvider.GetAsync<CampaignItem>(uri, token);
|
return await _requestProvider.GetAsync<CampaignItem>(uri, token);
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@ namespace eShopOnContainers.Core.Services.Order
|
|||||||
{
|
{
|
||||||
private readonly IRequestProvider _requestProvider;
|
private readonly IRequestProvider _requestProvider;
|
||||||
|
|
||||||
|
private const string ApiUrlBase = "mobileshoppingapigw/api/v1/o/orders";
|
||||||
|
|
||||||
public OrderService(IRequestProvider requestProvider)
|
public OrderService(IRequestProvider requestProvider)
|
||||||
{
|
{
|
||||||
_requestProvider = requestProvider;
|
_requestProvider = requestProvider;
|
||||||
@ -23,9 +25,9 @@ namespace eShopOnContainers.Core.Services.Order
|
|||||||
|
|
||||||
public async Task<ObservableCollection<Models.Orders.Order>> GetOrdersAsync(string token)
|
public async Task<ObservableCollection<Models.Orders.Order>> GetOrdersAsync(string token)
|
||||||
{
|
{
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.OrdersEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint);
|
||||||
|
|
||||||
builder.Path = "api/v1/orders";
|
builder.Path = ApiUrlBase;
|
||||||
|
|
||||||
string uri = builder.ToString();
|
string uri = builder.ToString();
|
||||||
|
|
||||||
@ -40,9 +42,9 @@ namespace eShopOnContainers.Core.Services.Order
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.OrdersEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint);
|
||||||
|
|
||||||
builder.Path = string.Format("api/v1/orders/{0}", orderId);
|
builder.Path = $"{ApiUrlBase}/{orderId}";
|
||||||
|
|
||||||
string uri = builder.ToString();
|
string uri = builder.ToString();
|
||||||
|
|
||||||
@ -76,9 +78,9 @@ namespace eShopOnContainers.Core.Services.Order
|
|||||||
|
|
||||||
public async Task<bool> CancelOrderAsync(int orderId, string token)
|
public async Task<bool> CancelOrderAsync(int orderId, string token)
|
||||||
{
|
{
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.OrdersEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BaseEndpoint);
|
||||||
|
|
||||||
builder.Path = "api/v1/orders/cancel";
|
builder.Path = $"{ApiUrlBase}/cancel";
|
||||||
|
|
||||||
var cancelOrderCommand = new CancelOrderCommand(orderId);
|
var cancelOrderCommand = new CancelOrderCommand(orderId);
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace eShopOnContainers.Core.Services.Settings
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace eShopOnContainers.Core.Services.Settings
|
||||||
{
|
{
|
||||||
public interface ISettingsService
|
public interface ISettingsService
|
||||||
{
|
{
|
||||||
@ -10,5 +12,10 @@
|
|||||||
string Latitude { get; set; }
|
string Latitude { get; set; }
|
||||||
string Longitude { get; set; }
|
string Longitude { get; set; }
|
||||||
bool AllowGpsLocation { get; set; }
|
bool AllowGpsLocation { get; set; }
|
||||||
|
|
||||||
|
bool GetValueOrDefault(string key, bool defaultValue);
|
||||||
|
string GetValueOrDefault(string key, string defaultValue);
|
||||||
|
Task AddOrUpdateValue(string key, bool value);
|
||||||
|
Task AddOrUpdateValue(string key, string value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
namespace eShopOnContainers.Core.Services.Settings
|
|
||||||
{
|
|
||||||
public interface ISettingsServiceImplementation
|
|
||||||
{
|
|
||||||
bool GetValueOrDefault(string key, bool defaultValue);
|
|
||||||
string GetValueOrDefault(string key, string defaultValue);
|
|
||||||
|
|
||||||
bool AddOrUpdateValue(string key, bool value);
|
|
||||||
bool AddOrUpdateValue(string key, string value);
|
|
||||||
|
|
||||||
void Remove(string key);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +1,11 @@
|
|||||||
using eShopOnContainers.Core.Services.Dependency;
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace eShopOnContainers.Core.Services.Settings
|
namespace eShopOnContainers.Core.Services.Settings
|
||||||
{
|
{
|
||||||
public class SettingsService : ISettingsService
|
public class SettingsService : ISettingsService
|
||||||
{
|
{
|
||||||
private readonly ISettingsServiceImplementation _settingsService;
|
|
||||||
|
|
||||||
ISettingsServiceImplementation AppSettings
|
|
||||||
{
|
|
||||||
get { return _settingsService; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SettingsService(IDependencyService dependencyService)
|
|
||||||
{
|
|
||||||
_settingsService = dependencyService.Get<ISettingsServiceImplementation>();
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Setting Constants
|
#region Setting Constants
|
||||||
|
|
||||||
private const string AccessToken = "access_token";
|
private const string AccessToken = "access_token";
|
||||||
@ -37,52 +27,113 @@ namespace eShopOnContainers.Core.Services.Settings
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Settings Properties
|
||||||
|
|
||||||
public string AuthAccessToken
|
public string AuthAccessToken
|
||||||
{
|
{
|
||||||
get => AppSettings.GetValueOrDefault(AccessToken, AccessTokenDefault);
|
get => GetValueOrDefault(AccessToken, AccessTokenDefault);
|
||||||
set => AppSettings.AddOrUpdateValue(AccessToken, value);
|
set => AddOrUpdateValue(AccessToken, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string AuthIdToken
|
public string AuthIdToken
|
||||||
{
|
{
|
||||||
get => AppSettings.GetValueOrDefault(IdToken, IdTokenDefault);
|
get => GetValueOrDefault(IdToken, IdTokenDefault);
|
||||||
set => AppSettings.AddOrUpdateValue(IdToken, value);
|
set => AddOrUpdateValue(IdToken, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool UseMocks
|
public bool UseMocks
|
||||||
{
|
{
|
||||||
get => AppSettings.GetValueOrDefault(IdUseMocks, UseMocksDefault);
|
get => GetValueOrDefault(IdUseMocks, UseMocksDefault);
|
||||||
set => AppSettings.AddOrUpdateValue(IdUseMocks, value);
|
set => AddOrUpdateValue(IdUseMocks, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string UrlBase
|
public string UrlBase
|
||||||
{
|
{
|
||||||
get => AppSettings.GetValueOrDefault(IdUrlBase, UrlBaseDefault);
|
get => GetValueOrDefault(IdUrlBase, UrlBaseDefault);
|
||||||
set => AppSettings.AddOrUpdateValue(IdUrlBase, value);
|
set => AddOrUpdateValue(IdUrlBase, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool UseFakeLocation
|
public bool UseFakeLocation
|
||||||
{
|
{
|
||||||
get => AppSettings.GetValueOrDefault(IdUseFakeLocation, UseFakeLocationDefault);
|
get => GetValueOrDefault(IdUseFakeLocation, UseFakeLocationDefault);
|
||||||
set => AppSettings.AddOrUpdateValue(IdUseFakeLocation, value);
|
set => AddOrUpdateValue(IdUseFakeLocation, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Latitude
|
public string Latitude
|
||||||
{
|
{
|
||||||
get => AppSettings.GetValueOrDefault(IdLatitude, FakeLatitudeDefault.ToString());
|
get => GetValueOrDefault(IdLatitude, FakeLatitudeDefault.ToString());
|
||||||
set => AppSettings.AddOrUpdateValue(IdLatitude, value);
|
set => AddOrUpdateValue(IdLatitude, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Longitude
|
public string Longitude
|
||||||
{
|
{
|
||||||
get => AppSettings.GetValueOrDefault(IdLongitude, FakeLongitudeDefault.ToString());
|
get => GetValueOrDefault(IdLongitude, FakeLongitudeDefault.ToString());
|
||||||
set => AppSettings.AddOrUpdateValue(IdLongitude, value);
|
set => AddOrUpdateValue(IdLongitude, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AllowGpsLocation
|
public bool AllowGpsLocation
|
||||||
{
|
{
|
||||||
get => AppSettings.GetValueOrDefault(IdAllowGpsLocation, AllowGpsLocationDefault);
|
get => GetValueOrDefault(IdAllowGpsLocation, AllowGpsLocationDefault);
|
||||||
set => AppSettings.AddOrUpdateValue(IdAllowGpsLocation, value);
|
set => AddOrUpdateValue(IdAllowGpsLocation, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Public Methods
|
||||||
|
|
||||||
|
public Task AddOrUpdateValue(string key, bool value) => AddOrUpdateValueInternal(key, value);
|
||||||
|
public Task AddOrUpdateValue(string key, string value) => AddOrUpdateValueInternal(key, value);
|
||||||
|
public bool GetValueOrDefault(string key, bool defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||||
|
public string GetValueOrDefault(string key, string defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Internal Implementation
|
||||||
|
|
||||||
|
async Task AddOrUpdateValueInternal<T>(string key, T value)
|
||||||
|
{
|
||||||
|
if (value == null)
|
||||||
|
{
|
||||||
|
await Remove(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
Application.Current.Properties[key] = value;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await Application.Current.SavePropertiesAsync();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Unable to save: " + key, " Message: " + ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
T GetValueOrDefaultInternal<T>(string key, T defaultValue = default(T))
|
||||||
|
{
|
||||||
|
object value = null;
|
||||||
|
if (Application.Current.Properties.ContainsKey(key))
|
||||||
|
{
|
||||||
|
value = Application.Current.Properties[key];
|
||||||
|
}
|
||||||
|
return null != value ? (T)value : defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
async Task Remove(string key)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (Application.Current.Properties[key] != null)
|
||||||
|
{
|
||||||
|
Application.Current.Properties.Remove(key);
|
||||||
|
await Application.Current.SavePropertiesAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Unable to remove: " + key, " Message: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
}
|
}
|
@ -341,24 +341,10 @@
|
|||||||
AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
|
AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
|
||||||
AbsoluteLayout.LayoutFlags="All">
|
AbsoluteLayout.LayoutFlags="All">
|
||||||
<WebView.Behaviors>
|
<WebView.Behaviors>
|
||||||
<OnPlatform x:TypeArguments="Behavior">
|
|
||||||
<On Platform="iOS, Android">
|
|
||||||
<On.Value>
|
|
||||||
<behaviors:EventToCommandBehavior
|
<behaviors:EventToCommandBehavior
|
||||||
EventName="Navigating"
|
EventName="Navigating"
|
||||||
EventArgsConverter="{StaticResource WebNavigatingEventArgsConverter}"
|
EventArgsConverter="{StaticResource WebNavigatingEventArgsConverter}"
|
||||||
Command="{Binding NavigateCommand}" />
|
Command="{Binding NavigateCommand}" />
|
||||||
</On.Value>
|
|
||||||
</On>
|
|
||||||
<On Platform="UWP">
|
|
||||||
<On.Value>
|
|
||||||
<behaviors:EventToCommandBehavior
|
|
||||||
EventName="Navigated"
|
|
||||||
EventArgsConverter="{StaticResource WebNavigatedEventArgsConverter}"
|
|
||||||
Command="{Binding NavigateCommand}" />
|
|
||||||
</On.Value>
|
|
||||||
</On>
|
|
||||||
</OnPlatform>
|
|
||||||
</WebView.Behaviors>
|
</WebView.Behaviors>
|
||||||
</WebView>
|
</WebView>
|
||||||
</AbsoluteLayout>
|
</AbsoluteLayout>
|
||||||
|
@ -32,7 +32,7 @@ namespace eShopOnContainers.Droid.Extensions
|
|||||||
{
|
{
|
||||||
return new DateTimeOffset(Epoch.AddMilliseconds(location.Time));
|
return new DateTimeOffset(Epoch.AddMilliseconds(location.Time));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
return new DateTimeOffset(Epoch);
|
return new DateTimeOffset(Epoch);
|
||||||
}
|
}
|
||||||
|
@ -1,149 +0,0 @@
|
|||||||
using Android.App;
|
|
||||||
using Android.Content;
|
|
||||||
using Android.Preferences;
|
|
||||||
using eShopOnContainers.Core.Services.Settings;
|
|
||||||
using eShopOnContainers.Droid.Services;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
[assembly: Xamarin.Forms.Dependency(typeof(SettingsServiceImplementation))]
|
|
||||||
namespace eShopOnContainers.Droid.Services
|
|
||||||
{
|
|
||||||
public class SettingsServiceImplementation : ISettingsServiceImplementation
|
|
||||||
{
|
|
||||||
#region Internal Implementation
|
|
||||||
|
|
||||||
readonly object _locker = new object();
|
|
||||||
|
|
||||||
ISharedPreferences GetSharedPreference()
|
|
||||||
{
|
|
||||||
return PreferenceManager.GetDefaultSharedPreferences(Application.Context);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AddOrUpdateValueInternal<T>(string key, T value)
|
|
||||||
{
|
|
||||||
if (Application.Context == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (value == null)
|
|
||||||
{
|
|
||||||
Remove(key);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var type = typeof(T);
|
|
||||||
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
|
|
||||||
{
|
|
||||||
type = Nullable.GetUnderlyingType(type);
|
|
||||||
}
|
|
||||||
var typeCode = Type.GetTypeCode(type);
|
|
||||||
|
|
||||||
lock (_locker)
|
|
||||||
{
|
|
||||||
using (var sharedPrefs = GetSharedPreference())
|
|
||||||
{
|
|
||||||
using (var editor = sharedPrefs.Edit())
|
|
||||||
{
|
|
||||||
switch (typeCode)
|
|
||||||
{
|
|
||||||
case TypeCode.Boolean:
|
|
||||||
editor.PutBoolean(key, Convert.ToBoolean(value));
|
|
||||||
break;
|
|
||||||
case TypeCode.String:
|
|
||||||
editor.PutString(key, Convert.ToString(value));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new ArgumentException($"Value of type {typeCode} is not supported.");
|
|
||||||
}
|
|
||||||
editor.Commit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
T GetValueOrDefaultInternal<T>(string key, T defaultValue = default(T))
|
|
||||||
{
|
|
||||||
if (Application.Context == null)
|
|
||||||
return defaultValue;
|
|
||||||
|
|
||||||
if (!Contains(key))
|
|
||||||
return defaultValue;
|
|
||||||
|
|
||||||
lock (_locker)
|
|
||||||
{
|
|
||||||
using (var sharedPrefs = GetSharedPreference())
|
|
||||||
{
|
|
||||||
var type = typeof(T);
|
|
||||||
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
|
|
||||||
{
|
|
||||||
type = Nullable.GetUnderlyingType(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
object value = null;
|
|
||||||
var typeCode = Type.GetTypeCode(type);
|
|
||||||
switch (typeCode)
|
|
||||||
{
|
|
||||||
case TypeCode.Boolean:
|
|
||||||
value = sharedPrefs.GetBoolean(key, Convert.ToBoolean(defaultValue));
|
|
||||||
break;
|
|
||||||
case TypeCode.String:
|
|
||||||
value = sharedPrefs.GetString(key, Convert.ToString(defaultValue));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new ArgumentException($"Value of type {typeCode} is not supported.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return null != value ? (T)value : defaultValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Contains(string key)
|
|
||||||
{
|
|
||||||
if (Application.Context == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
lock (_locker)
|
|
||||||
{
|
|
||||||
using (var sharedPrefs = GetSharedPreference())
|
|
||||||
{
|
|
||||||
if (sharedPrefs == null)
|
|
||||||
return false;
|
|
||||||
return sharedPrefs.Contains(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region ISettingsServiceImplementation
|
|
||||||
|
|
||||||
public bool AddOrUpdateValue(string key, bool value) => AddOrUpdateValueInternal(key, value);
|
|
||||||
|
|
||||||
public bool AddOrUpdateValue(string key, string value) => AddOrUpdateValueInternal(key, value);
|
|
||||||
|
|
||||||
public bool GetValueOrDefault(string key, bool defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
|
||||||
|
|
||||||
public string GetValueOrDefault(string key, string defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
|
||||||
|
|
||||||
public void Remove(string key)
|
|
||||||
{
|
|
||||||
if (Application.Context == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lock (_locker)
|
|
||||||
{
|
|
||||||
using (var sharedPrefs = GetSharedPreference())
|
|
||||||
{
|
|
||||||
using (var editor = sharedPrefs.Edit())
|
|
||||||
{
|
|
||||||
editor.Remove(key);
|
|
||||||
editor.Commit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
@ -19,7 +19,7 @@
|
|||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
||||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
|
||||||
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
|
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
|
||||||
<AndroidStoreUncompressedFileExtensions />
|
<AndroidStoreUncompressedFileExtensions />
|
||||||
<MandroidI18n />
|
<MandroidI18n />
|
||||||
@ -211,7 +211,6 @@
|
|||||||
<Compile Include="Effects\CircleEffect.cs" />
|
<Compile Include="Effects\CircleEffect.cs" />
|
||||||
<Compile Include="Effects\BaseContainerEffect.cs" />
|
<Compile Include="Effects\BaseContainerEffect.cs" />
|
||||||
<Compile Include="Activities\SplashActivity.cs" />
|
<Compile Include="Activities\SplashActivity.cs" />
|
||||||
<Compile Include="Services\SettingsServiceImplementation.cs" />
|
|
||||||
<Compile Include="Services\PermissionsService.cs" />
|
<Compile Include="Services\PermissionsService.cs" />
|
||||||
<Compile Include="Services\LocationServiceImplementation.cs" />
|
<Compile Include="Services\LocationServiceImplementation.cs" />
|
||||||
<Compile Include="Services\GeolocationSingleListener.cs" />
|
<Compile Include="Services\GeolocationSingleListener.cs" />
|
||||||
|
@ -1,429 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\build\netstandard1.0\Xamarin.Forms.props')" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProductVersion>8.0.30703</ProductVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{62DBB163-9CA9-4818-B48B-13233DF37C24}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>eShopOnContainers.Droid</RootNamespace>
|
|
||||||
<AssemblyName>eShopOnContainers.Droid</AssemblyName>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<AndroidApplication>true</AndroidApplication>
|
|
||||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
|
||||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
|
||||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
|
||||||
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
|
|
||||||
<AndroidStoreUncompressedFileExtensions />
|
|
||||||
<MandroidI18n />
|
|
||||||
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
|
|
||||||
<JavaOptions />
|
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
<AndroidTlsProvider>
|
|
||||||
</AndroidTlsProvider>
|
|
||||||
<SkipValidatePackageReferences>true</SkipValidatePackageReferences>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>True</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
|
|
||||||
<AndroidLinkMode>None</AndroidLinkMode>
|
|
||||||
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
|
|
||||||
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
|
|
||||||
<Debugger>Xamarin</Debugger>
|
|
||||||
<AndroidSupportedAbis>armeabi;armeabi-v7a;x86</AndroidSupportedAbis>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
|
|
||||||
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="Acr.Support.Android, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Acr.Support.2.1.0\lib\MonoAndroid10\Acr.Support.Android.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="AndHUD, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\AndHUD.1.2.0\lib\MonoAndroid\AndHUD.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="FFImageLoading, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.2.9\lib\MonoAndroid10\FFImageLoading.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="FFImageLoading.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.2.9\lib\MonoAndroid10\FFImageLoading.Platform.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="IdentityModel.Portable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\IdentityModel.1.3.1\lib\portable-net45+wp80+win8+wpa81\IdentityModel.Portable.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="ModernHttpClient, Version=2.4.2.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\ModernHttpClient.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Mono.Android" />
|
|
||||||
<Reference Include="mscorlib" />
|
|
||||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="OkHttp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\OkHttp.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PCLCrypto, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d4421c8a4786956c, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\PCLCrypto.2.0.147\lib\MonoAndroid23\PCLCrypto.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PInvoke.BCrypt, Version=0.3.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\PInvoke.BCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.BCrypt.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PInvoke.Kernel32, Version=0.3.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\PInvoke.Kernel32.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Kernel32.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PInvoke.NCrypt, Version=0.3.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\PInvoke.NCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.NCrypt.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PInvoke.Windows.Core, Version=0.3.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\PInvoke.Windows.Core.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Windows.Core.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Plugin.CurrentActivity, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Plugin.CurrentActivity.1.0.1\lib\MonoAndroid10\Plugin.CurrentActivity.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Plugin.Geolocator, Version=3.0.4.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\MonoAndroid10\Plugin.Geolocator.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Plugin.Geolocator.Abstractions, Version=3.0.4.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\MonoAndroid10\Plugin.Geolocator.Abstractions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Plugin.Permissions, Version=1.1.6.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Plugin.Permissions.1.1.7\lib\MonoAndroid10\Plugin.Permissions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Plugin.Permissions.Abstractions, Version=1.1.6.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Plugin.Permissions.1.1.7\lib\MonoAndroid10\Plugin.Permissions.Abstractions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Plugin.Settings, Version=2.6.0.12, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Xam.Plugins.Settings.2.6.0.12-beta\lib\MonoAndroid10\Plugin.Settings.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Plugin.Settings.Abstractions, Version=2.6.0.12, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Xam.Plugins.Settings.2.6.0.12-beta\lib\MonoAndroid10\Plugin.Settings.Abstractions.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="SlideOverKit, Version=1.0.6135.18790, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.4\lib\MonoAndroid10\SlideOverKit.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="SlideOverKit.Droid, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.4\lib\MonoAndroid10\SlideOverKit.Droid.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Splat.1.6.2\lib\monoandroid\Splat.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Extensions.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Primitives.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="Validation, Version=2.2.0.0, Culture=neutral, PublicKeyToken=2fc06f0d701809a7, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\..\packages\Validation.2.2.8\lib\dotnet\Validation.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.IO.Compression" />
|
|
||||||
<Reference Include="Autofac">
|
|
||||||
<HintPath>..\..\..\..\packages\Autofac.4.5.0\lib\netstandard1.1\Autofac.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Acr.UserDialogs">
|
|
||||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.3.8\lib\MonoAndroid10\Acr.UserDialogs.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Acr.UserDialogs.Interface">
|
|
||||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.3.8\lib\MonoAndroid10\Acr.UserDialogs.Interface.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="FormsViewGroup">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Forms.Core">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Forms.Platform.Android">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Forms.Platform">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Forms.Xaml">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="FFImageLoading.Forms">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\MonoAndroid10\FFImageLoading.Forms.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="FFImageLoading.Forms.Droid">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\MonoAndroid10\FFImageLoading.Forms.Droid.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.Animated.Vector.Drawable">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.Vector.Drawable">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.v7.RecyclerView">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.v7.RecyclerView.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.RecyclerView.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.Annotations">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Annotations.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Annotations.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.Compat">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Compat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Compat.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.v7.CardView">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.v7.CardView.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.CardView.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.Media.Compat">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Media.Compat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Media.Compat.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.Core.UI">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Core.UI.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Core.UI.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.Core.Utils">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Core.Utils.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Core.Utils.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.Fragment">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Fragment.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Fragment.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.Design">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Design.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Design.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.Transition">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Transition.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Transition.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.v4">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.v4.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v4.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.v7.Palette">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.v7.Palette.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.Palette.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.v7.AppCompat">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Xamarin.Android.Support.v7.MediaRouter">
|
|
||||||
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Activities\MainActivity.cs" />
|
|
||||||
<Compile Include="Effects\EntryLineColorEffect.cs" />
|
|
||||||
<Compile Include="Extensions\ViewExtensions.cs" />
|
|
||||||
<Compile Include="Helpers\Settings.cs" />
|
|
||||||
<Compile Include="MainApplication.cs" />
|
|
||||||
<Compile Include="Renderers\BadgeView.cs" />
|
|
||||||
<Compile Include="Renderers\CustomNavigationPageRenderer.cs" />
|
|
||||||
<Compile Include="Renderers\CustomTabbedPageRenderer.cs" />
|
|
||||||
<Compile Include="Renderers\SlideDownMenuPageRenderer.cs" />
|
|
||||||
<Compile Include="Resources\Resource.Designer.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Effects\CircleEffect.cs" />
|
|
||||||
<Compile Include="Effects\BaseContainerEffect.cs" />
|
|
||||||
<Compile Include="Activities\SplashActivity.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidAsset Include="..\CommonResources\Fonts\Montserrat-Bold.ttf">
|
|
||||||
<Link>Assets\Montserrat-Bold.ttf</Link>
|
|
||||||
</AndroidAsset>
|
|
||||||
<AndroidAsset Include="..\CommonResources\Fonts\Montserrat-Regular.ttf">
|
|
||||||
<Link>Assets\Montserrat-Regular.ttf</Link>
|
|
||||||
</AndroidAsset>
|
|
||||||
<AndroidAsset Include="..\CommonResources\Fonts\SourceSansPro-Regular.ttf">
|
|
||||||
<Link>Assets\SourceSansPro-Regular.ttf</Link>
|
|
||||||
</AndroidAsset>
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="packages.config" />
|
|
||||||
<None Include="Resources\AboutResources.txt" />
|
|
||||||
<None Include="Assets\AboutAssets.txt" />
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\switch_off.png" />
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\switch_on.png" />
|
|
||||||
<AndroidResource Include="Resources\layout\Tabs.axml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</AndroidResource>
|
|
||||||
<AndroidResource Include="Resources\layout\Toolbar.axml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</AndroidResource>
|
|
||||||
<AndroidResource Include="Resources\layout\TabLayout.axml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</AndroidResource>
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\menu_campaigns.png" />
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\menu_campaigns.png" />
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\menu_campaigns.png" />
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\menu_filter.png" />
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\menu_filter.png" />
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\menu_filter.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\icon.png" />
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\icon.png" />
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\icon.png" />
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\icon.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Properties\AndroidManifest.xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\values\styles.xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\fake_product_01.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\fake_product_03.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\fake_product_02.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\menu_profile.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\menu_profile.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\menu_profile.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\menu_cart.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\menu_cart.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\menu_cart.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\product_add.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\product_add.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\product_add.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\values\colors.xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\background.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\background.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\background.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\fake_product_04.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\fake_product_05.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\app_settings.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\app_settings.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\app_settings.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\switch_on.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\switch_on.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\switch_off.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\switch_off.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\noimage.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\default_product.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\banner.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-hdpi\header_logo.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xhdpi\header_logo.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable-xxhdpi\header_logo.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\fake_campaign_02.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\fake_campaign_01.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="Resources\drawable\default_campaign.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\eShopOnContainers.Core\eShopOnContainers.Core.csproj">
|
|
||||||
<Project>{ba96a12c-4ee3-46c4-bb3f-f811b554cd01}</Project>
|
|
||||||
<Name>eShopOnContainers.Core</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<Import Project="..\..\..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\build\netstandard1.0\Xamarin.Forms.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.v7.RecyclerView.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.RecyclerView.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.v7.RecyclerView.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.RecyclerView.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Compat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.Compat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.v7.CardView.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.CardView.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.v7.CardView.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.CardView.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Media.Compat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Media.Compat.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.Media.Compat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Media.Compat.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Core.UI.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.Core.UI.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Core.Utils.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Core.Utils.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.Core.Utils.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Core.Utils.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Fragment.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Fragment.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.Fragment.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Fragment.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Design.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Design.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.Design.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Design.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Transition.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Transition.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.Transition.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Transition.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.v4.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v4.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.v4.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v4.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.v7.Palette.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.Palette.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.v7.Palette.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.Palette.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets')" />
|
|
||||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.targets')" />
|
|
||||||
</Project>
|
|
@ -13,6 +13,7 @@
|
|||||||
<AssemblyName>eShopOnContainersTestRunneriOS</AssemblyName>
|
<AssemblyName>eShopOnContainersTestRunneriOS</AssemblyName>
|
||||||
<NuGetPackageImportStamp>
|
<NuGetPackageImportStamp>
|
||||||
</NuGetPackageImportStamp>
|
</NuGetPackageImportStamp>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@ -145,7 +146,6 @@
|
|||||||
<Reference Include="xunit.execution.dotnet">
|
<Reference Include="xunit.execution.dotnet">
|
||||||
<HintPath>..\..\..\..\packages\xunit.extensibility.execution.2.3.1\lib\netstandard1.1\xunit.execution.dotnet.dll</HintPath>
|
<HintPath>..\..\..\..\packages\xunit.extensibility.execution.2.3.1\lib\netstandard1.1\xunit.execution.dotnet.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="Newtonsoft.Json">
|
||||||
<HintPath>..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user