Showing preview only (1,259K chars total). Download the full file or copy to clipboard to get everything.
Repository: digitalocean/kubernetes-sample-apps
Branch: master
Commit: 6d8ffb91dc26
Files: 206
Total size: 1.2 MB
Directory structure:
gitextract_b1f7n2wi/
├── .github/
│ └── workflows/
│ ├── game-2048-kubescape.yaml
│ ├── game-2048-snyk.yaml
│ ├── online-boutique-main-ci.yaml
│ ├── online-boutique-pr-ci.yaml
│ ├── online-boutique-pr-kustomize-validation.yaml
│ ├── online-boutique-release.yaml
│ ├── online-boutique-snyk-docker-scan.yaml
│ ├── online-boutique-snyk-iac-scan.yaml
│ └── online-boutique-snyk-source-code-scan.yaml
├── .gitignore
├── README.md
├── bookinfo-example/
│ ├── README.md
│ └── kustomize/
│ ├── kustomization.yaml
│ └── resources/
│ └── namespace.yaml
├── doks-example/
│ ├── .travis.yml
│ ├── Dockerfile
│ ├── LICENSE
│ ├── README.md
│ ├── manifest.yaml
│ ├── script/
│ │ ├── docker-publish
│ │ ├── down
│ │ ├── up
│ │ └── wait-for-service
│ └── web/
│ ├── index.html
│ └── style.css
├── emojivoto-example/
│ ├── README.md
│ └── kustomize/
│ ├── kustomization.yaml
│ └── patches/
│ ├── emoji-svc.yaml
│ └── voting-svc.yaml
├── game-2048-example/
│ ├── .dockerignore
│ ├── .gitignore
│ ├── Dockerfile
│ ├── LICENSE
│ ├── README.md
│ ├── Tiltfile
│ ├── knative-service.yaml
│ ├── kustomize/
│ │ ├── kustomization.yaml
│ │ └── resources/
│ │ ├── deployment.yaml
│ │ ├── namespace.yaml
│ │ └── service.yaml
│ ├── package.json
│ ├── src/
│ │ └── index.js
│ └── webpack.config.js
├── microservices-demo/
│ ├── .gitignore
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── Tiltfile
│ ├── kustomize/
│ │ ├── base/
│ │ │ ├── cartservice.yaml
│ │ │ ├── checkoutservice.yaml
│ │ │ ├── currencyservice.yaml
│ │ │ ├── emailservice.yaml
│ │ │ ├── frontend.yaml
│ │ │ ├── kustomization.yaml
│ │ │ ├── namespace.yaml
│ │ │ ├── paymentservice.yaml
│ │ │ ├── productcatalogservice.yaml
│ │ │ ├── recommendationservice.yaml
│ │ │ ├── redis.yaml
│ │ │ └── shippingservice.yaml
│ │ ├── dev/
│ │ │ └── kustomization.yaml
│ │ ├── kustomization.yaml
│ │ ├── prod/
│ │ │ └── kustomization.yaml
│ │ └── staging/
│ │ └── kustomization.yaml
│ ├── release-scripts/
│ │ ├── README.md
│ │ ├── license_header.txt
│ │ ├── make-cnb-docker-images.sh
│ │ ├── make-docker-images.sh
│ │ ├── make-release-artifacts.sh
│ │ └── make-release.sh
│ ├── src/
│ │ ├── .gitignore
│ │ ├── cartservice/
│ │ │ ├── .gitignore
│ │ │ ├── cartservice.sln
│ │ │ ├── src/
│ │ │ │ ├── .dockerignore
│ │ │ │ ├── Dockerfile
│ │ │ │ ├── Dockerfile.debug
│ │ │ │ ├── Program.cs
│ │ │ │ ├── Startup.cs
│ │ │ │ ├── appsettings.json
│ │ │ │ ├── cartservice.csproj
│ │ │ │ ├── cartstore/
│ │ │ │ │ ├── ICartStore.cs
│ │ │ │ │ └── RedisCartStore.cs
│ │ │ │ ├── protos/
│ │ │ │ │ └── Cart.proto
│ │ │ │ └── services/
│ │ │ │ ├── CartService.cs
│ │ │ │ └── HealthCheckService.cs
│ │ │ └── tests/
│ │ │ ├── .gitignore
│ │ │ ├── CartServiceTests.cs
│ │ │ └── cartservice.tests.csproj
│ │ ├── checkoutservice/
│ │ │ ├── .dockerignore
│ │ │ ├── Dockerfile
│ │ │ ├── README.md
│ │ │ ├── genproto/
│ │ │ │ └── demo.pb.go
│ │ │ ├── genproto.sh
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── main.go
│ │ │ └── money/
│ │ │ ├── money.go
│ │ │ └── money_test.go
│ │ ├── currencyservice/
│ │ │ ├── .dockerignore
│ │ │ ├── .gitignore
│ │ │ ├── Dockerfile
│ │ │ ├── client.js
│ │ │ ├── data/
│ │ │ │ └── currency_conversion.json
│ │ │ ├── genproto.sh
│ │ │ ├── package.json
│ │ │ ├── proto/
│ │ │ │ ├── demo.proto
│ │ │ │ └── grpc/
│ │ │ │ └── health/
│ │ │ │ └── v1/
│ │ │ │ └── health.proto
│ │ │ └── server.js
│ │ ├── emailservice/
│ │ │ ├── .python-version
│ │ │ ├── Dockerfile
│ │ │ ├── Procfile
│ │ │ ├── demo_pb2.py
│ │ │ ├── demo_pb2_grpc.py
│ │ │ ├── email_client.py
│ │ │ ├── email_server.py
│ │ │ ├── genproto.sh
│ │ │ ├── logger.py
│ │ │ ├── pytest.ini
│ │ │ ├── requirements.in
│ │ │ ├── requirements.txt
│ │ │ ├── templates/
│ │ │ │ └── confirmation.html
│ │ │ └── tests/
│ │ │ └── test_sample.py
│ │ ├── frontend/
│ │ │ ├── .dockerignore
│ │ │ ├── .gitkeep
│ │ │ ├── Dockerfile
│ │ │ ├── README.md
│ │ │ ├── deployment_details.go
│ │ │ ├── genproto/
│ │ │ │ └── demo.pb.go
│ │ │ ├── genproto.sh
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── handlers.go
│ │ │ ├── main.go
│ │ │ ├── middleware.go
│ │ │ ├── money/
│ │ │ │ ├── money.go
│ │ │ │ └── money_test.go
│ │ │ ├── rpc.go
│ │ │ ├── static/
│ │ │ │ ├── images/
│ │ │ │ │ └── credits.txt
│ │ │ │ └── styles/
│ │ │ │ ├── cart.css
│ │ │ │ ├── order.css
│ │ │ │ └── styles.css
│ │ │ └── templates/
│ │ │ ├── ad.html
│ │ │ ├── cart.html
│ │ │ ├── error.html
│ │ │ ├── footer.html
│ │ │ ├── header.html
│ │ │ ├── home.html
│ │ │ ├── order.html
│ │ │ ├── product.html
│ │ │ └── recommendations.html
│ │ ├── loadgenerator/
│ │ │ ├── Dockerfile
│ │ │ ├── loadgenerator.yaml
│ │ │ ├── locustfile.py
│ │ │ ├── requirements.in
│ │ │ └── requirements.txt
│ │ ├── paymentservice/
│ │ │ ├── .dockerignore
│ │ │ ├── .gitignore
│ │ │ ├── Dockerfile
│ │ │ ├── charge.js
│ │ │ ├── genproto.sh
│ │ │ ├── index.js
│ │ │ ├── package.json
│ │ │ ├── proto/
│ │ │ │ ├── demo.proto
│ │ │ │ └── grpc/
│ │ │ │ └── health/
│ │ │ │ └── v1/
│ │ │ │ └── health.proto
│ │ │ └── server.js
│ │ ├── productcatalogservice/
│ │ │ ├── .dockerignore
│ │ │ ├── Dockerfile
│ │ │ ├── README.md
│ │ │ ├── genproto/
│ │ │ │ └── demo.pb.go
│ │ │ ├── genproto.sh
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── products.json
│ │ │ ├── server.go
│ │ │ └── server_test.go
│ │ ├── recommendationservice/
│ │ │ ├── .gitignore
│ │ │ ├── .python-version
│ │ │ ├── Dockerfile
│ │ │ ├── Procfile
│ │ │ ├── client.py
│ │ │ ├── demo_pb2.py
│ │ │ ├── demo_pb2_grpc.py
│ │ │ ├── genproto.sh
│ │ │ ├── logger.py
│ │ │ ├── pytest.ini
│ │ │ ├── recommendation_server.py
│ │ │ ├── requirements.in
│ │ │ ├── requirements.txt
│ │ │ └── tests/
│ │ │ └── test_sample.py
│ │ └── shippingservice/
│ │ ├── .dockerignore
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── genproto/
│ │ │ └── demo.pb.go
│ │ ├── genproto.sh
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main.go
│ │ ├── quote.go
│ │ ├── shippingservice_test.go
│ │ └── tracker.go
│ └── tilt-resources/
│ ├── dev/
│ │ └── tilt_config.json
│ └── local/
│ └── tilt_config.json
└── podinfo-example/
├── README.md
└── kustomize/
├── kustomization.yaml
└── resources/
└── namespace.yaml
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/game-2048-kubescape.yaml
================================================
name: Game 2048 Kubescape CI/CD Example
on:
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
kubescape_fail_threshold:
description: "Sets fail threshold for Kubescape"
required: true
default: "30"
env:
ENVIRONMENT: "dev"
PROJECT_DIR: "game-2048-example"
PROJECT_NAME: "game-2048"
KUBESCAPE_FAIL_THRESHOLD: 30
jobs:
build-and-test-application:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
working-directory: ${{ env.PROJECT_DIR }}
kubescape-nsa-security-check:
runs-on: ubuntu-latest
needs: build-and-test-application
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Kubescape
run: curl -s https://raw.githubusercontent.com/armosec/kubescape/master/install.sh | /bin/bash
- name: Scan Kubernetes YAML files
run: |
kubescape scan framework nsa kustomize/ \
-t ${{ github.event.inputs.kubescape_fail_threshold || env.KUBESCAPE_FAIL_THRESHOLD }} \
--submit --account=${{ secrets.ARMOSEC_PORTAL_ACCOUNT_ID }}
working-directory: ${{ env.PROJECT_DIR }}
- name: Notify using Slack about Kubescape Scan Issues
if: ${{ always() }}
uses: 8398a7/action-slack@v3
with:
status: custom
fields: workflow,job,commit,repo,ref,author,took
custom_payload: |
{
attachments: [
{
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
text:`
${process.env.AS_WORKFLOW}\n
*Environment*: ${process.env.ENVIRONMENT}\n
*Job:* ${process.env.AS_JOB}\n
*Commit:* (${process.env.AS_COMMIT})\n
*Repo:* ${process.env.AS_REPO}\n
*Ref:* ${process.env.AS_REF}\n
*Author:* ${process.env.AS_AUTHOR}\n
*Status:* ${{ job.status }} in ${process.env.AS_TOOK}\n
*Kubescape scan results:* https://cloud.armosec.io/repositories-scan/
`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
build-and-push-app-image:
runs-on: ubuntu-latest
needs: kubescape-nsa-security-check
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 600
- name: Push App Image to DigitalOcean Container Registry
uses: docker/build-push-action@v3
with:
context: ${{ env.PROJECT_DIR }}
push: true
tags: "${{ secrets.DOCKER_REGISTRY }}/${{ env.PROJECT_NAME }}:${{ github.sha }}"
deploy-to-k8s:
runs-on: ubuntu-latest
needs: build-and-push-app-image
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Install kubectl
uses: azure/setup-kubectl@v3
- name: Configure kubectl
run: |
doctl kubernetes cluster kubeconfig save ${{ secrets.DOKS_CLUSTER }} --expiry-seconds 600
- name: Configure app deployment registry
run: |
DOCKER_IMAGE="${{ secrets.DOCKER_REGISTRY }}/${{ env.PROJECT_NAME }}:${{ github.sha }}"
sed -i "s#image:.*#image: ${DOCKER_IMAGE}#g" deployment.yaml
working-directory: ${{ env.PROJECT_DIR }}/kustomize/resources/
- name: Deploy app to Kubernetes
run: kubectl apply --prune --all -k kustomize/
working-directory: ${{ env.PROJECT_DIR }}
================================================
FILE: .github/workflows/game-2048-snyk.yaml
================================================
name: Game 2048 Snyk CI/CD Example
on:
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
snyk_fail_threshold:
description: |
Sets fail threshold for Snyk
(low | medium | high | critical)
required: true
default: "medium"
env:
ENVIRONMENT: "dev"
PROJECT_DIR: "game-2048-example"
PROJECT_NAME: "game-2048"
SNYK_FAIL_THRESHOLD: "medium"
jobs:
build-and-test-application:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
working-directory: ${{ env.PROJECT_DIR }}
snyk-container-security-check:
runs-on: ubuntu-latest
needs: build-and-test-application
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build App Image for Snyk container scanning
uses: docker/build-push-action@v3
with:
context: ${{ env.PROJECT_DIR }}
push: false
tags: "${{ secrets.DOCKER_REGISTRY }}/${{ env.PROJECT_NAME }}:${{ github.sha }}"
- name: Install Snyk
uses: snyk/actions/setup@master
- name: Check application container vulnerabilities
run: |
snyk container test "${{ secrets.DOCKER_REGISTRY }}/${{ env.PROJECT_NAME }}:${{ github.sha }}" \
--file=${{ env.PROJECT_DIR }}/Dockerfile \
--severity-threshold=${{ github.event.inputs.snyk_fail_threshold || env.SNYK_FAIL_THRESHOLD }} \
--target-name=${{ env.PROJECT_NAME }} \
--target-reference=${{ env.ENVIRONMENT }} \
--sarif-file-output=snyk-container-scan.sarif
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Upload Snyk report SARIF file
if: ${{ always() }}
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk-container-scan.sarif
category: snyk-container-scan
- name: Notify using Slack about Snyk Scan Issues
if: ${{ always() }}
uses: 8398a7/action-slack@v3
with:
status: custom
fields: workflow,job,commit,repo,ref,author,took
custom_payload: |
{
attachments: [
{
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
text:`
${process.env.AS_WORKFLOW}\n
*Environment*: ${process.env.ENVIRONMENT}\n
*Job:* ${process.env.AS_JOB}\n
*Commit:* (${process.env.AS_COMMIT})\n
*Repo:* ${process.env.AS_REPO}\n
*Ref:* ${process.env.AS_REF}\n
*Author:* ${process.env.AS_AUTHOR}\n
*Status:* ${{ job.status }} in ${process.env.AS_TOOK}\n
*Snyk scan results:* https://app.snyk.io
`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
build-and-push-app-image:
runs-on: ubuntu-latest
needs: snyk-container-security-check
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 600
- name: Push App Image to DigitalOcean Container Registry
uses: docker/build-push-action@v3
with:
context: ${{ env.PROJECT_DIR }}
push: true
tags: "${{ secrets.DOCKER_REGISTRY }}/${{ env.PROJECT_NAME }}:${{ github.sha }}"
snyk-iac-security-check:
runs-on: ubuntu-latest
needs: build-and-push-app-image
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Snyk
uses: snyk/actions/setup@master
- name: Check for Kubernetes manifests vulnerabilities
run: |
snyk iac test \
--severity-threshold=${{ github.event.inputs.snyk_fail_threshold || env.SNYK_FAIL_THRESHOLD }} \
--target-name=${{ env.PROJECT_NAME }} \
--target-reference=${{ env.ENVIRONMENT }} \
--sarif-file-output=snyk-iac-scan.sarif \
--report
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
working-directory: ${{ env.PROJECT_DIR }}
- name: Upload Snyk IAC SARIF file
if: ${{ always() }}
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ env.PROJECT_DIR }}/snyk-iac-scan.sarif
category: snyk-iac-scan
- name: Notify using Slack about Snyk Scan Issues
if: ${{ always() }}
uses: 8398a7/action-slack@v3
with:
status: custom
fields: workflow,job,commit,repo,ref,author,took
custom_payload: |
{
attachments: [
{
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
text:`
${process.env.AS_WORKFLOW}\n
*Environment*: ${process.env.ENVIRONMENT}\n
*Job:* ${process.env.AS_JOB}\n
*Commit:* (${process.env.AS_COMMIT})\n
*Repo:* ${process.env.AS_REPO}\n
*Ref:* ${process.env.AS_REF}\n
*Author:* ${process.env.AS_AUTHOR}\n
*Status:* ${{ job.status }} in ${process.env.AS_TOOK}\n
*Snyk scan results:* https://app.snyk.io
`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
deploy-to-k8s:
runs-on: ubuntu-latest
needs:
- snyk-iac-security-check
- build-and-push-app-image
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Install kubectl
uses: azure/setup-kubectl@v3
- name: Configure kubectl
run: |
doctl kubernetes cluster kubeconfig save ${{ secrets.DOKS_CLUSTER }} --expiry-seconds 600
- name: Configure app deployment registry
run: |
IMAGE_TAG="${{ github.sha }}"
DOCKER_IMAGE="${{ secrets.DOCKER_REGISTRY }}/${PROJECT_NAME}:${IMAGE_TAG}"
sed -i "s#image:.*#image: ${DOCKER_IMAGE}#g" deployment.yaml
working-directory: ${{ env.PROJECT_DIR }}/kustomize/resources/
- name: Deploy app to Kubernetes
run: kubectl apply --prune --all -k kustomize/
working-directory: ${{ env.PROJECT_DIR }}
================================================
FILE: .github/workflows/online-boutique-main-ci.yaml
================================================
name: Online Boutique CI Main
on:
# Used for testing only (can be disabled afterwards)
workflow_dispatch:
# Uncomment below lines to enable this workflow on push to main events
# push:
# branches:
# - main
# paths-ignore:
# - "**/README.md"
# - "kustomize/**"
# - "argocd/**"
# - ".github/workflows/*"
# Do not allow concurrent workflows
# Changes should be delivered one a time as code is merged into the main branch
concurrency: main-ci-dev
# Global environment variables
env:
CI_COMMIT_AUTHOR: "GitHub CI Actions"
CI_COMMIT_AUTHOR_EMAIL: "gh-ci-actions@noreply.github.com"
DOCR_ENDPOINT: "registry.digitalocean.com/microservices-demo"
PROJECT_NAME: "online-boutique"
jobs:
# There's no point to run unit tests again after PR merge
# Unit testing deals with changes for the affected components,
# and that it is already taken care in the PR workflow
# What it makes sense, is to run integration tests,
# to see if the whole application is impacted after merging the changes
#
# Run deployment tests (integration tests)
# Please bear in mind that more tests means increased workflow run time
# With workflow concurrency disabled, means more waiting time for other PRs in the queue
deployment-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run integration tests
run: |
echo "[INFO] Not implemented yet!"
# Build and push project images in parallel using a matrix strategy
# Cuts down build time
build-and-push-images:
needs: deployment-tests
runs-on: ubuntu-latest
strategy:
matrix:
project:
- cartservice
- checkoutservice
- currencyservice
- emailservice
- frontend
- paymentservice
- productcatalogservice
- recommendationservice
- shippingservice
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log in to DOCR with short-lived credentials
run: doctl registry login --expiry-seconds 600
- name: Build and push image
uses: docker/build-push-action@v3
with:
# cartservice is an exception - Dockerfile is placed in src/cartservice/src subfolder
context: "src/${{ matrix.project }}/${{ matrix.project == 'cartservice' && 'src' || ''}}"
push: true
tags: "${{ env.DOCR_ENDPOINT }}/${{ matrix.project }}:${{ github.sha }}"
# Kustomize image field for each microservice present in the `src/` dir
# Finally, commit changes to main branch and let ArgoCD take over afterwards
apply-kustomize-changes:
needs: build-and-push-images
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up K8S tools
uses: yokawasa/action-setup-kube-tools@v0.8.2
with:
kustomize: "4.5.7"
- name: Kustomize dev environment images
run: |
for microservice in src/*/; do
microservice="$(basename $microservice)"
if [[ "$microservice" == "loadgenerator" ]]; then
continue
fi
(
cd kustomize/dev
kustomize edit set image $microservice=${{ env.DOCR_ENDPOINT }}/${microservice}:${{ github.sha }}
)
done
- name: Commit Kustomize manifests for dev env
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "${{ env.CI_COMMIT_AUTHOR_EMAIL }}"
git add kustomize/dev/
git commit -m "[CI] Bump docker images tag to ${{ github.sha }}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/online-boutique-pr-ci.yaml
================================================
name: Online Boutique PR CI
on:
# Used for testing only (can be disabled afterwards)
workflow_dispatch:
# Uncomment below lines to enable this workflow on main branch PR events
# pull_request:
# branches:
# - main
# paths-ignore:
# - "**/README.md"
# - "kustomize/**"
# - "argocd/**"
# - ".github/workflows/*"
# Do not allow concurrent workflows for PRs
# If disabled, leads to memory exhaustion on the DOKS dev cluster
concurrency: pr-ci-dev
# Global environment variables
env:
DOCR_ENDPOINT: "registry.digitalocean.com/microservices-demo"
CLUSTER_NAME: "microservices-demo-dev"
REGION: "nyc1"
K8S_NAMESPACE: "microservices-demo-${{ github.event.pull_request.number }}"
PROJECT_NAME: "online-boutique"
jobs:
# Run unit tests in parallel using below matrix to cut down time
# Unit tests are standalone and should not raise conflicts
# Each microservice is written in a specific language, hence it's added to the matrix
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- project_name: cartservice
project_language: csharp
- project_name: checkoutservice
project_language: golang
- project_name: currencyservice
project_language: javascript
- project_name: emailservice
project_language: python
- project_name: frontend
project_language: golang
- project_name: paymentservice
project_language: javascript
- project_name: productcatalogservice
project_language: golang
- project_name: recommendationservice
project_language: python
- project_name: shippingservice
project_language: golang
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Set up Go env
if: ${{ matrix.project_language == 'golang' }}
uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Go Unit Tests
if: ${{ matrix.project_language == 'golang' }}
timeout-minutes: 5
run: |
(
cd src/${{ matrix.project_name }}
go test
)
- name: Set up C# env
if: ${{ matrix.project_language == 'csharp' }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.0"
include-prerelease: true
- name: C# Unit Tests
if: ${{ matrix.project_language == 'csharp' }}
timeout-minutes: 5
run: dotnet test src/${{ matrix.project_name }}/
- name: Set up NodeJS env
if: ${{ matrix.project_language == 'javascript' }}
uses: actions/setup-node@v3
with:
node-version: 18
- name: Javascript Unit Tests
if: ${{ matrix.project_language == 'javascript' }}
timeout-minutes: 5
run: |
(
cd src/${{ matrix.project_name }}
npm install
npm run test
)
- name: Set up Python env
if: ${{ matrix.project_language == 'python' }}
uses: actions/setup-python@v3
with:
python-version: "3.7"
- name: Python Unit Tests
if: ${{ matrix.project_language == 'python' }}
timeout-minutes: 5
run: |
(
cd src/${{ matrix.project_name }}
pip install -r requirements.txt
pytest
)
# Run deployment tests (smoke tests)
# You can add integration tests as well
# Please bear in mind that more tests means increased workflow run time
# With workflow concurrency disabled, means more waiting time for other PRs in the queue
deployment-tests:
needs: unit-tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log in to DOCR with short-lived credentials
run: doctl registry login --expiry-seconds 1200
- name: Set up K8S tools
uses: yokawasa/action-setup-kube-tools@v0.8.2
with:
kubectl: "1.25.2"
kustomize: "4.5.7"
tilt: "0.30.9"
- name: Configure kubectl for DOKS with short-lived credentials
run: doctl kubernetes cluster kubeconfig save ${{ env.CLUSTER_NAME }} --expiry-seconds 1200
- name: Deploy microservices to DOKS
timeout-minutes: 10
run: |
# Bring all microservices up using Tilt and wait for all deployments
cp tilt-resources/dev/tilt_config.json .
tilt ci -- \
--allowed_contexts "do-${{ env.REGION }}-${{ env.CLUSTER_NAME }}" \
--default_registry "${{ env.DOCR_ENDPOINT }}" \
--environment "dev" \
--namespace "${{ env.K8S_NAMESPACE }}"
- name: Build loadgenerator image
uses: docker/build-push-action@v3
with:
context: "src/loadgenerator"
push: true
tags: "${{ env.DOCR_ENDPOINT }}/loadgenerator"
- name: Smoke tests
timeout-minutes: 10
run: |
# Prepare load generator
# Inject workflow custom docker image
sed -i "s#<LOAD_GENERATOR_IMAGE>#${{ env.DOCR_ENDPOINT }}/loadgenerator#g" loadgenerator.yaml
# Deploy load generator
kubectl apply -f loadgenerator.yaml -n ${{ env.K8S_NAMESPACE }}
# Wait for load generator deployment to be ready
kubectl wait --for=condition=available --timeout=60s deployment/loadgenerator -n ${{ env.K8S_NAMESPACE }} || {
# Show why load generator failed to start
echo "[INFO] Load generator pod events"
kubectl describe pod -l app=loadgenerator -n ${{ env.K8S_NAMESPACE }} | tail -10
exit 1
}
# Run smoke tests
REQUEST_COUNT="0"
while [[ "$REQUEST_COUNT" -lt "50" ]]; do
sleep 5
REQUEST_COUNT=$(kubectl logs -l app=loadgenerator -n ${{ env.K8S_NAMESPACE }} | grep Aggregated | awk '{print $2}')
done
# ensure there are no errors hitting endpoints
ERROR_COUNT=$(kubectl logs -l app=loadgenerator -n ${{ env.K8S_NAMESPACE }} | grep Aggregated | awk '{print $3}' | sed "s/[(][^)]*[)]//g")
if [[ "$ERROR_COUNT" -gt "0" ]]; then
# Print final results
echo "[INFO] Load generator results"
kubectl logs -l app=loadgenerator -n ${{ env.K8S_NAMESPACE }} | tail -20
exit 1
fi
# Print final results
echo "[INFO] Load generator results"
kubectl logs -l app=loadgenerator -n ${{ env.K8S_NAMESPACE }} | tail -20
working-directory: "src/loadgenerator"
- name: Clean up Tilt microservices environment
if: ${{ always() }}
run: |
# Remove all microservices and the namespace created by Tilt
tilt down --delete-namespaces -- --namespace "${{ env.K8S_NAMESPACE }}"
- name: Clean up Tilt docker images from registry
if: ${{ always() }}
run: |
# Remove Tilt docker images from registry
for tilt_repo in $(docker images --format "{{.Repository}}:{{.Tag}}" | grep "tilt-.*[a-z|0-9]"); do
repo_and_tag="${tilt_repo##*/}"
repo="${repo_and_tag%%:*}"
tag="${repo_and_tag##*:}"
echo "[INFO] Deleting tag $tag from repo $repo ..."
doctl registry repository delete-tag "$repo" "$tag" -f
done
echo "[INFO] Remember to run the DOCR garbage collector from time to time!"
================================================
FILE: .github/workflows/online-boutique-pr-kustomize-validation.yaml
================================================
name: Online Boutique PR Kustomize Validation
on:
workflow_dispatch:
# pull_request:
# branches:
# - main
# paths:
# - "kustomize/**"
env:
KUBECONFORM_VERSION: "0.5.0"
KUBERNETES_VERSION: "1.24.4"
jobs:
job:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up kubeconform
run: |
(
cd /tmp
wget "https://github.com/yannh/kubeconform/releases/download/v${{ env.KUBECONFORM_VERSION }}/kubeconform-linux-amd64.tar.gz"
tar xvf kubeconform-linux-amd64.tar.gz
chmod u+x ./kubeconform
)
- name: Kustomize linting using kubeconform
run: |
# Test each overlay using kubeconform
for kustomize_overlay in kustomize/*/; do
kustomize build "$kustomize_overlay" | \
/tmp/kubeconform -kubernetes-version "${{env.KUBERNETES_VERSION}}" -summary -verbose
done
================================================
FILE: .github/workflows/online-boutique-release.yaml
================================================
name: Online Boutique Release
on:
workflow_dispatch:
# push:
# # Trigger on push events to any tag matching semantic versioning
# tags:
# - 'v[0-9]+\.[0-9]+\.[0-9]+'
env:
RELEASE_COMMIT_AUTHOR: "GitHub Release Actions"
RELEASE_COMMIT_AUTHOR_EMAIL: "gh-release-actions@noreply.github.com"
DOCR_ENDPOINT: "registry.digitalocean.com/microservices-demo"
PROJECT_NAME: "online-boutique"
jobs:
validation-tests:
runs-on: ubuntu-latest
steps:
- run: echo "[INFO] Not implemented yet!"
build-and-push-release-images:
needs: validation-tests
runs-on: ubuntu-latest
strategy:
matrix:
project:
- cartservice
- checkoutservice
- currencyservice
- emailservice
- frontend
- paymentservice
- productcatalogservice
- recommendationservice
- shippingservice
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log in to DOCR with short-lived credentials
run: doctl registry login --expiry-seconds 600
- name: Build and push image
uses: docker/build-push-action@v3
with:
# cartservice is an exception - Dockerfile is placed in src/cartservice/src subfolder
context: "src/${{ matrix.project }}/${{ matrix.project == 'cartservice' && 'src' || ''}}"
push: true
tags: "${{ env.DOCR_ENDPOINT }}/${{ matrix.project }}:${{ github.ref_name }}"
# Kustomize image field for each microservice present in the `src/` dir
# Finally, commit changes to main branch and let ArgoCD take over afterwards
apply-kustomize-changes:
needs: build-and-push-release-images
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up K8S tools
uses: yokawasa/action-setup-kube-tools@v0.8.2
with:
kustomize: "4.5.7"
- name: Kustomize staging environment images
run: |
for microservice in src/*/; do
microservice="$(basename $microservice)"
if [[ "$microservice" == "loadgenerator" ]]; then
continue
fi
(
cd kustomize/staging/
kustomize edit set image $microservice=${{ env.DOCR_ENDPOINT }}/${microservice}:${{ github.ref_name }}
)
done
- name: Commit Kustomize manifests for staging env
run: |
git config --global user.name "${{ env.RELEASE_COMMIT_AUTHOR }}"
git config --global user.email "${{ env.RELEASE_COMMIT_AUTHOR_EMAIL }}"
git add kustomize/staging/
git commit -m "[Release] Bump docker images tag to ${{ github.ref_name }}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/online-boutique-snyk-docker-scan.yaml
================================================
name: Online Boutique Snyk Docker Scan
on:
# pull_request:
# branches:
# - main
# paths:
# - "src/**/Dockerfile"
# Below configuration is used for manual workflow dispatch
workflow_dispatch:
inputs:
snyk_fail_threshold:
description: |
Sets fail threshold for Snyk
(low | medium | high | critical)
required: true
default: "high"
env:
DOCR_ENDPOINT: "registry.digitalocean.com/microservices-demo"
PROJECT_NAME: "online-boutique"
SNYK_FAIL_THRESHOLD: "high"
jobs:
container-security-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- cartservice
- checkoutservice
- currencyservice
- emailservice
- frontend
- paymentservice
- productcatalogservice
- recommendationservice
- shippingservice
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install Snyk
uses: snyk/actions/setup@master
- name: Build app image for Snyk container scanning
uses: docker/build-push-action@v3
with:
# Cartservice is an exception - Dockerfile is placed in `src/cartservice/src` subfolder
context: "src/${{ matrix.project }}/${{ matrix.project == 'cartservice' && 'src' || ''}}"
push: false
tags: "${{ env.DOCR_ENDPOINT }}/${{ matrix.project }}:${{ github.event.pull_request.head.sha }}"
- name: Check application container vulnerabilities
run: |
# Cartservice is an exception regarding project layout
# It uses a nested src subfolder - `src/cartservice/src`
if [[ "${{ matrix.project }}" == "cartservice" ]]; then
cd src/
fi
snyk container test "${{ env.DOCR_ENDPOINT }}/${{ matrix.project }}:${{ github.event.pull_request.head.sha }}" \
--file=Dockerfile \
--severity-threshold=${{ github.event.inputs.snyk_fail_threshold || env.SNYK_FAIL_THRESHOLD }} \
--target-name=${{ env.PROJECT_NAME }} \
--target-reference=${{ matrix.project }}
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
working-directory: "src/${{ matrix.project }}"
================================================
FILE: .github/workflows/online-boutique-snyk-iac-scan.yaml
================================================
name: Online Boutique Snyk IAC Scan
on:
# pull_request:
# branches:
# - main
# paths:
# - "argocd/**"
# - "kustomize/**"
# Below configuration is used for manual workflow dispatch
workflow_dispatch:
inputs:
snyk_fail_threshold:
description: |
Sets fail threshold for Snyk
(low | medium | high | critical)
required: true
default: "high"
env:
PROJECT_NAME: "online-boutique"
SNYK_FAIL_THRESHOLD: "high"
jobs:
iac-security-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install Snyk
uses: snyk/actions/setup@master
- name: Check for Kubernetes manifests vulnerabilities
run: |
snyk iac test \
--severity-threshold=${{ github.event.inputs.snyk_fail_threshold || env.SNYK_FAIL_THRESHOLD }} \
--target-name=${{ env.PROJECT_NAME }} \
--target-reference="kustomize-PR#${{ github.event.pull_request.number }}" \
--report
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
working-directory: kustomize
- name: Check for Argo CD manifests vulnerabilities
run: |
snyk iac test \
--severity-threshold=${{ github.event.inputs.snyk_fail_threshold || env.SNYK_FAIL_THRESHOLD }} \
--target-name=${{ env.PROJECT_NAME }} \
--target-reference="argocd-PR#${{ github.event.pull_request.number }}" \
--report
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
working-directory: argocd
================================================
FILE: .github/workflows/online-boutique-snyk-source-code-scan.yaml
================================================
name: Online Boutique Snyk Source Code Scan
on:
# pull_request:
# branches:
# - main
# paths:
# - "src/**"
# Below configuration is used for manual workflow dispatch
workflow_dispatch:
inputs:
snyk_fail_threshold:
description: |
Sets fail threshold for Snyk
(low | medium | high | critical)
required: true
default: "high"
env:
PROJECT_NAME: "online-boutique"
SNYK_FAIL_THRESHOLD: "high"
jobs:
source-code-security-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- project_name: cartservice
project_language: dotnet
- project_name: checkoutservice
project_language: golang
- project_name: currencyservice
project_language: node
- project_name: emailservice
project_language: python
- project_name: frontend
project_language: golang
- project_name: paymentservice
project_language: node
- project_name: productcatalogservice
project_language: golang
- project_name: recommendationservice
project_language: python
- project_name: shippingservice
project_language: golang
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install Snyk
uses: snyk/actions/setup@master
- name: Setup dotnet
if: ${{ matrix.project_language == 'dotnet' }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0'
- name: Restore dotnet project dependencies
if: ${{ matrix.project_language == 'dotnet' }}
run: dotnet restore
working-directory: "src/${{ matrix.project_name }}"
- name: Set up Python env
if: ${{ matrix.project_language == 'python' }}
uses: actions/setup-python@v3
with:
python-version: "3.7"
- name: Install Python project dependencies
if: ${{ matrix.project_language == 'python' }}
run: pip install -r requirements.txt
working-directory: "src/${{ matrix.project_name }}"
- name: Check application source code for vulnerabilities
run: |
# Cartservice is an exception regarding project layout
# It uses a nested src subfolder - `src/cartservice/src`
if [[ "${{ matrix.project_name }}" == "cartservice" ]]; then
cd src/
fi
snyk code test \
--severity-threshold=${{ github.event.inputs.snyk_fail_threshold || env.SNYK_FAIL_THRESHOLD }}
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
working-directory: "src/${{ matrix.project_name }}"
- name: Check 3rd party source code for vulnerabilities
run: |
# Cartservice is an exception regarding project layout
# It uses a nested src subfolder - `src/cartservice/src`
if [[ "${{ matrix.project_name }}" == "cartservice" ]]; then
cd src/
fi
snyk test \
--severity-threshold=${{ github.event.inputs.snyk_fail_threshold || env.SNYK_FAIL_THRESHOLD }} \
--project-name=${{ env.PROJECT_NAME }} \
--target-reference=${{ matrix.project_name }}
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
working-directory: "src/${{ matrix.project_name }}"
================================================
FILE: .gitignore
================================================
# macOS
.DS_Store
================================================
FILE: README.md
================================================
# DigitalOcean Kubernetes Sample Apps
This repository contains a collection of Kubernetes applications that can be used in various projects. Each sample application has a dedicated folder to keep all resources, and main documentation.
Kubernetes sample applications provided by this repository:
- [bookinfo-example](bookinfo-example/) - Deploy the [Bookinfo](https://istio.io/latest/docs/examples/bookinfo) sample application.
- [doks-example](doks-example/) - Deploy your first application (workload) to a fresh DOKS cluster.
- [emojivoto-example](emojivoto-example/) - Deploy the [Emojivoto](https://github.com/BuoyantIO/emojivoto) sample application.
- [game-2048-example](game-2048-example/) - Build and deploy the [2048 game](https://en.wikipedia.org/wiki/2048_(video_game)) application.
- [podinfo-example](podinfo-example/) - Deploy the [Podinfo](https://github.com/stefanprodan/podinfo) sample application.
================================================
FILE: bookinfo-example/README.md
================================================
# Overview
The [Bookinfo](https://istio.io/latest/docs/examples/bookinfo) application displays information about a book, similar to a single catalog entry of an online book store. Displayed on the page is a description of the book, book details (ISBN, number of pages, and so on), and a few book reviews.
The `Bookinfo` application is broken into four separate microservices:
- `productpage` - calls the details and reviews microservices to populate the page.
- `details` - contains book information.
- `reviews` - contains book reviews. It also calls the ratings microservice.
- `ratings` - contains book ranking information that accompanies a book review.
Please visit the [Bookinfo application](https://istio.io/latest/docs/examples/bookinfo) documentation page for more details.
## Requirements
To complete all steps and deploy the `Bookinfo` sample application, you will need:
1. A [DOKS](https://docs.digitalocean.com/products/kubernetes/quickstart) cluster configured and running.
2. Latest [Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) version for Kubernetes interaction.
3. [Git](https://git-scm.com/downloads) client for interacting with the [kubernetes-sample-apps](https://github.com/digitalocean/kubernetes-sample-apps) repository.
## Deploying to Kubernetes
The [kustomization manifest](kustomize/kustomization.yaml) provided in this repository will get you started with deploying the `Bookinfo` application Kubernetes resources.
First, you need to clone this repository:
```shell
git clone https://github.com/digitalocean/kubernetes-sample-apps.git
```
Then, change directory to your local copy:
```shell
cd kubernetes-sample-apps
```
Now, create Bookinfo sample application Kubernetes resources using the kubectl kustomize option (`-k` flag):
```shell
kubectl apply -k bookinfo-example/kustomize
```
The output looks similar to:
```text
namespace/bookinfo created
serviceaccount/bookinfo-details created
serviceaccount/bookinfo-productpage created
serviceaccount/bookinfo-ratings created
serviceaccount/bookinfo-reviews created
service/details created
service/productpage created
service/ratings created
service/reviews created
deployment.apps/details-v1 created
deployment.apps/productpage-v1 created
deployment.apps/ratings-v1 created
deployment.apps/reviews-v1 created
deployment.apps/reviews-v2 created
deployment.apps/reviews-v3 created
```
If everything went well, you should have a new Kubernetes namespace created named `bookinfo`. Inside the new namespace, you can inspect all resources created by the kustomization manifest from the sample apps repository (all Bookinfo application pods should be up and running):
```shell
kubectl get all -n bookinfo
```
The output looks similar to:
```text
NAME READY STATUS RESTARTS AGE
pod/details-v1-7694bf8b6f-zgdts 1/1 Running 0 82m
pod/productpage-v1-659d8f84c9-cr446 1/1 Running 0 82m
pod/ratings-v1-65785878bf-7kr2h 1/1 Running 0 82m
pod/reviews-v1-b98448d4f-zrfbd 1/1 Running 0 82m
pod/reviews-v2-867f95557c-shsw9 1/1 Running 0 81m
pod/reviews-v3-7c769464df-gbv5x 1/1 Running 0 81m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/details ClusterIP 10.245.223.202 <none> 9080/TCP 82m
service/productpage ClusterIP 10.245.139.105 <none> 9080/TCP 82m
service/ratings ClusterIP 10.245.229.118 <none> 9080/TCP 82m
service/reviews ClusterIP 10.245.227.244 <none> 9080/TCP 82m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/details-v1 1/1 1 1 82m
deployment.apps/productpage-v1 1/1 1 1 82m
deployment.apps/ratings-v1 1/1 1 1 82m
deployment.apps/reviews-v1 1/1 1 1 82m
deployment.apps/reviews-v2 1/1 1 1 82m
deployment.apps/reviews-v3 1/1 1 1 82m
NAME DESIRED CURRENT READY AGE
replicaset.apps/details-v1-7694bf8b6f 1 1 1 82m
replicaset.apps/productpage-v1-659d8f84c9 1 1 1 82m
replicaset.apps/ratings-v1-65785878bf 1 1 1 82m
replicaset.apps/reviews-v1-b98448d4f 1 1 1 82m
replicaset.apps/reviews-v2-867f95557c 1 1 1 82m
replicaset.apps/reviews-v3-7c769464df 1 1 1 82m
```
Finally, port-forward the `productpage` service using `kubectl`:
```shell
kubectl port-forward service/productpage -n bookinfo 9080:9080
```
Open a web browser and point to [localhost:9080](http://localhost:9080/). You should see the `productpage` service welcome page:

## Cleaning Up
To clean up all Kubernetes resources created by the Bookinfo sample application, below command must be used:
```shell
kubectl delete ns bookinfo
```
**Note:**
Kubectl kustomize subcommand has a delete option that can be used - `kubectl delete -k bookinfo-example/kustomize`. But, it won't work well in this case because if the namespace is deleted first then the remaining operations will fail.
================================================
FILE: bookinfo-example/kustomize/kustomization.yaml
================================================
## Bookinfo Sample Application Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Making sure all resources used in this tutorial are created in a dedicated namespace
# Also specific annotations are added for later identification
namespace: bookinfo
commonAnnotations:
provider: kubernetes-sample-apps
# Bookinfo resources (namespace, services, deployments, etc)
resources:
- resources/namespace.yaml
- https://raw.githubusercontent.com/istio/istio/release-1.14/samples/bookinfo/platform/kube/bookinfo.yaml
# If you want to apply Istio configuration on top of the bookinfo deployment, uncomment below lines (assuming you have Istio already installed)
# - https://raw.githubusercontent.com/istio/istio/release-1.14/samples/bookinfo/networking/bookinfo-gateway.yaml
# - https://raw.githubusercontent.com/istio/istio/release-1.14/samples/bookinfo/networking/destination-rule-all.yaml
================================================
FILE: bookinfo-example/kustomize/resources/namespace.yaml
================================================
apiVersion: v1
kind: Namespace
metadata:
name: bookinfo
================================================
FILE: doks-example/.travis.yml
================================================
services:
- 'docker'
script:
- docker build -t doks-example .
- docker run --rm -it doks-example sleep 1
notifications:
email: false
================================================
FILE: doks-example/Dockerfile
================================================
FROM nginx
ADD web /usr/share/nginx/html
================================================
FILE: doks-example/LICENSE
================================================
MIT License
Copyright (c) 2019 DigitalOcean
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: doks-example/README.md
================================================
[](https://travis-ci.org/digitalocean/doks-example)
# Getting Started
1. Create your Kubernetes cluster: `doctl k8s cluster create example`
1. Check that your cluster is available: `kubectl --context do-nyc1-example get nodes`
1. Deploy a workload to your cluster: `kubectl --context do-nyc1-example apply -f manifest.yaml`
1. Wait for the service to be ready: `script/wait-for-service do-nyc1-example doks-example`
1. Open the returned IP address in your browser, or run `open http://$(kubectl --context do-nyc1-example get service doks-example --template="{{range .status.loadBalancer.ingress}}{{.ip}}{{end}}")`
Or you can just run `script/up` to do all of this.
## Cleaning up
Run `script/down` to tear down the cluster and remove the load-balancer.
**Note:** If you delete the cluster directly, the load-balancer will stick around and result in charges.
================================================
FILE: doks-example/manifest.yaml
================================================
---
kind: Service
apiVersion: v1
metadata:
name: doks-example
spec:
type: LoadBalancer
selector:
app: doks-example
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: doks-example
spec:
replicas: 2
selector:
matchLabels:
app: doks-example
template:
metadata:
labels:
app: doks-example
spec:
containers:
- name: nginx
image: digitalocean/doks-example
ports:
- containerPort: 80
protocol: TCP
================================================
FILE: doks-example/script/docker-publish
================================================
#!/usr/bin/env bash
set -euo pipefail
TARGET="digitalocean/doks-example"
docker build -t ${TARGET} .
docker push ${TARGET}
================================================
FILE: doks-example/script/down
================================================
#!/usr/bin/env bash
set -euo pipefail
CLUSTER="example"
doctl compute load-balancer delete --force $(kubectl get svc doks-example -o jsonpath="{.metadata.annotations.kubernetes\.digitalocean\.com/load-balancer-id}")
doctl k8s cluster delete ${CLUSTER}
================================================
FILE: doks-example/script/up
================================================
#!/usr/bin/env bash
set -euo pipefail
CLUSTER="example"
SERVICE="doks-example"
CONTEXT="do-nyc1-${CLUSTER}"
doctl k8s cluster create ${CLUSTER}
kubectl --context ${CONTEXT} apply -f manifest.yaml
script/wait-for-service ${CONTEXT} ${SERVICE}
open http://$(kubectl --context ${CONTEXT} get service ${SERVICE} --template="{{range .status.loadBalancer.ingress}}{{.ip}}{{end}}")
================================================
FILE: doks-example/script/wait-for-service
================================================
#!/usr/bin/env bash
# Pass the name of a service to check: sh wait-for-service.sh example
set -euo pipefail
EXTERNAL_IP=""
CONTEXT="$1"
SERVICE="$2"
while [ -z $EXTERNAL_IP ]; do
EXTERNAL_IP=$(kubectl --context ${CONTEXT} get service ${SERVICE} --template="{{range .status.loadBalancer.ingress}}{{.ip}}{{end}}")
if [ -z "${EXTERNAL_IP}" ]; then
echo "Waiting for external IP..."
sleep 10
fi
done
echo "Ready: ${EXTERNAL_IP}"
================================================
FILE: doks-example/web/index.html
================================================
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://assets.digitalocean.com/bui/1.2.2/bui.css">
<link href="./style.css" type="text/css" rel="stylesheet">
<meta name="viewport" content="width=device-width, maximum-scale=1.0">
<title>Welcome to DOKS</title>
</head>
<body>
<div class="Header bui-Inline">
<svg class="Icon bui-Icon--xlarge"><use xlink:href="#logo"></use></svg>
</div>
<main>
<div class="bui-GridContainer bui-u-flexMiddle">
<div class="bui-Col-6">
<div id="welcome">
<h1 class="bui-u-textBold">Welcome to DOKS</h1>
<p>Congratulations, you deployed your first workload! You have just created a <span class="bui-u-textCode">Deployment</span> responsible for managing 2 instances of Pod workloads running the docker image given in the manifest. In addition to this <span class="bui-u-textCode">Deployment</span>, you have also configured a <span class="bui-u-textCode">Service</span> of type <span class="bui-u-textCode">LoadBalancer</span> that exposes the <span class="bui-u-textCode">Deployment</span> publicly using a DigitalOcean Load Balancer, which is a paid service.</p>
</div>
</div>
<div class="bui-Col-6">
<div id="running">
<h2>Here's what's running:</h2>
<pre><code id="manifest" class="bui-CodeBlock">---
kind: Service
apiVersion: v1
metadata:
name: doks-example
spec:
type: LoadBalancer
selector:
app: doks-example
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: doks-example
spec:
replicas: 2
template:
metadata:
labels:
app: doks-example
spec:
containers:
- name: nginx
image: digitalocean/doks-example
ports:
- containerPort: 80
protocol: TCP
</code></pre>
</div>
</div>
</div>
<div class="bui-Col">
<div id="more">
<h3>Learn more about DigitalOcean Kubernetes Service</h3>
<ul class="bui-BlockGrid bui-BlockGrid-4 bui-u-flexDeepMatch">
<li>
<div class="more-item">
<span class="more-type">White Paper</span>
<h3 class="bui-u-textPrimary bui-u-textRegular">
<a href="https://www.digitalocean.com/community/tutorials/white-paper-running-cloud-native-applications-on-digitalocean-kubernetes">Running Cloud Native Applications</a>
</h3>
<p>Running Cloud Native Application on DigitalOcean Kubernetes Service.</p>
</div>
</li>
<li>
<div class="more-item">
<span class="more-type">Product Docs</span>
<h3 class="bui-u-textPrimary bui-u-textRegular">
<a href="https://www.digitalocean.com/docs/kubernetes/quickstart/">
Quick Start
</a>
</h3>
<p>From zero to working in a few minutes.</p>
</div>
</li>
<li>
<div class="more-item">
<span class="more-type">Tutorial</span>
<h3 class="bui-u-textPrimary bui-u-textRegular">
<a href="https://www.digitalocean.com/community/tutorials/architecting-applications-for-kubernetes">
Architecting Applications for Kubernetes
</a>
</h3>
<p>Design your application for Kubernetes.</p>
</div>
</li>
<li>
<div class="more-item">
<span class="more-type">Education</span>
<h3 class="bui-u-textPrimary bui-u-textRegular">
<a href="https://www.digitalocean.com/resources/kubernetes">
Resource Center
</a>
</h3>
<p>Learn more about building and deploying microservices with a robust library of Kubernetes assets.</p>
</div>
</li>
</ul>
</div>
</div>
</main>
<div id="footer" class="bui-Footer">
<a href="https://blog.digitalocean.com/">Blog</a>
<a href="https://www.digitalocean.com/pricing">Pricing</a>
<a href="https://www.digitalocean.com/company/careers">Careers</a>
<a href="https://www.digitalocean.com/legal/terms">Terms</a>
<a href="https://www.digitalocean.com/legal/privacy">Privacy</a>
<a href="https://status.digitalocean.com">Status</a>
<a href="https://developers.digitalocean.com">API Docs</a>
<a href="https://www.digitalocean.com/community">Tutorials</a>
<a href="https://cloudsupport.digitalocean.com/">Support</a>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://assets.digitalocean.com/bui/1.2.2/bui.js"></script>
<script>
var xhr = new XMLHttpRequest;
xhr.open('get','https://assets.digitalocean.com/bui/1.2.2/bui-icons.svg',true);
xhr.onreadystatechange = function(){
if (xhr.readyState != 4) return;
var svg = xhr.responseXML.documentElement;
svg = document.importNode(svg,true); // surprisingly optional in these browsers
document.head.appendChild(svg);
};
xhr.send();
</script>
</body>
</html>
================================================
FILE: doks-example/web/style.css
================================================
html {
height: 100%;
}
body {
margin: 0;
padding: 25px;
height: 100%;
background-color: #0a1e99;
background-image: url("/bg.png");
background-repeat: no-repeat;
background-position: right bottom;
background-size: 800px;
}
main {
margin: auto;
width: 900px;
}
h1, h2, h3 {
color: white;
}
pre {
border: 0;
background-color: #031b4d;
color: white;
wdith: 100%;
max-height: 400px;
overflow: scroll;
}
.Header {
opacity: 0.5;
color: white;
fill: white;
}
#welcome {
color: white;
}
#welcome span.bui-u-textCode {
background-color: #031b4d;
border: 0;
}
#running {
color: white;
}
#more {
margin-top: 30px;
font-size: 80%;
}
.more-item {
padding: 20px;
background-color: white;
border-radius: 5px;
}
.more-item h3 {
padding: 0;
margin: 10px 0 10px 0;
}
.more-type {
text-transform: uppercase;
font-size: 80%;
}
#footer {
background-color: transparent;
color: white;
font-size: 60%;
}
#footer a, #footer a:hover {
color: white;
}
================================================
FILE: emojivoto-example/README.md
================================================
# Overview
[Emojivoto](https://github.com/BuoyantIO/emojivoto) is a microservice application that allows users to vote for their favorite emoji, and tracks votes received on a leaderboard. May the best emoji win.
The application is composed of the following 3 services:
* [emojivoto-web](https://github.com/BuoyantIO/emojivoto/tree/main/emojivoto-web): Web frontend and REST API.
* [emojivoto-emoji-svc](https://github.com/BuoyantIO/emojivoto/tree/main/emojivoto-emoji-svc): gRPC API for finding and listing emoji.
* [emojivoto-voting-svc](https://github.com/BuoyantIO/emojivoto/blob/main/emojivoto-voting-svc): gRPC API for voting and leaderboard.
Please visit the [Emojivoto](https://github.com/BuoyantIO/emojivoto) documentation page for more details.
## Requirements
To complete all steps and deploy the `Emojivoto` sample application, you will need:
1. A [DOKS](https://docs.digitalocean.com/products/kubernetes/quickstart) cluster configured and running.
2. Latest [Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) version for Kubernetes interaction.
3. [Git](https://git-scm.com/downloads) client for interacting with the [kubernetes-sample-apps](https://github.com/digitalocean/kubernetes-sample-apps) repository.
## Deploying to Kubernetes
The [kustomization manifest](kustomize/kustomization.yaml) provided in this repository will get you started with deploying the `Emojivoto` application Kubernetes resources.
First, you need to clone this repository:
```shell
git clone https://github.com/digitalocean/kubernetes-sample-apps.git
```
Then, change directory to your local copy:
```shell
cd kubernetes-sample-apps
```
Now, create Emojivoto sample application Kubernetes resources using the kubectl kustomize option (`-k` flag):
```shell
kubectl apply -k emojivoto-example/kustomize
```
The output looks similar to:
```text
namespace/emojivoto created
serviceaccount/emoji created
serviceaccount/voting created
serviceaccount/web created
service/emoji-svc created
service/voting-svc created
service/web-svc created
deployment.apps/emoji created
deployment.apps/vote-bot created
deployment.apps/voting created
deployment.apps/web created
```
If everything went well, you should have a new Kubernetes namespace created named `emojivoto`. Inside the new namespace, you can inspect all resources created by the kustomization manifest from the sample apps repository (all Emojivoto application pods should be up and running):
```shell
kubectl get all -n emojivoto
```
The output looks similar to:
```text
NAME READY STATUS RESTARTS AGE
pod/emoji-84cd97f89b-cpz4l 1/1 Running 0 10m
pod/vote-bot-5b587bbff7-wqv8t 1/1 Running 0 10m
pod/voting-74ff7f8b55-5wbgt 1/1 Running 0 10m
pod/web-7dfbdc8bf5-247t9 1/1 Running 0 9m59s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/emoji-svc ClusterIP 10.245.140.136 <none> 8080/TCP,8801/TCP 10m
service/voting-svc ClusterIP 10.245.217.36 <none> 8080/TCP,8801/TCP 10m
service/web-svc ClusterIP 10.245.137.75 <none> 80/TCP 10m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/emoji 1/1 1 1 10m
deployment.apps/vote-bot 1/1 1 1 10m
deployment.apps/voting 1/1 1 1 10m
deployment.apps/web 1/1 1 1 10m
NAME DESIRED CURRENT READY AGE
replicaset.apps/emoji-84cd97f89b 1 1 1 10m
replicaset.apps/vote-bot-5b587bbff7 1 1 1 10m
replicaset.apps/voting-74ff7f8b55 1 1 1 10m
replicaset.apps/web-7dfbdc8bf5 1 1 1 10m
```
Finally, port-forward the `web-svc` service using `kubectl`:
```shell
kubectl port-forward service/web-svc -n emojivoto 8080:80
```
Open a web browser and point to [localhost:8080](http://localhost:8080/). You should see the Emojivoto application welcome page:

## Cleaning Up
To clean up all Kubernetes resources created by the Emojivoto sample application, below command must be used:
```shell
kubectl delete ns emojivoto
```
**Note:**
Kubectl kustomize subcommand has a delete option that can be used - `kubectl delete -k emojivoto-example/kustomize`. But, it won't work well in this case because if the namespace is deleted first then the remaining operations will fail.
================================================
FILE: emojivoto-example/kustomize/kustomization.yaml
================================================
## Emojivoto Sample Application Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Making sure all resources used in this tutorial are created in a dedicated namespace
# Also specific annotations are added for later identification
namespace: emojivoto
commonAnnotations:
provider: kubernetes-sample-apps
# Emojivoto resources (namespace, services, deployments, etc)
resources:
- github.com/BuoyantIO/emojivoto/kustomize/deployment
patches:
- path: patches/emoji-svc.yaml
target:
version: v1
kind: Service
name: emoji-svc
- path: patches/voting-svc.yaml
target:
version: v1
kind: Service
name: voting-svc
================================================
FILE: emojivoto-example/kustomize/patches/emoji-svc.yaml
================================================
- op: add
path: /metadata/labels
value:
app: emoji-svc
================================================
FILE: emojivoto-example/kustomize/patches/voting-svc.yaml
================================================
- op: add
path: /metadata/labels
value:
app: voting-svc
================================================
FILE: game-2048-example/.dockerignore
================================================
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
README.md
================================================
FILE: game-2048-example/.gitignore
================================================
**/node_modules
**/dist
================================================
FILE: game-2048-example/Dockerfile
================================================
FROM node:16-slim AS builder
WORKDIR /usr/src/app
COPY . .
RUN npm install --include=dev
#
# Build mode can be set via NODE_ENV environment variable (development or production)
# See project package.json and webpack.config.js
#
ENV NODE_ENV=development
RUN npm run build
FROM node:16-slim
RUN npm install http-server -g
RUN mkdir /public
WORKDIR /public
COPY --from=builder /usr/src/app/dist/ ./
EXPOSE 8080
USER 1000
CMD ["http-server"]
================================================
FILE: game-2048-example/LICENSE
================================================
MIT License
Copyright (c) 2019 DigitalOcean
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: game-2048-example/README.md
================================================
# Overview
Sample javascript application implementing the classic [2048 game](https://en.wikipedia.org/wiki/2048_(video_game)). Main project is based on the [game-2048 library](https://www.npmjs.com/package/game-2048) and [Webpack](https://webpack.js.org).
Main purpose is to serve as a demo for the [DOKS-CI-CD](https://github.com/digitalocean/container-blueprints/tree/main/DOKS-CI-CD) blueprint.
## Requirements
To complete all steps and deploy the `2048-game` sample application, you will need:
1. A [DOKS](https://docs.digitalocean.com/products/kubernetes/quickstart) cluster configured and running.
2. Latest [Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) version for Kubernetes interaction.
3. [Git](https://git-scm.com/downloads) client for interacting with the [kubernetes-sample-apps](https://github.com/digitalocean/kubernetes-sample-apps) repository.
4. [NodeJS](https://nodejs.org) and `npm` to build and test the 2048-game application code.
5. [Docker Desktop](https://www.docker.com/products/docker-desktop) to build and test the 2048-game application docker image locally.
## Building the 2048 Game Application
Main project is `javascript` based, hence you can build the application via `npm`:
```shell
npm install --include=dev
npm run build
```
You can test the application locally, by running below command:
```shell
npm start
```
Above command will start a web server in development mode, which you can access at [localhost:8080](http://localhost:8080). Please visit the main library [configuration](https://www.npmjs.com/package/game-2048#config) section from the public npm registry to see all available options.
## Building the Docker Image
A sample [Dockerfile](./Dockerfile) is provided in this repository as well, to help you get started with dockerizing the 2048 game app. Depending on the `NODE_ENV` environment variable, you can create and publish a `development` or `production` ready Docker image.
First, you need to clone this repository (if not already):
```shell
git clone https://github.com/digitalocean/kubernetes-sample-apps.git
```
Then, change directory to your local copy:
```shell
cd kubernetes-sample-apps
```
Next, issue below command to build the docker image for the 2048 game app, Below examples assume you already have a [DigitalOcean Docker Registry](https://docs.digitalocean.com/products/container-registry) set up (make sure to replace the `<>` placeholders accordingly):
```shell
docker build -t registry.digitalocean.com/<YOUR_DOCKER_REGISTRY_NAME_HERE>/2048-game ./game-2048-example
```
**Note:**
The sample [Dockerfile](./Dockerfile) provided in this repository is using the [multistage build](https://docs.docker.com/develop/develop-images/multistage-build) feature. It means, the final image contains only the application assets (build process artifacts are automatically discarded).
Then, you can issue bellow command to launch the `2048-game` container (make sure to replace the `<>` placeholders accordingly):
```shell
docker run --rm -it -p 8080:8080 registry.digitalocean.com/<YOUR_DOCKER_REGISTRY_NAME_HERE>/2048-game
```
Now, visit [localhost:8080](http://localhost:8080) to check the 2048 game app in your web browser. Finally, you can push the image to your DigitalOcean docker registry (make sure to replace the `<>` placeholders accordingly):
```shell
docker push registry.digitalocean.com/<YOUR_DOCKER_REGISTRY_NAME_HERE>/2048-game
```
**Note:**
Pushing images to your DigitalOcean docker registry is possible only after a successful authentication. Please read the official DigitalOcean [guide](https://docs.digitalocean.com/products/container-registry/how-to/use-registry-docker-kubernetes) and follow the steps. [Integrating with Kubernetes](https://docs.digitalocean.com/products/container-registry/how-to/use-registry-docker-kubernetes/#kubernetes-integration) step is important as well.
## Deploying to Kubernetes
The [kustomization manifest](kustomize/kustomization.yaml) provided in this repository will get you started with deploying the `2048-game` Kubernetes resources.
First, you need to clone this repository (if not already):
```shell
git clone https://github.com/digitalocean/kubernetes-sample-apps.git
```
Then, change directory to your local copy:
```shell
cd kubernetes-sample-apps
```
Next, edit the game-2048 [deployment manifest](kustomize/resources/deployment.yaml) using your favorite text editor (preferably with YAML lint support), and replace the `<>` placeholders. For example, you can use [VS Code](https://code.visualstudio.com/):
```shell
code game-2048-example/kustomize/resources/deployment.yaml
```
Now, create 2048 game Kubernetes resources using the kubectl kustomize option (`-k` flag):
```shell
kubectl apply -k game-2048-example/kustomize
```
The output looks similar to:
```text
namespace/game-2048 created
service/game-2048 created
deployment.apps/game-2048 created
```
If everything went well, you should have a new Kubernetes namespace created named `game-2048`. Inside the new namespace, you can inspect all resources created by the kustomization manifest from the sample apps repository (all game-2048 application pods should be up and running):
```shell
kubectl get all -n game-2048
```
The output looks similar to:
```text
NAME READY STATUS RESTARTS AGE
pod/game-2048-f96755947-dgj7z 1/1 Running 0 5m19s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/game-2048 ClusterIP 10.245.120.202 <none> 8080/TCP 5m21s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/game-2048 1/1 1 1 5m22s
NAME DESIRED CURRENT READY AGE
replicaset.apps/game-2048-f96755947 1 1 1 5m22s
```
Finally, port-forward the `game-2048` service using `kubectl`:
```shell
kubectl port-forward service/game-2048 -n game-2048 8080:8080
```
Open a web browser and point to [localhost:8080](http://localhost:8080/). You should see the `game-2048` welcome page:

## Cleaning Up
To clean up all Kubernetes resources created by the 2048 game application, below command must be used:
```shell
kubectl delete ns game-2048
```
**Note:**
Kubectl kustomize subcommand has a delete option that can be used - `kubectl delete -k game-2048-example/kustomize`. But, it won't work well in this case because if the namespace is deleted first then the remaining operations will fail.
================================================
FILE: game-2048-example/Tiltfile
================================================
os.putenv('DOCKER_DEFAULT_PLATFORM', 'linux/amd64')
k8s_yaml(kustomize('kustomize'))
docker_build('game-2048', '.')
k8s_resource('game-2048', port_forwards='8080')
================================================
FILE: game-2048-example/knative-service.yaml
================================================
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: game-2048
spec:
template:
spec:
containers:
# Replace with your docker registry info
- image: registry.digitalocean.com/<YOUR_DOCKER_REGISTRY_NAME_HERE>/2048-game:latest
ports:
- containerPort: 80
================================================
FILE: game-2048-example/kustomize/kustomization.yaml
================================================
## 2048 Game Sample Application Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Making sure all resources used in this tutorial are created in a dedicated namespace
# Also specific annotations are added for later identification
namespace: game-2048
commonAnnotations:
provider: kubernetes-sample-apps
# 2048 game resources (namespace, services, deployments, etc)
resources:
- resources/namespace.yaml
- resources/deployment.yaml
- resources/service.yaml
================================================
FILE: game-2048-example/kustomize/resources/deployment.yaml
================================================
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: game-2048
spec:
replicas: 1
selector:
matchLabels:
app: game-2048
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: game-2048
spec:
containers:
- name: backend
# Replace the `<>` placeholders with your docker registry info
image: registry.digitalocean.com/<YOUR_DOCKER_REGISTRY_NAME_HERE>/2048-game:latest
ports:
- name: http
containerPort: 8080
resources:
requests:
cpu: 200m
memory: 100Mi
limits:
cpu: 300m
memory: 200Mi
# securityContext:
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# allowPrivilegeEscalation: false
# capabilities:
# drop:
# - all
================================================
FILE: game-2048-example/kustomize/resources/namespace.yaml
================================================
apiVersion: v1
kind: Namespace
metadata:
name: game-2048
================================================
FILE: game-2048-example/kustomize/resources/service.yaml
================================================
apiVersion: v1
kind: Service
metadata:
name: game-2048
spec:
ports:
- name: http
port: 8080
targetPort: 8080
selector:
app: game-2048
================================================
FILE: game-2048-example/package.json
================================================
{
"name": "knative-example",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "webpack server --config webpack.config.js --mode development",
"build": "webpack",
"build-dev": "webpack --mode development",
"build-prod": "webpack --mode production",
"test": "echo '=== DUMMY TEST ==='"
},
"dependencies": {
"game-2048": "^0.0.7"
},
"devDependencies": {
"css-loader": "^6.7.1",
"html-webpack-plugin": "^5.5.0",
"style-loader": "^3.3.1",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.9.0"
},
"author": "",
"license": "MIT",
"description": "Sample 2048 Game App"
}
================================================
FILE: game-2048-example/src/index.js
================================================
import 'game-2048/style/main.css';
import Game from 'game-2048';
var gameContainerDiv = document.createElement('div');
gameContainerDiv.setAttribute('id', 'game-container');
gameContainerDiv.className = 'container';
document.body.appendChild(gameContainerDiv);
const game = new Game({
gameContainer: gameContainerDiv
});
================================================
FILE: game-2048-example/webpack.config.js
================================================
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
mode: process.env.NODE_ENV || 'none',
module: {
rules: [
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
],
},
entry: './src/index.js',
output: {
filename: 'lib/bundle.js',
path: path.resolve(__dirname, 'dist'),
clean: true,
},
plugins: [
new HtmlWebpackPlugin({
title: '2048 Game',
})
],
devServer: {
static: {
directory: path.join(__dirname, 'dist'),
},
compress: true,
port: 8080,
},
};
================================================
FILE: microservices-demo/.gitignore
================================================
# macOS
.DS_Store
# Tilt settings
/tilt_config.json
================================================
FILE: microservices-demo/CODE_OF_CONDUCT.md
================================================
# Contributor Code of Conduct
As contributors and maintainers of this project,
and in the interest of fostering an open and welcoming community,
we pledge to respect all people who contribute through reporting issues,
posting feature requests, updating documentation,
submitting pull requests or patches, and other activities.
We are committed to making participation in this project
a harassment-free experience for everyone,
regardless of level of experience, gender, gender identity and expression,
sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information,
such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct.
By adopting this Code of Conduct,
project maintainers commit themselves to fairly and consistently
applying these principles to every aspect of managing this project.
Project maintainers who do not follow or enforce the Code of Conduct
may be permanently removed from the project team.
This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported by opening an issue
or contacting one or more of the project maintainers.
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
================================================
FILE: microservices-demo/CONTRIBUTING.md
================================================
# How to Contribute
We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.
## Development Principles (for Googlers)
There are a few principles for developing or refactoring the service
implementations. Read the [Development Principles
Guide](./docs/development-principles.md).
## Contributor License Agreement
Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.
## Code reviews
All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.
## Community Guidelines
This project follows [Google's Open Source Community
Guidelines](https://opensource.google.com/conduct/).
================================================
FILE: microservices-demo/LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: microservices-demo/README.md
================================================
# Overview
**Note:**
**This demo application serves as a companion for the [Kubernetes Adoption Journey](https://digitalocean.github.io/k8s-adoption-journey/) project. Please follow the Kubernetes adoption journey project for more information and comprehensive guidelines.**
This application is a clone of this [GoogleCloudPlatform](https://github.com/GoogleCloudPlatform/microservices-demo) project. It will be used as a demo for the K8s adoption journey. This clone of the project has been stripped down to focus only on the major parts as required by the adoption journey.
## Prerequisites
1. [Tilt](https://tilt.dev/) installed on your local machine.
2. [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed on your local machine, with built-in Kubernetes cluster enabled and running.
## Quick Start
1. Run the following command in the project root directory to deploy the **microservices-demo** app to your local Kubernetes cluster:
```shell
cp tilt-resources/local/tilt_config.json .
tilt up
```
2. Open Tilt [web interface](http://localhost:10350/), and wait for all services to be ready.
3. Access the [web frontend](http://localhost:9090/) in a browser.
## Cleaning Up
Run following command from this project root directory to clean up all resources:
```shell
tilt down
```
================================================
FILE: microservices-demo/Tiltfile
================================================
#########################################################################
#
# Tiltfile logic
#
#########################################################################
# Import required functions from Tilt extensions
load(
"ext://namespace",
"namespace_create",
"namespace_inject"
)
# Import settings from tilt_config.json
if not os.path.exists("./tilt_config.json"):
fail(
"""
# ================================================ #
# Tilt config file not found in current directory! #
# Please copy a template from tilt-resources dir. #
# #
# E.g.: #
# cp tilt-resources/local/tilt_config.json . #
# ================================================ #
"""
)
config.define_string_list("allowed_contexts")
config.define_string("default_registry")
config.define_string("environment")
config.define_string_list("microservices")
config.define_string("namespace")
config.define_string_list("port_forwards")
cfg = config.parse()
# Compatibilty setting for ARM arch
os.putenv("DOCKER_DEFAULT_PLATFORM", "linux/amd64")
# Allow default K8S context as stated in the tilt_config.json file
allow_k8s_contexts(cfg.get("allowed_contexts"))
# Set default registry as stated in the tilt_config.json file
if cfg.get("default_registry") != "":
default_registry(cfg.get("default_registry"))
# Build each microservice image as stated in the tilt_config.json file
for microservice in cfg.get("microservices"):
if "redis" in microservice:
continue
docker_build(
microservice,
# cartservice is an exception regarding source folder path
"src/{}/src".format(microservice) if "cartservice" in microservice else "src/{}".format(microservice)
)
# Create namespace as stated in the tilt_config.json file
namespace_create(cfg.get("namespace"))
# Deploy each microservice as stated in the tilt_config.json file
for microservice in cfg.get("microservices"):
k8s_yaml(
namespace_inject(
read_file("kustomize/base/{}.yaml".format(microservice)),
cfg.get("namespace")
)
)
# Port forwards as stated in the tilt_config.json file
for port_forward in cfg.get("port_forwards"):
mapping = port_forward.split(":")
if (len(mapping) != 2):
fail(
"""
# =================================================== #
# Invalid port forward specified in tilt_config.json! #
# Should be <resource>:<port_number>. #
# #
# E.g.: frontend:9090 #
# =================================================== #
"""
)
service = mapping[0]
port = mapping[1]
k8s_resource(service, port_forwards=port)
================================================
FILE: microservices-demo/kustomize/base/cartservice.yaml
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: cartservice
spec:
replicas: 1
selector:
matchLabels:
app: cartservice
template:
metadata:
labels:
app: cartservice
spec:
serviceAccountName: default
terminationGracePeriodSeconds: 5
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
privileged: false
readOnlyRootFilesystem: true
imagePullPolicy: Always
image: cartservice:latest
ports:
- containerPort: 7070
env:
- name: REDIS_ADDR
value: "redis-cart:6379"
resources:
requests:
cpu: 200m
memory: 128Mi
limits:
cpu: 300m
memory: 256Mi
readinessProbe:
timeoutSeconds: 15
initialDelaySeconds: 20
exec:
command:
[
"/bin/grpc_health_probe",
"-addr=:7070",
"-rpc-timeout=10s",
"-connect-timeout=10s",
]
livenessProbe:
timeoutSeconds: 15
initialDelaySeconds: 20
periodSeconds: 15
exec:
command:
[
"/bin/grpc_health_probe",
"-addr=:7070",
"-rpc-timeout=10s",
"-connect-timeout=10s",
]
---
apiVersion: v1
kind: Service
metadata:
name: cartservice
spec:
type: ClusterIP
selector:
app: cartservice
ports:
- name: grpc
port: 7070
targetPort: 7070
================================================
FILE: microservices-demo/kustomize/base/checkoutservice.yaml
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: checkoutservice
spec:
replicas: 1
selector:
matchLabels:
app: checkoutservice
template:
metadata:
labels:
app: checkoutservice
spec:
serviceAccountName: default
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
privileged: false
readOnlyRootFilesystem: true
imagePullPolicy: Always
image: checkoutservice:latest
ports:
- containerPort: 5050
readinessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-addr=:5050"]
livenessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-addr=:5050"]
env:
- name: PORT
value: "5050"
- name: PRODUCT_CATALOG_SERVICE_ADDR
value: "productcatalogservice:3550"
- name: SHIPPING_SERVICE_ADDR
value: "shippingservice:50051"
- name: PAYMENT_SERVICE_ADDR
value: "paymentservice:50051"
- name: EMAIL_SERVICE_ADDR
value: "emailservice:5000"
- name: CURRENCY_SERVICE_ADDR
value: "currencyservice:7000"
- name: CART_SERVICE_ADDR
value: "cartservice:7070"
- name: DISABLE_STATS
value: "1"
- name: DISABLE_TRACING
value: "1"
- name: DISABLE_PROFILER
value: "1"
# - name: JAEGER_SERVICE_ADDR
# value: "jaeger-collector:14268"
resources:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
---
apiVersion: v1
kind: Service
metadata:
name: checkoutservice
spec:
type: ClusterIP
selector:
app: checkoutservice
ports:
- name: grpc
port: 5050
targetPort: 5050
================================================
FILE: microservices-demo/kustomize/base/currencyservice.yaml
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: currencyservice
spec:
replicas: 1
selector:
matchLabels:
app: currencyservice
template:
metadata:
labels:
app: currencyservice
spec:
serviceAccountName: default
terminationGracePeriodSeconds: 5
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
privileged: false
readOnlyRootFilesystem: true
imagePullPolicy: Always
image: currencyservice:latest
ports:
- name: grpc
containerPort: 7000
env:
- name: PORT
value: "7000"
- name: DISABLE_TRACING
value: "1"
- name: DISABLE_PROFILER
value: "1"
- name: DISABLE_DEBUGGER
value: "1"
readinessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-rpc-timeout=5s", "-addr=:7000"]
livenessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-rpc-timeout=5s", "-addr=:7000"]
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
---
apiVersion: v1
kind: Service
metadata:
name: currencyservice
spec:
type: ClusterIP
selector:
app: currencyservice
ports:
- name: grpc
port: 7000
targetPort: 7000
================================================
FILE: microservices-demo/kustomize/base/emailservice.yaml
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: emailservice
spec:
replicas: 1
selector:
matchLabels:
app: emailservice
template:
metadata:
labels:
app: emailservice
spec:
serviceAccountName: default
terminationGracePeriodSeconds: 5
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
privileged: false
readOnlyRootFilesystem: true
imagePullPolicy: Always
image: emailservice:latest
ports:
- containerPort: 8080
env:
- name: PORT
value: "8080"
- name: DISABLE_TRACING
value: "1"
- name: DISABLE_PROFILER
value: "1"
readinessProbe:
timeoutSeconds: 15
periodSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-rpc-timeout=5s", "-addr=:8080"]
livenessProbe:
timeoutSeconds: 15
periodSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-rpc-timeout=5s", "-addr=:8080"]
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
---
apiVersion: v1
kind: Service
metadata:
name: emailservice
spec:
type: ClusterIP
selector:
app: emailservice
ports:
- name: grpc
port: 5000
targetPort: 8080
================================================
FILE: microservices-demo/kustomize/base/frontend.yaml
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 1
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
serviceAccountName: default
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
privileged: false
readOnlyRootFilesystem: true
imagePullPolicy: Always
image: frontend:latest
ports:
- containerPort: 8080
readinessProbe:
initialDelaySeconds: 10
httpGet:
path: "/_healthz"
port: 8080
httpHeaders:
- name: "Cookie"
value: "shop_session-id=x-readiness-probe"
livenessProbe:
initialDelaySeconds: 10
httpGet:
path: "/_healthz"
port: 8080
httpHeaders:
- name: "Cookie"
value: "shop_session-id=x-liveness-probe"
env:
- name: PORT
value: "8080"
- name: PRODUCT_CATALOG_SERVICE_ADDR
value: "productcatalogservice:3550"
- name: CURRENCY_SERVICE_ADDR
value: "currencyservice:7000"
- name: CART_SERVICE_ADDR
value: "cartservice:7070"
- name: RECOMMENDATION_SERVICE_ADDR
value: "recommendationservice:8080"
- name: SHIPPING_SERVICE_ADDR
value: "shippingservice:50051"
- name: CHECKOUT_SERVICE_ADDR
value: "checkoutservice:5050"
- name: AD_SERVICE_ADDR
value: "adservice:9555"
# # ENV_PLATFORM: One of: local, gcp, aws, azure, onprem, alibaba
# # When not set, defaults to "local" unless running in GKE, otherwies auto-sets to gcp
# - name: ENV_PLATFORM
# value: "local"
- name: DISABLE_TRACING
value: "1"
- name: DISABLE_PROFILER
value: "1"
resources:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
---
apiVersion: v1
kind: Service
metadata:
name: frontend
spec:
type: ClusterIP
selector:
app: frontend
ports:
- name: http
port: 80
targetPort: 8080
================================================
FILE: microservices-demo/kustomize/base/kustomization.yaml
================================================
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- cartservice.yaml
- checkoutservice.yaml
- currencyservice.yaml
- emailservice.yaml
- frontend.yaml
- paymentservice.yaml
- productcatalogservice.yaml
- recommendationservice.yaml
- redis.yaml
- shippingservice.yaml
================================================
FILE: microservices-demo/kustomize/base/namespace.yaml
================================================
apiVersion: v1
kind: Namespace
metadata:
name: microservices-demo
================================================
FILE: microservices-demo/kustomize/base/paymentservice.yaml
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: paymentservice
spec:
replicas: 1
selector:
matchLabels:
app: paymentservice
template:
metadata:
labels:
app: paymentservice
spec:
serviceAccountName: default
terminationGracePeriodSeconds: 5
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
privileged: false
readOnlyRootFilesystem: true
imagePullPolicy: Always
image: paymentservice:latest
ports:
- containerPort: 50051
env:
- name: PORT
value: "50051"
- name: DISABLE_TRACING
value: "1"
- name: DISABLE_PROFILER
value: "1"
- name: DISABLE_DEBUGGER
value: "1"
readinessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-rpc-timeout=5s", "-addr=:50051"]
livenessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-rpc-timeout=5s", "-addr=:50051"]
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
---
apiVersion: v1
kind: Service
metadata:
name: paymentservice
spec:
type: ClusterIP
selector:
app: paymentservice
ports:
- name: grpc
port: 50051
targetPort: 50051
================================================
FILE: microservices-demo/kustomize/base/productcatalogservice.yaml
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: productcatalogservice
spec:
replicas: 1
selector:
matchLabels:
app: productcatalogservice
template:
metadata:
labels:
app: productcatalogservice
spec:
serviceAccountName: default
terminationGracePeriodSeconds: 5
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
privileged: false
readOnlyRootFilesystem: true
imagePullPolicy: Always
image: productcatalogservice:latest
ports:
- containerPort: 3550
env:
- name: PORT
value: "3550"
- name: DISABLE_STATS
value: "1"
- name: DISABLE_TRACING
value: "1"
- name: DISABLE_PROFILER
value: "1"
# - name: JAEGER_SERVICE_ADDR
# value: "jaeger-collector:14268"
readinessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-addr=:3550"]
livenessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-addr=:3550"]
resources:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
---
apiVersion: v1
kind: Service
metadata:
name: productcatalogservice
spec:
type: ClusterIP
selector:
app: productcatalogservice
ports:
- name: grpc
port: 3550
targetPort: 3550
================================================
FILE: microservices-demo/kustomize/base/recommendationservice.yaml
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: recommendationservice
spec:
replicas: 1
selector:
matchLabels:
app: recommendationservice
template:
metadata:
labels:
app: recommendationservice
spec:
serviceAccountName: default
terminationGracePeriodSeconds: 5
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
privileged: false
readOnlyRootFilesystem: true
imagePullPolicy: Always
image: recommendationservice:latest
ports:
- containerPort: 8080
readinessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
periodSeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"]
livenessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
periodSeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"]
env:
- name: PORT
value: "8080"
- name: PRODUCT_CATALOG_SERVICE_ADDR
value: "productcatalogservice:3550"
- name: DISABLE_TRACING
value: "1"
- name: DISABLE_PROFILER
value: "1"
- name: DISABLE_DEBUGGER
value: "1"
resources:
requests:
cpu: 100m
memory: 220Mi
limits:
cpu: 200m
memory: 450Mi
---
apiVersion: v1
kind: Service
metadata:
name: recommendationservice
spec:
type: ClusterIP
selector:
app: recommendationservice
ports:
- name: grpc
port: 8080
targetPort: 8080
================================================
FILE: microservices-demo/kustomize/base/redis.yaml
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-cart
spec:
replicas: 1
selector:
matchLabels:
app: redis-cart
template:
metadata:
labels:
app: redis-cart
spec:
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
containers:
- name: redis
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
privileged: false
readOnlyRootFilesystem: true
image: redis:alpine
ports:
- containerPort: 6379
readinessProbe:
periodSeconds: 5
tcpSocket:
port: 6379
livenessProbe:
periodSeconds: 5
tcpSocket:
port: 6379
volumeMounts:
- mountPath: /data
name: redis-data
resources:
limits:
memory: 256Mi
cpu: 125m
requests:
cpu: 70m
memory: 200Mi
volumes:
- name: redis-data
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: redis-cart
spec:
type: ClusterIP
selector:
app: redis-cart
ports:
- name: tls-redis
port: 6379
targetPort: 6379
================================================
FILE: microservices-demo/kustomize/base/shippingservice.yaml
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: shippingservice
spec:
replicas: 1
selector:
matchLabels:
app: shippingservice
template:
metadata:
labels:
app: shippingservice
spec:
serviceAccountName: default
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
privileged: false
readOnlyRootFilesystem: true
imagePullPolicy: Always
image: shippingservice:latest
ports:
- containerPort: 50051
env:
- name: PORT
value: "50051"
- name: DISABLE_STATS
value: "1"
- name: DISABLE_TRACING
value: "1"
- name: DISABLE_PROFILER
value: "1"
# - name: JAEGER_SERVICE_ADDR
# value: "jaeger-collector:14268"
readinessProbe:
timeoutSeconds: 15
periodSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-addr=:50051"]
livenessProbe:
timeoutSeconds: 15
initialDelaySeconds: 15
exec:
command: ["/bin/grpc_health_probe", "-addr=:50051"]
resources:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
---
apiVersion: v1
kind: Service
metadata:
name: shippingservice
spec:
type: ClusterIP
selector:
app: shippingservice
ports:
- name: grpc
port: 50051
targetPort: 50051
================================================
FILE: microservices-demo/kustomize/dev/kustomization.yaml
================================================
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: microservices-demo-dev
commonLabels:
variant: dev
resources:
- ../base
images:
- name: cartservice
newName: registry.digitalocean.com/microservices-demo/cartservice
newTag: v1.0.0
- name: checkoutservice
newName: registry.digitalocean.com/microservices-demo/checkoutservice
newTag: v1.0.0
- name: currencyservice
newName: registry.digitalocean.com/microservices-demo/currencyservice
newTag: v1.0.0
- name: emailservice
newName: registry.digitalocean.com/microservices-demo/emailservice
newTag: v1.0.0
- name: frontend
newName: registry.digitalocean.com/microservices-demo/frontend
newTag: v1.0.0
- name: paymentservice
newName: registry.digitalocean.com/microservices-demo/paymentservice
newTag: v1.0.0
- name: productcatalogservice
newName: registry.digitalocean.com/microservices-demo/productcatalogservice
newTag: v1.0.0
- name: recommendationservice
newName: registry.digitalocean.com/microservices-demo/recommendationservice
newTag: v1.0.0
- name: shippingservice
newName: registry.digitalocean.com/microservices-demo/shippingservice
newTag: v1.0.0
================================================
FILE: microservices-demo/kustomize/kustomization.yaml
================================================
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- dev
- staging
- prod
================================================
FILE: microservices-demo/kustomize/prod/kustomization.yaml
================================================
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: microservices-demo-prod
commonLabels:
variant: prod
resources:
- ../base
images:
- name: cartservice
newName: registry.digitalocean.com/microservices-demo/cartservice
newTag: v1.0.0
- name: checkoutservice
newName: registry.digitalocean.com/microservices-demo/checkoutservice
newTag: v1.0.0
- name: currencyservice
newName: registry.digitalocean.com/microservices-demo/currencyservice
newTag: v1.0.0
- name: emailservice
newName: registry.digitalocean.com/microservices-demo/emailservice
newTag: v1.0.0
- name: frontend
newName: registry.digitalocean.com/microservices-demo/frontend
newTag: v1.0.0
- name: paymentservice
newName: registry.digitalocean.com/microservices-demo/paymentservice
newTag: v1.0.0
- name: productcatalogservice
newName: registry.digitalocean.com/microservices-demo/productcatalogservice
newTag: v1.0.0
- name: recommendationservice
newName: registry.digitalocean.com/microservices-demo/recommendationservice
newTag: v1.0.0
- name: shippingservice
newName: registry.digitalocean.com/microservices-demo/shippingservice
newTag: v1.0.0
replicas:
- name: cartservice
count: 2
- name: checkoutservice
count: 2
- name: currencyservice
count: 2
- name: emailservice
count: 2
- name: frontend
count: 2
- name: paymentservice
count: 2
- name: productcatalogservice
count: 2
- name: recommendationservice
count: 2
- name: shippingservice
count: 2
================================================
FILE: microservices-demo/kustomize/staging/kustomization.yaml
================================================
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: microservices-demo-staging
commonLabels:
variant: staging
resources:
- ../base
images:
- name: cartservice
newName: registry.digitalocean.com/microservices-demo/cartservice
newTag: v1.0.0
- name: checkoutservice
newName: registry.digitalocean.com/microservices-demo/checkoutservice
newTag: v1.0.0
- name: currencyservice
newName: registry.digitalocean.com/microservices-demo/currencyservice
newTag: v1.0.0
- name: emailservice
newName: registry.digitalocean.com/microservices-demo/emailservice
newTag: v1.0.0
- name: frontend
newName: registry.digitalocean.com/microservices-demo/frontend
newTag: v1.0.0
- name: paymentservice
newName: registry.digitalocean.com/microservices-demo/paymentservice
newTag: v1.0.0
- name: productcatalogservice
newName: registry.digitalocean.com/microservices-demo/productcatalogservice
newTag: v1.0.0
- name: recommendationservice
newName: registry.digitalocean.com/microservices-demo/recommendationservice
newTag: v1.0.0
- name: shippingservice
newName: registry.digitalocean.com/microservices-demo/shippingservice
newTag: v1.0.0
replicas:
- name: cartservice
count: 2
- name: checkoutservice
count: 2
- name: currencyservice
count: 2
- name: emailservice
count: 2
- name: frontend
count: 2
- name: paymentservice
count: 2
- name: productcatalogservice
count: 2
- name: recommendationservice
count: 2
- name: shippingservice
count: 2
================================================
FILE: microservices-demo/release-scripts/README.md
================================================
# Overview of the Release Scripts
This directory contains the scripts for creating a new `microservices-demo` release.
## Create a New Release
### 1. Decide on the next release version number using [semantic versioning](https://semver.org/).
- Look at the [commits since the previous release](https://github.com/GoogleCloudPlatform/microservices-demo/commits/main).
#### 2. Open a new terminal
#### 3. Make sure you have `gsed` installed. If not, `brew install gnu-sed`.
#### 4. Set the following environment variables
- `TAG` - This is the new version (e.g., `v0.3.5`).
- `REPO_PREFIX` - This is the Docker repository.
##### Example
```shell
export TAG=v0.3.5
export REPO_PREFIX=gcr.io/google-samples/microservices-demo
```
#### 5. Run `./release-scripts/make-release.sh`
- Make sure you run `./hack/make-release.sh` from this project's root folder — **not** from inside the `release-scripts/` folder.
- This script:
1. uses `make-docker-images.sh` to build and push a Docker image for each microservice to the previously specified repository.
1. uses `make-release-artifacts.sh` to regenerates (and update the image $TAGS) YAML file at `./release/kubernetes-manifests.yaml`.
1. runs `git tag` and pushes a new branch (e.g., `release/v0.3.5`) with the changes to `release/kubernetes-manifests.yaml`.
#### 6. [Draft a new release on GitHub](https://github.com/GoogleCloudPlatform/microservices-demo/releases).
- Summarize the [commits since the previous release](https://github.com/GoogleCloudPlatform/microservices-demo/commits/main).
- See previous releases for inspiration on release notes.
#### 7. Create a new pull-request
- When you ran `make-release.sh`, it created a new branch (e.g., `release/v0.3.5`).
- Include the new release draft in the pull-request description for reviewers to see.
#### 8. Once your pull-request is approved, merge it
#### 9. Deploy `release/kubernetes-manifests.yaml`
```shell
kubectl apply -f ./release/kubernetes-manifests.yaml
```
================================================
FILE: microservices-demo/release-scripts/license_header.txt
================================================
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
================================================
FILE: microservices-demo/release-scripts/make-cnb-docker-images.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
log() { echo "$1" >&2; }
TAG="${TAG:?TAG env variable must be specified}"
REPO_PREFIX="${REPO_PREFIX:?REPO_PREFIX env variable must be specified}"
while IFS= read -d $'\0' -r dir; do
# build image
svcname="$(basename "${dir}")"
builddir="${dir}"
#PR 516 moved cartservice build artifacts one level down to src
if [ $svcname == "cartservice" ]
then
builddir="${dir}/src"
fi
## skipping loadgenerator service building as it's used only in CI for tests
if [ $svcname == "loadgenerator" ]
then
continue
fi
image="${REPO_PREFIX}/$svcname:$TAG"
(
cd "${builddir}"
log "Building and pushing: ${image}"
## we are not using the --publish pack flag due to an issue preventing the pack CLI from pushing to DOCR
pack build ${image} --builder gcr.io/buildpacks/builder:v1
docker push ${image}
)
done < <(find "${SCRIPTDIR}/../src" -mindepth 1 -maxdepth 1 -type d -print0)
log "Successfully built and pushed all images."
================================================
FILE: microservices-demo/release-scripts/make-docker-images.sh
================================================
#!/usr/bin/env bash
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Builds and pushes docker image for each demo microservice.
set -euo pipefail
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
log() { echo "$1" >&2; }
TAG="${TAG:?TAG env variable must be specified}"
REPO_PREFIX="${REPO_PREFIX:?REPO_PREFIX env variable must be specified}"
while IFS= read -d $'\0' -r dir; do
# build image
svcname="$(basename "${dir}")"
builddir="${dir}"
#PR 516 moved cartservice build artifacts one level down to src
if [ $svcname == "cartservice" ]
then
builddir="${dir}/src"
fi
image="${REPO_PREFIX}/$svcname:$TAG"
(
cd "${builddir}"
log "Building and pushing: ${image}"
docker buildx build --platform linux/amd64 -t "${image}" --push .
)
done < <(find "${SCRIPTDIR}/../src" -mindepth 1 -maxdepth 1 -type d -print0)
log "Successfully built and pushed all images."
================================================
FILE: microservices-demo/release-scripts/make-release-artifacts.sh
================================================
#!/usr/bin/env bash
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This script compiles manifest files with the image tags and places them in
# /release/...
set -euo pipefail
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
[[ -n "${DEBUG:-}" ]] && set -x
log() { echo "$1" >&2; }
TAG="${TAG:?TAG env variable must be specified}"
REPO_PREFIX="${REPO_PREFIX:?REPO_PREFIX env variable must be specified}"
OUT_DIR="${OUT_DIR:-${SCRIPTDIR}/../release}"
print_license_header() {
cat "${SCRIPTDIR}/license_header.txt"
echo
}
print_autogenerated_warning() {
cat<<EOF
# ----------------------------------------------------------
# WARNING: This file is autogenerated. Do not manually edit.
# ----------------------------------------------------------
EOF
}
# define gsed as a function on Linux for compatibility
[ "$(uname -s)" == "Linux" ] && gsed() {
sed "$@"
}
read_manifests() {
local dir
dir="$1"
while IFS= read -d $'\0' -r file; do
echo "---"
# strip license headers (pattern "^# ")
awk '
/^[^# ]/ { found = 1 }
found { print }' "${file}"
done < <(find "${dir}" -name '*.yaml' -type f -print0)
}
mk_kubernetes_manifests() {
out_manifest="$(read_manifests "${SCRIPTDIR}/../kubernetes-manifests")"
# replace "image" repo, tag for each service
for dir in ./src/*/
do
svcname="$(basename "${dir}")"
image="$REPO_PREFIX/$svcname:$TAG"
pattern="^(\s*)image:\s.*$svcname(.*)(\s*)"
replace="\1image: $image\3"
out_manifest="$(gsed -r "s|$pattern|$replace|g" <(echo "${out_manifest}") )"
done
print_license_header
print_autogenerated_warning
echo '# [START gke_release_kubernetes_manifests_microservices_demo]'
echo "${out_manifest}"
echo "# [END gke_release_kubernetes_manifests_microservices_demo]"
}
mk_istio_manifests() {
print_license_header
print_autogenerated_warning
echo '# [START servicemesh_release_istio_manifests_microservices_demo]'
read_manifests "${SCRIPTDIR}/../istio-manifests"
echo '# [END servicemesh_release_istio_manifests_microservices_demo]'
}
main() {
mkdir -p "${OUT_DIR}"
local k8s_manifests_file istio_manifests_file
k8s_manifests_file="${OUT_DIR}/kubernetes-manifests.yaml"
mk_kubernetes_manifests > "${k8s_manifests_file}"
log "Written ${k8s_manifests_file}"
istio_manifests_file="${OUT_DIR}/istio-manifests.yaml"
mk_istio_manifests > "${istio_manifests_file}"
log "Written ${istio_manifests_file}"
}
main
================================================
FILE: microservices-demo/release-scripts/make-release.sh
================================================
#!/usr/bin/env bash
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This script creates a new release by:
# - 1. building/pushing images
# - 2. injecting tags into YAML manifests
# - 3. creating a new git tag
# - 4. pushing the tag/commit to main.
set -euo pipefail
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
[[ -n "${DEBUG:-}" ]] && set -x
log() { echo "$1" >&2; }
fail() { log "$1"; exit 1; }
TAG="${TAG:?TAG env variable must be specified}"
REPO_PREFIX="${REPO_PREFIX:?REPO_PREFIX env variable must be specified e.g. gcr.io\/google-samples\/microservices-demo}"
if [[ "$TAG" != v* ]]; then
fail "\$TAG must start with 'v', e.g. v0.1.0 (got: $TAG)"
fi
# build and push images
"${SCRIPTDIR}"/make-docker-images.sh
# update yaml
"${SCRIPTDIR}"/make-release-artifacts.sh
# create git release / push to new branch
git checkout -b "release/${TAG}"
git add "${SCRIPTDIR}/../release/"
git commit --allow-empty -m "Release $TAG"
log "Pushing k8s manifests to release/${TAG}..."
git tag "$TAG"
git push --set-upstream origin "release/${TAG}"
git push --tags
log "Successfully tagged release $TAG."
================================================
FILE: microservices-demo/src/.gitignore
================================================
# Go: for the time being we are not checking in the vendor/ directories to git
# to prevent the repo from getting larger forever. In each Go service, you can
# run "dep ensure --vendor-only" to download the dependencies to vendor/ based
# on the Gopkg.{toml,lock} files in that directory.
vendor/
================================================
FILE: microservices-demo/src/cartservice/.gitignore
================================================
**/bin/
**/obj/
.vs/*.*
================================================
FILE: microservices-demo/src/cartservice/cartservice.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cartservice", "src\cartservice.csproj", "{2348C29F-E8D3-4955-916D-D609CBC97FCB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cartservice.tests", "tests\cartservice.tests.csproj", "{59825342-CE64-4AFA-8744-781692C0811B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Debug|x64.ActiveCfg = Debug|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Debug|x64.Build.0 = Debug|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Debug|x86.ActiveCfg = Debug|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Debug|x86.Build.0 = Debug|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Release|Any CPU.Build.0 = Release|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Release|x64.ActiveCfg = Release|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Release|x64.Build.0 = Release|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Release|x86.ActiveCfg = Release|Any CPU
{2348C29F-E8D3-4955-916D-D609CBC97FCB}.Release|x86.Build.0 = Release|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Debug|x64.ActiveCfg = Debug|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Debug|x64.Build.0 = Debug|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Debug|x86.ActiveCfg = Debug|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Debug|x86.Build.0 = Debug|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Release|Any CPU.Build.0 = Release|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Release|x64.ActiveCfg = Release|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Release|x64.Build.0 = Release|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Release|x86.ActiveCfg = Release|Any CPU
{59825342-CE64-4AFA-8744-781692C0811B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
================================================
FILE: microservices-demo/src/cartservice/src/.dockerignore
================================================
**/*.sh
**/*.bat
**/bin/
**/obj/
**/out/
Dockerfile*
================================================
FILE: microservices-demo/src/cartservice/src/Dockerfile
================================================
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# https://mcr.microsoft.com/v2/dotnet/sdk/tags/list
FROM mcr.microsoft.com/dotnet/sdk:6.0.400 as builder
WORKDIR /app
COPY cartservice.csproj .
RUN dotnet restore cartservice.csproj -r linux-musl-x64
COPY . .
RUN dotnet publish cartservice.csproj -p:PublishSingleFile=true -r linux-musl-x64 --self-contained true -p:PublishTrimmed=True -p:TrimMode=Link -c release -o /cartservice --no-restore
# https://mcr.microsoft.com/v2/dotnet/runtime-deps/tags/list
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0.8-alpine3.16-amd64
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.11 && \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe
WORKDIR /app
COPY --from=builder /cartservice .
ENV ASPNETCORE_URLS http://*:7070
ENV DOTNET_EnableDiagnostics=0
ENTRYPOINT ["/app/cartservice"]
================================================
FILE: microservices-demo/src/cartservice/src/Dockerfile.debug
================================================
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /app
COPY . .
RUN dotnet restore cartservice.csproj
RUN dotnet build "./cartservice.csproj" -c Debug -o /out
FROM build AS publish
RUN dotnet publish cartservice.csproj -c Debug -o /out
# Building final image used in running container
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS final
# Installing procps on the container to enable debugging of .NET Core
RUN apt-get update \
&& apt-get install -y unzip procps wget
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.11 && \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe
WORKDIR /app
COPY --from=publish /out .
ENV ASPNETCORE_URLS=http://*:7070
ENTRYPOINT ["dotnet", "cartservice.dll"]
================================================
FILE: microservices-demo/src/cartservice/src/Program.cs
================================================
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using cartservice;
CreateHostBuilder(args).Build().Run();
static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
================================================
FILE: microservices-demo/src/cartservice/src/Startup.cs
================================================
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Hosting;
using cartservice.cartstore;
using cartservice.services;
using Microsoft.Extensions.Caching.StackExchangeRedis;
namespace cartservice
{
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.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
string redisAddress = Configuration["REDIS_ADDR"];
if (!string.IsNullOrEmpty(redisAddress))
{
services.AddStackExchangeRedisCache(options =>
{
options.Configuration = redisAddress;
});
}
else
{
Console.WriteLine("Redis cache host(hostname+port) was not specified. Starting a cart service using in memory store");
services.AddDistributedMemoryCache();
}
services.AddSingleton<ICartStore, RedisCartStore>();
services.AddGrpc();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<CartService>();
endpoints.MapGrpcService<cartservice.services.HealthCheckService>();
endpoints.MapGet("/", async context =>
{
await context.Response.WriteAsync("Communication with gRPC endpoints must be made through a gRPC client. To learn how to create a client, visit: https://go.microsoft.com/fwlink/?linkid=2086909");
});
});
}
}
}
================================================
FILE: microservices-demo/src/cartservice/src/appsettings.json
================================================
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"Kestrel": {
"EndpointDefaults": {
"Protocols": "Http2"
}
}
}
================================================
FILE: microservices-demo/src/cartservice/src/cartservice.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.48.0" />
<PackageReference Include="Grpc.HealthCheck" Version="2.48.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.8" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="protos\Cart.proto" GrpcServices="Both" />
</ItemGroup>
</Project>
================================================
FILE: microservices-demo/src/cartservice/src/cartstore/ICartStore.cs
================================================
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System.Threading.Tasks;
namespace cartservice.cartstore
{
public interface ICartStore
{
Task AddItemAsync(string userId, string productId, int quantity);
Task EmptyCartAsync(string userId);
Task<Hipstershop.Cart> GetCartAsync(string userId);
bool Ping();
}
}
================================================
FILE: microservices-demo/src/cartservice/src/cartstore/RedisCartStore.cs
================================================
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Linq;
using System.Threading.Tasks;
using Grpc.Core;
using Microsoft.Extensions.Caching.Distributed;
using Google.Protobuf;
namespace cartservice.cartstore
{
public class RedisCartStore : ICartStore
{
private readonly IDistributedCache _cache;
public RedisCartStore(IDistributedCache cache)
{
_cache = cache;
}
public async Task AddItemAsync(string userId, string productId, int quantity)
{
Console.WriteLine($"AddItemAsync called with userId={userId}, productId={productId}, quantity={quantity}");
try
{
Hipstershop.Cart cart;
var value = await _cache.GetAsync(userId);
if (value == null)
{
cart = new Hipstershop.Cart();
cart.UserId = userId;
cart.Items.Add(new Hipstershop.CartItem { ProductId = productId, Quantity = quantity });
}
else
{
cart = Hipstershop.Cart.Parser.ParseFrom(value);
var existingItem = cart.Items.SingleOrDefault(i => i.ProductId == productId);
if (existingItem == null)
{
cart.Items.Add(new Hipstershop.CartItem { ProductId = productId, Quantity = quantity });
}
else
{
existingItem.Quantity += quantity;
}
}
await _cache.SetAsync(userId, cart.ToByteArray());
}
catch (Exception ex)
{
throw new RpcException(new Status(StatusCode.FailedPrecondition, $"Can't access cart storage. {ex}"));
}
}
public async Task EmptyCartAsync(string userId)
{
Console.WriteLine($"EmptyCartAsync called with userId={userId}");
try
{
var cart = new Hipstershop.Cart();
await _cache.SetAsync(userId, cart.ToByteArray());
}
catch (Exception ex)
{
throw new RpcException(new Status(StatusCode.FailedPrecondition, $"Can't access cart storage. {ex}"));
}
}
public async Task<Hipstershop.Cart> GetCartAsync(string userId)
{
Console.WriteLine($"GetCartAsync called with userId={userId}");
try
{
// Access the cart from the cache
var value = await _cache.GetAsync(userId);
if (value != null)
{
return Hipstershop.Cart.Parser.ParseFrom(value);
}
// We decided to return empty cart in cases when user wasn't in the cache before
return new Hipstershop.Cart();
}
catch (Exception ex)
{
throw new RpcException(new Status(StatusCode.FailedPrecondition, $"Can't access cart storage. {ex}"));
}
}
public bool Ping()
{
try
{
return true;
}
catch (Exception)
{
return false;
}
}
}
}
================================================
FILE: microservices-demo/src/cartservice/src/protos/Cart.proto
================================================
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package hipstershop;
// -----------------Cart service-----------------
service CartService {
rpc AddItem(AddItemRequest) returns (Empty) {}
rpc GetCart(GetCartRequest) returns (Cart) {}
rpc EmptyCart(EmptyCartRequest) returns (Empty) {}
}
message CartItem {
string product_id = 1;
int32 quantity = 2;
}
message AddItemRequest {
string user_id = 1;
CartItem item = 2;
}
message EmptyCartRequest {
string user_id = 1;
}
message GetCartRequest {
string user_id = 1;
}
message Cart {
string user_id = 1;
repeated CartItem items = 2;
}
message Empty {}
================================================
FILE: microservices-demo/src/cartservice/src/services/CartService.cs
================================================
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Threading.Tasks;
using Grpc.Core;
using Microsoft.Extensions.Logging;
using cartservice.cartstore;
using Hipstershop;
namespace cartservice.services
{
public class CartService : Hipstershop.CartService.CartServiceBase
{
private readonly static Empty Empty = new Empty();
private readonly ICartStore _cartStore;
public CartService(ICartStore cartStore)
{
_cartStore = cartStore;
}
public async override Task<Empty> AddItem(AddItemRequest request, ServerCallContext context)
{
await _cartStore.AddItemAsync(request.UserId, request.Item.ProductId, request.Item.Quantity);
return Empty;
}
public override Task<Cart> GetCart(GetCartRequest request, ServerCallContext context)
{
return _cartStore.GetCartAsync(request.UserId);
}
public async override Task<Empty> EmptyCart(EmptyCartRequest request, ServerCallContext context)
{
await _cartStore.EmptyCartAsync(request.UserId);
return Empty;
}
}
}
================================================
FILE: microservices-demo/src/cartservice/src/services/HealthCheckService.cs
================================================
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Threading.Tasks;
using Grpc.Core;
using Grpc.Health.V1;
using static Grpc.Health.V1.Health;
using cartservice.cartstore;
namespace cartservice.services
{
internal class HealthCheckService : HealthBase
{
private ICartStore _cartStore { get; }
public HealthCheckService (ICartStore cartStore)
{
_cartStore = cartStore;
}
public override Task<HealthCheckResponse> Check(HealthCheckRequest request, ServerCallContext context)
{
Console.WriteLine ("Checking CartService Health");
return Task.FromResult(new HealthCheckResponse {
Status = _cartStore.Ping() ? HealthCheckResponse.Types.ServingStatus.Serving : HealthCheckResponse.Types.ServingStatus.NotServing
});
}
}
}
================================================
FILE: microservices-demo/src/cartservice/tests/.gitignore
================================================
/bin/*
/obj/*
/.vs/*
================================================
FILE: microservices-demo/src/cartservice/tests/CartServiceTests.cs
================================================
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Threading.Tasks;
using Grpc.Net.Client;
using Hipstershop;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.Hosting;
using Xunit;
using static Hipstershop.CartService;
namespace cartservice.tests
{
public class CartServiceTests
{
private readonly IHostBuilder _host;
public CartServiceTests()
{
_host = new HostBuilder().ConfigureWebHost(webBuilder =>
{
webBuilder
.UseStartup<Startup>()
.UseTestServer();
});
}
[Fact]
public async Task GetItem_NoAddItemBefore_EmptyCartReturned()
{
// Setup test server and client
using var server = await _host.StartAsync();
var httpClient = server.GetTestClient();
string userId = Guid.NewGuid().ToString();
// Create a GRPC communication channel between the client and the server
var channel = GrpcChannel.ForAddress(httpClient.BaseAddress, new GrpcChannelOptions
{
HttpClient = httpClient
});
var cartClient = new CartServiceClient(channel);
var request = new GetCartRequest
{
UserId = userId,
};
var cart = await cartClient.GetCartAsync(request);
Assert.NotNull(cart);
// All grpc objects implement IEquitable, so we can compare equality with by-value semantics
Assert.Equal(new Cart(), cart);
}
[Fact]
public async Task AddItem_ItemExists_Updated()
{
// Setup test server and client
using var server = await _host.StartAsync();
var httpClient = server.GetTestClient();
string userId = Guid.NewGuid().ToString();
// Create a GRPC communication channel between the client and the server
var channel = GrpcChannel.ForAddress(httpClient.BaseAddress, new GrpcChannelOptions
{
HttpClient = httpClient
});
var client = new CartServiceClient(channel);
var request = new AddItemRequest
{
UserId = userId,
Item = new CartItem
{
ProductId = "1",
Quantity = 1
}
};
// First add - nothing should fail
await client.AddItemAsync(request);
// Second add of existing product - quantity should be updated
await client.AddItemAsync(request);
var getCartRequest = new GetCartRequest
{
UserId = userId
};
var cart = await client.GetCartAsync(getCartRequest);
Assert.NotNull(cart);
Assert.Equal(userId, cart.UserId);
Assert.Single(cart.Items);
Assert.Equal(2, cart.Items[0].Quantity);
// Cleanup
await client.EmptyCartAsync(new EmptyCartRequest { UserId = userId });
}
[Fact]
public async Task AddItem_New_Inserted()
{
// Setup test server and client
using var server = await _host.StartAsync();
var httpClient = server.GetTestClient();
string userId = Guid.NewGuid().ToString();
// Create a GRPC communication channel between the client and the server
var channel = GrpcChannel.ForAddress(httpClient.BaseAddress, new GrpcChannelOptions
{
HttpClient = httpClient
});
// Create a proxy object to work with the server
var client = new CartServiceClient(channel);
var request = new AddItemRequest
{
UserId = userId,
Item = new CartItem
{
ProductId = "1",
Quantity = 1
}
};
await client.AddItemAsync(request);
var getCartRequest = new GetCartRequest
{
UserId = userId
};
var cart = await client.GetCartAsync(getCartRequest);
Assert.NotNull(cart);
Assert.Equal(userId, cart.UserId);
Assert.Single(cart.Items);
await client.EmptyCartAsync(new EmptyCartRequest { UserId = userId });
cart = await client.GetCartAsync(getCartRequest);
Assert.Empty(cart.Items);
}
}
}
================================================
FILE: microservices-demo/src/cartservice/tests/cartservice.tests.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Grpc.Net.Client" Version="2.48.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\cartservice.csproj" />
</ItemGroup>
</Project>
================================================
FILE: microservices-demo/src/checkoutservice/.dockerignore
================================================
vendor/
================================================
FILE: microservices-demo/src/checkoutservice/Dockerfile
================================================
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.18.4-alpine as builder
RUN apk add --no-cache ca-certificates git
RUN apk add build-base
WORKDIR /src
# restore dependencies
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# Skaffold passes in debug-oriented compiler flags
ARG SKAFFOLD_GO_GCFLAGS
RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /checkoutservice .
FROM alpine as release
RUN apk add --no-cache ca-certificates
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.11 && \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe
WORKDIR /src
COPY --from=builder /checkoutservice /src/checkoutservice
# Definition of this variable is used by 'skaffold debug' to identify a golang binary.
# Default behavior - a failure prints a stack trace for the current goroutine.
# See https://golang.org/pkg/runtime/
ENV GOTRACEBACK=single
EXPOSE 5050
ENTRYPOINT ["/src/checkoutservice"]
================================================
FILE: microservices-demo/src/checkoutservice/README.md
================================================
# checkoutservice
Run the following command to restore dependencies to `vendor/` directory:
dep ensure --vendor-only
================================================
FILE: microservices-demo/src/checkoutservice/genproto/demo.pb.go
================================================
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: demo.proto
package hipstershop
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type CartItem struct {
ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Quantity int32 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CartItem) Reset() { *m = CartItem{} }
func (m *CartItem) String() string { return proto.CompactTextString(m) }
func (*CartItem) ProtoMessage() {}
func (*CartItem) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{0}
}
func (m *CartItem) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CartItem.Unmarshal(m, b)
}
func (m *CartItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CartItem.Marshal(b, m, deterministic)
}
func (m *CartItem) XXX_Merge(src proto.Message) {
xxx_messageInfo_CartItem.Merge(m, src)
}
func (m *CartItem) XXX_Size() int {
return xxx_messageInfo_CartItem.Size(m)
}
func (m *CartItem) XXX_DiscardUnknown() {
xxx_messageInfo_CartItem.DiscardUnknown(m)
}
var xxx_messageInfo_CartItem proto.InternalMessageInfo
func (m *CartItem) GetProductId() string {
if m != nil {
return m.ProductId
}
return ""
}
func (m *CartItem) GetQuantity() int32 {
if m != nil {
return m.Quantity
}
return 0
}
type AddItemRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Item *CartItem `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AddItemRequest) Reset() { *m = AddItemRequest{} }
func (m *AddItemRequest) String() string { return proto.CompactTextString(m) }
func (*AddItemRequest) ProtoMessage() {}
func (*AddItemRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{1}
}
func (m *AddItemRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddItemRequest.Unmarshal(m, b)
}
func (m *AddItemRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddItemRequest.Marshal(b, m, deterministic)
}
func (m *AddItemRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddItemRequest.Merge(m, src)
}
func (m *AddItemRequest) XXX_Size() int {
return xxx_messageInfo_AddItemRequest.Size(m)
}
func (m *AddItemRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AddItemRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AddItemRequest proto.InternalMessageInfo
func (m *AddItemRequest) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
func (m *AddItemRequest) GetItem() *CartItem {
if m != nil {
return m.Item
}
return nil
}
type EmptyCartRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EmptyCartRequest) Reset() { *m = EmptyCartRequest{} }
func (m *EmptyCartRequest) String() string { return proto.CompactTextString(m) }
func (*EmptyCartRequest) ProtoMessage() {}
func (*EmptyCartRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{2}
}
func (m *EmptyCartRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EmptyCartRequest.Unmarshal(m, b)
}
func (m *EmptyCartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EmptyCartRequest.Marshal(b, m, deterministic)
}
func (m *EmptyCartRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_EmptyCartRequest.Merge(m, src)
}
func (m *EmptyCartRequest) XXX_Size() int {
return xxx_messageInfo_EmptyCartRequest.Size(m)
}
func (m *EmptyCartRequest) XXX_DiscardUnknown() {
xxx_messageInfo_EmptyCartRequest.DiscardUnknown(m)
}
var xxx_messageInfo_EmptyCartRequest proto.InternalMessageInfo
func (m *EmptyCartRequest) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
type GetCartRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetCartRequest) Reset() { *m = GetCartRequest{} }
func (m *GetCartRequest) String() string { return proto.CompactTextString(m) }
func (*GetCartRequest) ProtoMessage() {}
func (*GetCartRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{3}
}
func (m *GetCartRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCartRequest.Unmarshal(m, b)
}
func (m *GetCartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetCartRequest.Marshal(b, m, deterministic)
}
func (m *GetCartRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCartRequest.Merge(m, src)
}
func (m *GetCartRequest) XXX_Size() int {
return xxx_messageInfo_GetCartRequest.Size(m)
}
func (m *GetCartRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetCartRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetCartRequest proto.InternalMessageInfo
func (m *GetCartRequest) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
type Cart struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Items []*CartItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Cart) Reset() { *m = Cart{} }
func (m *Cart) String() string { return proto.CompactTextString(m) }
func (*Cart) ProtoMessage() {}
func (*Cart) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{4}
}
func (m *Cart) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Cart.Unmarshal(m, b)
}
func (m *Cart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Cart.Marshal(b, m, deterministic)
}
func (m *Cart) XXX_Merge(src proto.Message) {
xxx_messageInfo_Cart.Merge(m, src)
}
func (m *Cart) XXX_Size() int {
return xxx_messageInfo_Cart.Size(m)
}
func (m *Cart) XXX_DiscardUnknown() {
xxx_messageInfo_Cart.DiscardUnknown(m)
}
var xxx_messageInfo_Cart proto.InternalMessageInfo
func (m *Cart) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
func (m *Cart) GetItems() []*CartItem {
if m != nil {
return m.Items
}
return nil
}
type Empty struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Empty) Reset() { *m = Empty{} }
func (m *Empty) String() string { return proto.CompactTextString(m) }
func (*Empty) ProtoMessage() {}
func (*Empty) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{5}
}
func (m *Empty) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Empty.Unmarshal(m, b)
}
func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
}
func (m *Empty) XXX_Merge(src proto.Message) {
xxx_messageInfo_Empty.Merge(m, src)
}
func (m *Empty) XXX_Size() int {
return xxx_messageInfo_Empty.Size(m)
}
func (m *Empty) XXX_DiscardUnknown() {
xxx_messageInfo_Empty.DiscardUnknown(m)
}
var xxx_messageInfo_Empty proto.InternalMessageInfo
type ListRecommendationsRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
ProductIds []string `protobuf:"bytes,2,rep,name=product_ids,json=productIds,proto3" json:"product_ids,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListRecommendationsRequest) Reset() { *m = ListRecommendationsRequest{} }
func (m *ListRecommendationsRequest) String() string { return proto.CompactTextString(m) }
func (*ListRecommendationsRequest) ProtoMessage() {}
func (*ListRecommendationsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{6}
}
func (m *ListRecommendationsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListRecommendationsRequest.Unmarshal(m, b)
}
func (m *ListRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListRecommendationsRequest.Marshal(b, m, deterministic)
}
func (m *ListRecommendationsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListRecommendationsRequest.Merge(m, src)
}
func (m *ListRecommendationsRequest) XXX_Size() int {
return xxx_messageInfo_ListRecommendationsRequest.Size(m)
}
func (m *ListRecommendationsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListRecommendationsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListRecommendationsRequest proto.InternalMessageInfo
func (m *ListRecommendationsRequest) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
func (m *ListRecommendationsRequest) GetProductIds() []string {
if m != nil {
return m.ProductIds
}
return nil
}
type ListRecommendationsResponse struct {
ProductIds []string `protobuf:"bytes,1,rep,name=product_ids,json=productIds,proto3" json:"product_ids,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListRecommendationsResponse) Reset() { *m = ListRecommendationsResponse{} }
func (m *ListRecommendationsResponse) String() string { return proto.CompactTextString(m) }
func (*ListRecommendationsResponse) ProtoMessage() {}
func (*ListRecommendationsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{7}
}
func (m *ListRecommendationsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListRecommendationsResponse.Unmarshal(m, b)
}
func (m *ListRecommendationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListRecommendationsResponse.Marshal(b, m, deterministic)
}
func (m *ListRecommendationsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListRecommendationsResponse.Merge(m, src)
}
func (m *ListRecommendationsResponse) XXX_Size() int {
return xxx_messageInfo_ListRecommendationsResponse.Size(m)
}
func (m *ListRecommendationsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListRecommendationsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListRecommendationsResponse proto.InternalMessageInfo
func (m *ListRecommendationsResponse) GetProductIds() []string {
if m != nil {
return m.ProductIds
}
return nil
}
type Product struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Picture string `protobuf:"bytes,4,opt,name=picture,proto3" json:"picture,omitempty"`
PriceUsd *Money `protobuf:"bytes,5,opt,name=price_usd,json=priceUsd,proto3" json:"price_usd,omitempty"`
// Categories such as "clothing" or "kitchen" that can be used to look up
// other related products.
Categories []string `protobuf:"bytes,6,rep,name=categories,proto3" json:"categories,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Product) Reset() { *m = Product{} }
func (m *Product) String() string { return proto.CompactTextString(m) }
func (*Product) ProtoMessage() {}
func (*Product) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{8}
}
func (m *Product) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Product.Unmarshal(m, b)
}
func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Product.Marshal(b, m, deterministic)
}
func (m *Product) XXX_Merge(src proto.Message) {
xxx_messageInfo_Product.Merge(m, src)
}
func (m *Product) XXX_Size() int {
return xxx_messageInfo_Product.Size(m)
}
func (m *Product) XXX_DiscardUnknown() {
xxx_messageInfo_Product.DiscardUnknown(m)
}
var xxx_messageInfo_Product proto.InternalMessageInfo
func (m *Product) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Product) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Product) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *Product) GetPicture() string {
if m != nil {
return m.Picture
}
return ""
}
func (m *Product) GetPriceUsd() *Money {
if m != nil {
return m.PriceUsd
}
return nil
}
func (m *Product) GetCategories() []string {
if m != nil {
return m.Categories
}
return nil
}
type ListProductsResponse struct {
Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListProductsResponse) Reset() { *m = ListProductsResponse{} }
func (m *ListProductsResponse) String() string { return proto.CompactTextString(m) }
func (*ListProductsResponse) ProtoMessage() {}
func (*ListProductsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{9}
}
func (m *ListProductsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListProductsResponse.Unmarshal(m, b)
}
func (m *ListProductsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListProductsResponse.Marshal(b, m, deterministic)
}
func (m *ListProductsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListProductsResponse.Merge(m, src)
}
func (m *ListProductsResponse) XXX_Size() int {
return xxx_messageInfo_ListProductsResponse.Size(m)
}
func (m *ListProductsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListProductsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListProductsResponse proto.InternalMessageInfo
func (m *ListProductsResponse) GetProducts() []*Product {
if m != nil {
return m.Products
}
return nil
}
type GetProductRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetProductRequest) Reset() { *m = GetProductRequest{} }
func (m *GetProductRequest) String() string { return proto.CompactTextString(m) }
func (*GetProductRequest) ProtoMessage() {}
func (*GetProductRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{10}
}
func (m *GetProductRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetProductRequest.Unmarshal(m, b)
}
func (m *GetProductRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetProductRequest.Marshal(b, m, deterministic)
}
func (m *GetProductRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetProductRequest.Merge(m, src)
}
func (m *GetProductRequest) XXX_Size() int {
return xxx_messageInfo_GetProductRequest.Size(m)
}
func (m *GetProductRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetProductRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetProductRequest proto.InternalMessageInfo
func (m *GetProductRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
type SearchProductsRequest struct {
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SearchProductsRequest) Reset() { *m = SearchProductsRequest{} }
func (m *SearchProductsRequest) String() string { return proto.CompactTextString(m) }
func (*SearchProductsRequest) ProtoMessage() {}
func (*SearchProductsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{11}
}
func (m *SearchProductsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SearchProductsRequest.Unmarshal(m, b)
}
func (m *SearchProductsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SearchProductsRequest.Marshal(b, m, deterministic)
}
func (m *SearchProductsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SearchProductsRequest.Merge(m, src)
}
func (m *SearchProductsRequest) XXX_Size() int {
return xxx_messageInfo_SearchProductsRequest.Size(m)
}
func (m *SearchProductsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SearchProductsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SearchProductsRequest proto.InternalMessageInfo
func (m *SearchProductsRequest) GetQuery() string {
if m != nil {
return m.Query
}
return ""
}
type SearchProductsResponse struct {
Results []*Product `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SearchProductsResponse) Reset() { *m = SearchProductsResponse{} }
func (m *SearchProductsResponse) String() string { return proto.CompactTextString(m) }
func (*SearchProductsResponse) ProtoMessage() {}
func (*SearchProductsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{12}
}
func (m *SearchProductsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SearchProductsResponse.Unmarshal(m, b)
}
func (m *SearchProductsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SearchProductsResponse.Marshal(b, m, deterministic)
}
func (m *SearchProductsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SearchProductsResponse.Merge(m, src)
}
func (m *SearchProductsResponse) XXX_Size() int {
return xxx_messageInfo_SearchProductsResponse.Size(m)
}
func (m *SearchProductsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SearchProductsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SearchProductsResponse proto.InternalMessageInfo
func (m *SearchProductsResponse) GetResults() []*Product {
if m != nil {
return m.Results
}
return nil
}
type GetQuoteRequest struct {
Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Items []*CartItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetQuoteRequest) Reset() { *m = GetQuoteRequest{} }
func (m *GetQuoteRequest) String() string { return proto.CompactTextString(m) }
func (*GetQuoteRequest) ProtoMessage() {}
func (*GetQuoteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{13}
}
func (m *GetQuoteRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetQuoteRequest.Unmarshal(m, b)
}
func (m *GetQuoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetQuoteRequest.Marshal(b, m, deterministic)
}
func (m *GetQuoteRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetQuoteRequest.Merge(m, src)
}
func (m *GetQuoteRequest) XXX_Size() int {
return xxx_messageInfo_GetQuoteRequest.Size(m)
}
func (m *GetQuoteRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetQuoteRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetQuoteRequest proto.InternalMessageInfo
func (m *GetQuoteRequest) GetAddress() *Address {
if m != nil {
return m.Address
}
return nil
}
func (m *GetQuoteRequest) GetItems() []*CartItem {
if m != nil {
return m.Items
}
return nil
}
type GetQuoteResponse struct {
CostUsd *Money `protobuf:"bytes,1,opt,name=cost_usd,json=costUsd,proto3" json:"cost_usd,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetQuoteResponse) Reset() { *m = GetQuoteResponse{} }
func (m *GetQuoteResponse) String() string { return proto.CompactTextString(m) }
func (*GetQuoteResponse) ProtoMessage() {}
func (*GetQuoteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{14}
}
func (m *GetQuoteResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetQuoteResponse.Unmarshal(m, b)
}
func (m *GetQuoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetQuoteResponse.Marshal(b, m, deterministic)
}
func (m *GetQuoteResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetQuoteResponse.Merge(m, src)
}
func (m *GetQuoteResponse) XXX_Size() int {
return xxx_messageInfo_GetQuoteResponse.Size(m)
}
func (m *GetQuoteResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetQuoteResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetQuoteResponse proto.InternalMessageInfo
func (m *GetQuoteResponse) GetCostUsd() *Money {
if m != nil {
return m.CostUsd
}
return nil
}
type ShipOrderRequest struct {
Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Items []*CartItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ShipOrderRequest) Reset() { *m = ShipOrderRequest{} }
func (m *ShipOrderRequest) String() string { return proto.CompactTextString(m) }
func (*ShipOrderRequest) ProtoMessage() {}
func (*ShipOrderRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{15}
}
func (m *ShipOrderRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ShipOrderRequest.Unmarshal(m, b)
}
func (m *ShipOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ShipOrderRequest.Marshal(b, m, deterministic)
}
func (m *ShipOrderRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ShipOrderRequest.Merge(m, src)
}
func (m *ShipOrderRequest) XXX_Size() int {
return xxx_messageInfo_ShipOrderRequest.Size(m)
}
func (m *ShipOrderRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ShipOrderRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ShipOrderRequest proto.InternalMessageInfo
func (m *ShipOrderRequest) GetAddress() *Address {
if m != nil {
return m.Address
}
return nil
}
func (m *ShipOrderRequest) GetItems() []*CartItem {
if m != nil {
return m.Items
}
return nil
}
type ShipOrderResponse struct {
TrackingId string `protobuf:"bytes,1,opt,name=tracking_id,json=trackingId,proto3" json:"tracking_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ShipOrderResponse) Reset() { *m = ShipOrderResponse{} }
func (m *ShipOrderResponse) String() string { return proto.CompactTextString(m) }
func (*ShipOrderResponse) ProtoMessage() {}
func (*ShipOrderResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{16}
}
func (m *ShipOrderResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ShipOrderResponse.Unmarshal(m, b)
}
func (m *ShipOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ShipOrderResponse.Marshal(b, m, deterministic)
}
func (m *ShipOrderResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ShipOrderResponse.Merge(m, src)
}
func (m *ShipOrderResponse) XXX_Size() int {
return xxx_messageInfo_ShipOrderResponse.Size(m)
}
func (m *ShipOrderResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ShipOrderResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ShipOrderResponse proto.InternalMessageInfo
func (m *ShipOrderResponse) GetTrackingId() string {
if m != nil {
return m.TrackingId
}
return ""
}
type Address struct {
StreetAddress string `protobuf:"bytes,1,opt,name=street_address,json=streetAddress,proto3" json:"street_address,omitempty"`
City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"`
State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"`
ZipCode int32 `protobuf:"varint,5,opt,name=zip_code,json=zipCode,proto3" json:"zip_code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Address) Reset() { *m = Address{} }
func (m *Address) String() string { return proto.CompactTextString(m) }
func (*Address) ProtoMessage() {}
func (*Address) Descriptor() ([]byte, []int) {
return fileDescriptor_ca53982754088a9d, []int{17}
}
func (m *Address) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Address.Unmarshal(m, b)
}
func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Address.Marshal(b, m, deterministic)
}
func (m *Address) XXX_Merge(src proto.Message) {
xxx_messageInfo_Address.Merge(m, src)
}
func (m *Address) XXX_Size() int {
return xxx_messageInfo_Address.Size(m)
}
func (m *Address) XXX_DiscardUnknown() {
xxx_messageInfo_Address.DiscardUnknown(m)
}
var xxx_messageInfo_Address proto.InternalMessageInfo
func (m *Address) GetStreetAddress() string {
if m != nil {
return m.StreetAddress
}
return ""
}
func (m *Address) GetCity() string {
if m != nil {
return m.City
}
return ""
}
func (m *Address) GetState() string {
if m != nil {
return m.State
}
return ""
}
func (m *Address) GetCountry() string {
if m != nil {
return m.Country
}
return ""
}
func (m *Address) GetZipCode() int32 {
if m != nil {
return m.ZipCode
}
return 0
}
// Represents an amount of money with its currency type.
type Money struct {
// The 3-letter currency code defined in ISO 4217.
CurrencyCode string `protobuf:"bytes,1,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
// The whole units of the amount.
// F
gitextract_b1f7n2wi/
├── .github/
│ └── workflows/
│ ├── game-2048-kubescape.yaml
│ ├── game-2048-snyk.yaml
│ ├── online-boutique-main-ci.yaml
│ ├── online-boutique-pr-ci.yaml
│ ├── online-boutique-pr-kustomize-validation.yaml
│ ├── online-boutique-release.yaml
│ ├── online-boutique-snyk-docker-scan.yaml
│ ├── online-boutique-snyk-iac-scan.yaml
│ └── online-boutique-snyk-source-code-scan.yaml
├── .gitignore
├── README.md
├── bookinfo-example/
│ ├── README.md
│ └── kustomize/
│ ├── kustomization.yaml
│ └── resources/
│ └── namespace.yaml
├── doks-example/
│ ├── .travis.yml
│ ├── Dockerfile
│ ├── LICENSE
│ ├── README.md
│ ├── manifest.yaml
│ ├── script/
│ │ ├── docker-publish
│ │ ├── down
│ │ ├── up
│ │ └── wait-for-service
│ └── web/
│ ├── index.html
│ └── style.css
├── emojivoto-example/
│ ├── README.md
│ └── kustomize/
│ ├── kustomization.yaml
│ └── patches/
│ ├── emoji-svc.yaml
│ └── voting-svc.yaml
├── game-2048-example/
│ ├── .dockerignore
│ ├── .gitignore
│ ├── Dockerfile
│ ├── LICENSE
│ ├── README.md
│ ├── Tiltfile
│ ├── knative-service.yaml
│ ├── kustomize/
│ │ ├── kustomization.yaml
│ │ └── resources/
│ │ ├── deployment.yaml
│ │ ├── namespace.yaml
│ │ └── service.yaml
│ ├── package.json
│ ├── src/
│ │ └── index.js
│ └── webpack.config.js
├── microservices-demo/
│ ├── .gitignore
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── Tiltfile
│ ├── kustomize/
│ │ ├── base/
│ │ │ ├── cartservice.yaml
│ │ │ ├── checkoutservice.yaml
│ │ │ ├── currencyservice.yaml
│ │ │ ├── emailservice.yaml
│ │ │ ├── frontend.yaml
│ │ │ ├── kustomization.yaml
│ │ │ ├── namespace.yaml
│ │ │ ├── paymentservice.yaml
│ │ │ ├── productcatalogservice.yaml
│ │ │ ├── recommendationservice.yaml
│ │ │ ├── redis.yaml
│ │ │ └── shippingservice.yaml
│ │ ├── dev/
│ │ │ └── kustomization.yaml
│ │ ├── kustomization.yaml
│ │ ├── prod/
│ │ │ └── kustomization.yaml
│ │ └── staging/
│ │ └── kustomization.yaml
│ ├── release-scripts/
│ │ ├── README.md
│ │ ├── license_header.txt
│ │ ├── make-cnb-docker-images.sh
│ │ ├── make-docker-images.sh
│ │ ├── make-release-artifacts.sh
│ │ └── make-release.sh
│ ├── src/
│ │ ├── .gitignore
│ │ ├── cartservice/
│ │ │ ├── .gitignore
│ │ │ ├── cartservice.sln
│ │ │ ├── src/
│ │ │ │ ├── .dockerignore
│ │ │ │ ├── Dockerfile
│ │ │ │ ├── Dockerfile.debug
│ │ │ │ ├── Program.cs
│ │ │ │ ├── Startup.cs
│ │ │ │ ├── appsettings.json
│ │ │ │ ├── cartservice.csproj
│ │ │ │ ├── cartstore/
│ │ │ │ │ ├── ICartStore.cs
│ │ │ │ │ └── RedisCartStore.cs
│ │ │ │ ├── protos/
│ │ │ │ │ └── Cart.proto
│ │ │ │ └── services/
│ │ │ │ ├── CartService.cs
│ │ │ │ └── HealthCheckService.cs
│ │ │ └── tests/
│ │ │ ├── .gitignore
│ │ │ ├── CartServiceTests.cs
│ │ │ └── cartservice.tests.csproj
│ │ ├── checkoutservice/
│ │ │ ├── .dockerignore
│ │ │ ├── Dockerfile
│ │ │ ├── README.md
│ │ │ ├── genproto/
│ │ │ │ └── demo.pb.go
│ │ │ ├── genproto.sh
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── main.go
│ │ │ └── money/
│ │ │ ├── money.go
│ │ │ └── money_test.go
│ │ ├── currencyservice/
│ │ │ ├── .dockerignore
│ │ │ ├── .gitignore
│ │ │ ├── Dockerfile
│ │ │ ├── client.js
│ │ │ ├── data/
│ │ │ │ └── currency_conversion.json
│ │ │ ├── genproto.sh
│ │ │ ├── package.json
│ │ │ ├── proto/
│ │ │ │ ├── demo.proto
│ │ │ │ └── grpc/
│ │ │ │ └── health/
│ │ │ │ └── v1/
│ │ │ │ └── health.proto
│ │ │ └── server.js
│ │ ├── emailservice/
│ │ │ ├── .python-version
│ │ │ ├── Dockerfile
│ │ │ ├── Procfile
│ │ │ ├── demo_pb2.py
│ │ │ ├── demo_pb2_grpc.py
│ │ │ ├── email_client.py
│ │ │ ├── email_server.py
│ │ │ ├── genproto.sh
│ │ │ ├── logger.py
│ │ │ ├── pytest.ini
│ │ │ ├── requirements.in
│ │ │ ├── requirements.txt
│ │ │ ├── templates/
│ │ │ │ └── confirmation.html
│ │ │ └── tests/
│ │ │ └── test_sample.py
│ │ ├── frontend/
│ │ │ ├── .dockerignore
│ │ │ ├── .gitkeep
│ │ │ ├── Dockerfile
│ │ │ ├── README.md
│ │ │ ├── deployment_details.go
│ │ │ ├── genproto/
│ │ │ │ └── demo.pb.go
│ │ │ ├── genproto.sh
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── handlers.go
│ │ │ ├── main.go
│ │ │ ├── middleware.go
│ │ │ ├── money/
│ │ │ │ ├── money.go
│ │ │ │ └── money_test.go
│ │ │ ├── rpc.go
│ │ │ ├── static/
│ │ │ │ ├── images/
│ │ │ │ │ └── credits.txt
│ │ │ │ └── styles/
│ │ │ │ ├── cart.css
│ │ │ │ ├── order.css
│ │ │ │ └── styles.css
│ │ │ └── templates/
│ │ │ ├── ad.html
│ │ │ ├── cart.html
│ │ │ ├── error.html
│ │ │ ├── footer.html
│ │ │ ├── header.html
│ │ │ ├── home.html
│ │ │ ├── order.html
│ │ │ ├── product.html
│ │ │ └── recommendations.html
│ │ ├── loadgenerator/
│ │ │ ├── Dockerfile
│ │ │ ├── loadgenerator.yaml
│ │ │ ├── locustfile.py
│ │ │ ├── requirements.in
│ │ │ └── requirements.txt
│ │ ├── paymentservice/
│ │ │ ├── .dockerignore
│ │ │ ├── .gitignore
│ │ │ ├── Dockerfile
│ │ │ ├── charge.js
│ │ │ ├── genproto.sh
│ │ │ ├── index.js
│ │ │ ├── package.json
│ │ │ ├── proto/
│ │ │ │ ├── demo.proto
│ │ │ │ └── grpc/
│ │ │ │ └── health/
│ │ │ │ └── v1/
│ │ │ │ └── health.proto
│ │ │ └── server.js
│ │ ├── productcatalogservice/
│ │ │ ├── .dockerignore
│ │ │ ├── Dockerfile
│ │ │ ├── README.md
│ │ │ ├── genproto/
│ │ │ │ └── demo.pb.go
│ │ │ ├── genproto.sh
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── products.json
│ │ │ ├── server.go
│ │ │ └── server_test.go
│ │ ├── recommendationservice/
│ │ │ ├── .gitignore
│ │ │ ├── .python-version
│ │ │ ├── Dockerfile
│ │ │ ├── Procfile
│ │ │ ├── client.py
│ │ │ ├── demo_pb2.py
│ │ │ ├── demo_pb2_grpc.py
│ │ │ ├── genproto.sh
│ │ │ ├── logger.py
│ │ │ ├── pytest.ini
│ │ │ ├── recommendation_server.py
│ │ │ ├── requirements.in
│ │ │ ├── requirements.txt
│ │ │ └── tests/
│ │ │ └── test_sample.py
│ │ └── shippingservice/
│ │ ├── .dockerignore
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── genproto/
│ │ │ └── demo.pb.go
│ │ ├── genproto.sh
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main.go
│ │ ├── quote.go
│ │ ├── shippingservice_test.go
│ │ └── tracker.go
│ └── tilt-resources/
│ ├── dev/
│ │ └── tilt_config.json
│ └── local/
│ └── tilt_config.json
└── podinfo-example/
├── README.md
└── kustomize/
├── kustomization.yaml
└── resources/
└── namespace.yaml
Showing preview only (203K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2221 symbols across 41 files)
FILE: microservices-demo/src/cartservice/src/Startup.cs
class Startup (line 16) | public class Startup
method Startup (line 18) | public Startup(IConfiguration configuration)
method ConfigureServices (line 27) | public void ConfigureServices(IServiceCollection services)
method Configure (line 49) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: microservices-demo/src/cartservice/src/cartstore/ICartStore.cs
type ICartStore (line 19) | public interface ICartStore
method AddItemAsync (line 21) | Task AddItemAsync(string userId, string productId, int quantity);
method EmptyCartAsync (line 22) | Task EmptyCartAsync(string userId);
method GetCartAsync (line 23) | Task<Hipstershop.Cart> GetCartAsync(string userId);
method Ping (line 24) | bool Ping();
FILE: microservices-demo/src/cartservice/src/cartstore/RedisCartStore.cs
class RedisCartStore (line 24) | public class RedisCartStore : ICartStore
method RedisCartStore (line 28) | public RedisCartStore(IDistributedCache cache)
method AddItemAsync (line 33) | public async Task AddItemAsync(string userId, string productId, int qu...
method EmptyCartAsync (line 68) | public async Task EmptyCartAsync(string userId)
method GetCartAsync (line 83) | public async Task<Hipstershop.Cart> GetCartAsync(string userId)
method Ping (line 106) | public bool Ping()
FILE: microservices-demo/src/cartservice/src/services/CartService.cs
class CartService (line 24) | public class CartService : Hipstershop.CartService.CartServiceBase
method CartService (line 29) | public CartService(ICartStore cartStore)
method AddItem (line 34) | public async override Task<Empty> AddItem(AddItemRequest request, Serv...
method GetCart (line 40) | public override Task<Cart> GetCart(GetCartRequest request, ServerCallC...
method EmptyCart (line 45) | public async override Task<Empty> EmptyCart(EmptyCartRequest request, ...
FILE: microservices-demo/src/cartservice/src/services/HealthCheckService.cs
class HealthCheckService (line 24) | internal class HealthCheckService : HealthBase
method HealthCheckService (line 28) | public HealthCheckService (ICartStore cartStore)
method Check (line 33) | public override Task<HealthCheckResponse> Check(HealthCheckRequest req...
FILE: microservices-demo/src/cartservice/tests/CartServiceTests.cs
class CartServiceTests (line 27) | public class CartServiceTests
method CartServiceTests (line 31) | public CartServiceTests()
method GetItem_NoAddItemBefore_EmptyCartReturned (line 41) | [Fact]
method AddItem_ItemExists_Updated (line 70) | [Fact]
method AddItem_New_Inserted (line 116) | [Fact]
FILE: microservices-demo/src/checkoutservice/genproto/demo.pb.go
constant _ (line 40) | _ = proto.ProtoPackageIsVersion2
type CartItem (line 42) | type CartItem struct
method Reset (line 50) | func (m *CartItem) Reset() { *m = CartItem{} }
method String (line 51) | func (m *CartItem) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 52) | func (*CartItem) ProtoMessage() {}
method Descriptor (line 53) | func (*CartItem) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 57) | func (m *CartItem) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 60) | func (m *CartItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, ...
method XXX_Merge (line 63) | func (m *CartItem) XXX_Merge(src proto.Message) {
method XXX_Size (line 66) | func (m *CartItem) XXX_Size() int {
method XXX_DiscardUnknown (line 69) | func (m *CartItem) XXX_DiscardUnknown() {
method GetProductId (line 75) | func (m *CartItem) GetProductId() string {
method GetQuantity (line 82) | func (m *CartItem) GetQuantity() int32 {
type AddItemRequest (line 89) | type AddItemRequest struct
method Reset (line 97) | func (m *AddItemRequest) Reset() { *m = AddItemRequest{} }
method String (line 98) | func (m *AddItemRequest) String() string { return proto.CompactTextStr...
method ProtoMessage (line 99) | func (*AddItemRequest) ProtoMessage() {}
method Descriptor (line 100) | func (*AddItemRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 104) | func (m *AddItemRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 107) | func (m *AddItemRequest) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 110) | func (m *AddItemRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 113) | func (m *AddItemRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 116) | func (m *AddItemRequest) XXX_DiscardUnknown() {
method GetUserId (line 122) | func (m *AddItemRequest) GetUserId() string {
method GetItem (line 129) | func (m *AddItemRequest) GetItem() *CartItem {
type EmptyCartRequest (line 136) | type EmptyCartRequest struct
method Reset (line 143) | func (m *EmptyCartRequest) Reset() { *m = EmptyCartRequest{} }
method String (line 144) | func (m *EmptyCartRequest) String() string { return proto.CompactTextS...
method ProtoMessage (line 145) | func (*EmptyCartRequest) ProtoMessage() {}
method Descriptor (line 146) | func (*EmptyCartRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 150) | func (m *EmptyCartRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 153) | func (m *EmptyCartRequest) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 156) | func (m *EmptyCartRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 159) | func (m *EmptyCartRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 162) | func (m *EmptyCartRequest) XXX_DiscardUnknown() {
method GetUserId (line 168) | func (m *EmptyCartRequest) GetUserId() string {
type GetCartRequest (line 175) | type GetCartRequest struct
method Reset (line 182) | func (m *GetCartRequest) Reset() { *m = GetCartRequest{} }
method String (line 183) | func (m *GetCartRequest) String() string { return proto.CompactTextStr...
method ProtoMessage (line 184) | func (*GetCartRequest) ProtoMessage() {}
method Descriptor (line 185) | func (*GetCartRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 189) | func (m *GetCartRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 192) | func (m *GetCartRequest) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 195) | func (m *GetCartRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 198) | func (m *GetCartRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 201) | func (m *GetCartRequest) XXX_DiscardUnknown() {
method GetUserId (line 207) | func (m *GetCartRequest) GetUserId() string {
type Cart (line 214) | type Cart struct
method Reset (line 222) | func (m *Cart) Reset() { *m = Cart{} }
method String (line 223) | func (m *Cart) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 224) | func (*Cart) ProtoMessage() {}
method Descriptor (line 225) | func (*Cart) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 229) | func (m *Cart) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 232) | func (m *Cart) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro...
method XXX_Merge (line 235) | func (m *Cart) XXX_Merge(src proto.Message) {
method XXX_Size (line 238) | func (m *Cart) XXX_Size() int {
method XXX_DiscardUnknown (line 241) | func (m *Cart) XXX_DiscardUnknown() {
method GetUserId (line 247) | func (m *Cart) GetUserId() string {
method GetItems (line 254) | func (m *Cart) GetItems() []*CartItem {
type Empty (line 261) | type Empty struct
method Reset (line 267) | func (m *Empty) Reset() { *m = Empty{} }
method String (line 268) | func (m *Empty) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 269) | func (*Empty) ProtoMessage() {}
method Descriptor (line 270) | func (*Empty) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 274) | func (m *Empty) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 277) | func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, err...
method XXX_Merge (line 280) | func (m *Empty) XXX_Merge(src proto.Message) {
method XXX_Size (line 283) | func (m *Empty) XXX_Size() int {
method XXX_DiscardUnknown (line 286) | func (m *Empty) XXX_DiscardUnknown() {
type ListRecommendationsRequest (line 292) | type ListRecommendationsRequest struct
method Reset (line 300) | func (m *ListRecommendationsRequest) Reset() { *m = ListRecomm...
method String (line 301) | func (m *ListRecommendationsRequest) String() string { return proto.Co...
method ProtoMessage (line 302) | func (*ListRecommendationsRequest) ProtoMessage() {}
method Descriptor (line 303) | func (*ListRecommendationsRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 307) | func (m *ListRecommendationsRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 310) | func (m *ListRecommendationsRequest) XXX_Marshal(b []byte, determinist...
method XXX_Merge (line 313) | func (m *ListRecommendationsRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 316) | func (m *ListRecommendationsRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 319) | func (m *ListRecommendationsRequest) XXX_DiscardUnknown() {
method GetUserId (line 325) | func (m *ListRecommendationsRequest) GetUserId() string {
method GetProductIds (line 332) | func (m *ListRecommendationsRequest) GetProductIds() []string {
type ListRecommendationsResponse (line 339) | type ListRecommendationsResponse struct
method Reset (line 346) | func (m *ListRecommendationsResponse) Reset() { *m = ListRecom...
method String (line 347) | func (m *ListRecommendationsResponse) String() string { return proto.C...
method ProtoMessage (line 348) | func (*ListRecommendationsResponse) ProtoMessage() {}
method Descriptor (line 349) | func (*ListRecommendationsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 353) | func (m *ListRecommendationsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 356) | func (m *ListRecommendationsResponse) XXX_Marshal(b []byte, determinis...
method XXX_Merge (line 359) | func (m *ListRecommendationsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 362) | func (m *ListRecommendationsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 365) | func (m *ListRecommendationsResponse) XXX_DiscardUnknown() {
method GetProductIds (line 371) | func (m *ListRecommendationsResponse) GetProductIds() []string {
type Product (line 378) | type Product struct
method Reset (line 392) | func (m *Product) Reset() { *m = Product{} }
method String (line 393) | func (m *Product) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 394) | func (*Product) ProtoMessage() {}
method Descriptor (line 395) | func (*Product) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 399) | func (m *Product) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 402) | func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, e...
method XXX_Merge (line 405) | func (m *Product) XXX_Merge(src proto.Message) {
method XXX_Size (line 408) | func (m *Product) XXX_Size() int {
method XXX_DiscardUnknown (line 411) | func (m *Product) XXX_DiscardUnknown() {
method GetId (line 417) | func (m *Product) GetId() string {
method GetName (line 424) | func (m *Product) GetName() string {
method GetDescription (line 431) | func (m *Product) GetDescription() string {
method GetPicture (line 438) | func (m *Product) GetPicture() string {
method GetPriceUsd (line 445) | func (m *Product) GetPriceUsd() *Money {
method GetCategories (line 452) | func (m *Product) GetCategories() []string {
type ListProductsResponse (line 459) | type ListProductsResponse struct
method Reset (line 466) | func (m *ListProductsResponse) Reset() { *m = ListProductsResp...
method String (line 467) | func (m *ListProductsResponse) String() string { return proto.CompactT...
method ProtoMessage (line 468) | func (*ListProductsResponse) ProtoMessage() {}
method Descriptor (line 469) | func (*ListProductsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 473) | func (m *ListProductsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 476) | func (m *ListProductsResponse) XXX_Marshal(b []byte, deterministic boo...
method XXX_Merge (line 479) | func (m *ListProductsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 482) | func (m *ListProductsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 485) | func (m *ListProductsResponse) XXX_DiscardUnknown() {
method GetProducts (line 491) | func (m *ListProductsResponse) GetProducts() []*Product {
type GetProductRequest (line 498) | type GetProductRequest struct
method Reset (line 505) | func (m *GetProductRequest) Reset() { *m = GetProductRequest{} }
method String (line 506) | func (m *GetProductRequest) String() string { return proto.CompactText...
method ProtoMessage (line 507) | func (*GetProductRequest) ProtoMessage() {}
method Descriptor (line 508) | func (*GetProductRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 512) | func (m *GetProductRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 515) | func (m *GetProductRequest) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 518) | func (m *GetProductRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 521) | func (m *GetProductRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 524) | func (m *GetProductRequest) XXX_DiscardUnknown() {
method GetId (line 530) | func (m *GetProductRequest) GetId() string {
type SearchProductsRequest (line 537) | type SearchProductsRequest struct
method Reset (line 544) | func (m *SearchProductsRequest) Reset() { *m = SearchProductsR...
method String (line 545) | func (m *SearchProductsRequest) String() string { return proto.Compact...
method ProtoMessage (line 546) | func (*SearchProductsRequest) ProtoMessage() {}
method Descriptor (line 547) | func (*SearchProductsRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 551) | func (m *SearchProductsRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 554) | func (m *SearchProductsRequest) XXX_Marshal(b []byte, deterministic bo...
method XXX_Merge (line 557) | func (m *SearchProductsRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 560) | func (m *SearchProductsRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 563) | func (m *SearchProductsRequest) XXX_DiscardUnknown() {
method GetQuery (line 569) | func (m *SearchProductsRequest) GetQuery() string {
type SearchProductsResponse (line 576) | type SearchProductsResponse struct
method Reset (line 583) | func (m *SearchProductsResponse) Reset() { *m = SearchProducts...
method String (line 584) | func (m *SearchProductsResponse) String() string { return proto.Compac...
method ProtoMessage (line 585) | func (*SearchProductsResponse) ProtoMessage() {}
method Descriptor (line 586) | func (*SearchProductsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 590) | func (m *SearchProductsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 593) | func (m *SearchProductsResponse) XXX_Marshal(b []byte, deterministic b...
method XXX_Merge (line 596) | func (m *SearchProductsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 599) | func (m *SearchProductsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 602) | func (m *SearchProductsResponse) XXX_DiscardUnknown() {
method GetResults (line 608) | func (m *SearchProductsResponse) GetResults() []*Product {
type GetQuoteRequest (line 615) | type GetQuoteRequest struct
method Reset (line 623) | func (m *GetQuoteRequest) Reset() { *m = GetQuoteRequest{} }
method String (line 624) | func (m *GetQuoteRequest) String() string { return proto.CompactTextSt...
method ProtoMessage (line 625) | func (*GetQuoteRequest) ProtoMessage() {}
method Descriptor (line 626) | func (*GetQuoteRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 630) | func (m *GetQuoteRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 633) | func (m *GetQuoteRequest) XXX_Marshal(b []byte, deterministic bool) ([...
method XXX_Merge (line 636) | func (m *GetQuoteRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 639) | func (m *GetQuoteRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 642) | func (m *GetQuoteRequest) XXX_DiscardUnknown() {
method GetAddress (line 648) | func (m *GetQuoteRequest) GetAddress() *Address {
method GetItems (line 655) | func (m *GetQuoteRequest) GetItems() []*CartItem {
type GetQuoteResponse (line 662) | type GetQuoteResponse struct
method Reset (line 669) | func (m *GetQuoteResponse) Reset() { *m = GetQuoteResponse{} }
method String (line 670) | func (m *GetQuoteResponse) String() string { return proto.CompactTextS...
method ProtoMessage (line 671) | func (*GetQuoteResponse) ProtoMessage() {}
method Descriptor (line 672) | func (*GetQuoteResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 676) | func (m *GetQuoteResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 679) | func (m *GetQuoteResponse) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 682) | func (m *GetQuoteResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 685) | func (m *GetQuoteResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 688) | func (m *GetQuoteResponse) XXX_DiscardUnknown() {
method GetCostUsd (line 694) | func (m *GetQuoteResponse) GetCostUsd() *Money {
type ShipOrderRequest (line 701) | type ShipOrderRequest struct
method Reset (line 709) | func (m *ShipOrderRequest) Reset() { *m = ShipOrderRequest{} }
method String (line 710) | func (m *ShipOrderRequest) String() string { return proto.CompactTextS...
method ProtoMessage (line 711) | func (*ShipOrderRequest) ProtoMessage() {}
method Descriptor (line 712) | func (*ShipOrderRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 716) | func (m *ShipOrderRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 719) | func (m *ShipOrderRequest) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 722) | func (m *ShipOrderRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 725) | func (m *ShipOrderRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 728) | func (m *ShipOrderRequest) XXX_DiscardUnknown() {
method GetAddress (line 734) | func (m *ShipOrderRequest) GetAddress() *Address {
method GetItems (line 741) | func (m *ShipOrderRequest) GetItems() []*CartItem {
type ShipOrderResponse (line 748) | type ShipOrderResponse struct
method Reset (line 755) | func (m *ShipOrderResponse) Reset() { *m = ShipOrderResponse{} }
method String (line 756) | func (m *ShipOrderResponse) String() string { return proto.CompactText...
method ProtoMessage (line 757) | func (*ShipOrderResponse) ProtoMessage() {}
method Descriptor (line 758) | func (*ShipOrderResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 762) | func (m *ShipOrderResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 765) | func (m *ShipOrderResponse) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 768) | func (m *ShipOrderResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 771) | func (m *ShipOrderResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 774) | func (m *ShipOrderResponse) XXX_DiscardUnknown() {
method GetTrackingId (line 780) | func (m *ShipOrderResponse) GetTrackingId() string {
type Address (line 787) | type Address struct
method Reset (line 798) | func (m *Address) Reset() { *m = Address{} }
method String (line 799) | func (m *Address) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 800) | func (*Address) ProtoMessage() {}
method Descriptor (line 801) | func (*Address) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 805) | func (m *Address) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 808) | func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, e...
method XXX_Merge (line 811) | func (m *Address) XXX_Merge(src proto.Message) {
method XXX_Size (line 814) | func (m *Address) XXX_Size() int {
method XXX_DiscardUnknown (line 817) | func (m *Address) XXX_DiscardUnknown() {
method GetStreetAddress (line 823) | func (m *Address) GetStreetAddress() string {
method GetCity (line 830) | func (m *Address) GetCity() string {
method GetState (line 837) | func (m *Address) GetState() string {
method GetCountry (line 844) | func (m *Address) GetCountry() string {
method GetZipCode (line 851) | func (m *Address) GetZipCode() int32 {
type Money (line 859) | type Money struct
method Reset (line 877) | func (m *Money) Reset() { *m = Money{} }
method String (line 878) | func (m *Money) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 879) | func (*Money) ProtoMessage() {}
method Descriptor (line 880) | func (*Money) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 884) | func (m *Money) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 887) | func (m *Money) XXX_Marshal(b []byte, deterministic bool) ([]byte, err...
method XXX_Merge (line 890) | func (m *Money) XXX_Merge(src proto.Message) {
method XXX_Size (line 893) | func (m *Money) XXX_Size() int {
method XXX_DiscardUnknown (line 896) | func (m *Money) XXX_DiscardUnknown() {
method GetCurrencyCode (line 902) | func (m *Money) GetCurrencyCode() string {
method GetUnits (line 909) | func (m *Money) GetUnits() int64 {
method GetNanos (line 916) | func (m *Money) GetNanos() int32 {
type GetSupportedCurrenciesResponse (line 923) | type GetSupportedCurrenciesResponse struct
method Reset (line 931) | func (m *GetSupportedCurrenciesResponse) Reset() { *m = GetSup...
method String (line 932) | func (m *GetSupportedCurrenciesResponse) String() string { return prot...
method ProtoMessage (line 933) | func (*GetSupportedCurrenciesResponse) ProtoMessage() {}
method Descriptor (line 934) | func (*GetSupportedCurrenciesResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 938) | func (m *GetSupportedCurrenciesResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 941) | func (m *GetSupportedCurrenciesResponse) XXX_Marshal(b []byte, determi...
method XXX_Merge (line 944) | func (m *GetSupportedCurrenciesResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 947) | func (m *GetSupportedCurrenciesResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 950) | func (m *GetSupportedCurrenciesResponse) XXX_DiscardUnknown() {
method GetCurrencyCodes (line 956) | func (m *GetSupportedCurrenciesResponse) GetCurrencyCodes() []string {
type CurrencyConversionRequest (line 963) | type CurrencyConversionRequest struct
method Reset (line 972) | func (m *CurrencyConversionRequest) Reset() { *m = CurrencyCon...
method String (line 973) | func (m *CurrencyConversionRequest) String() string { return proto.Com...
method ProtoMessage (line 974) | func (*CurrencyConversionRequest) ProtoMessage() {}
method Descriptor (line 975) | func (*CurrencyConversionRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 979) | func (m *CurrencyConversionRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 982) | func (m *CurrencyConversionRequest) XXX_Marshal(b []byte, deterministi...
method XXX_Merge (line 985) | func (m *CurrencyConversionRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 988) | func (m *CurrencyConversionRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 991) | func (m *CurrencyConversionRequest) XXX_DiscardUnknown() {
method GetFrom (line 997) | func (m *CurrencyConversionRequest) GetFrom() *Money {
method GetToCode (line 1004) | func (m *CurrencyConversionRequest) GetToCode() string {
type CreditCardInfo (line 1011) | type CreditCardInfo struct
method Reset (line 1021) | func (m *CreditCardInfo) Reset() { *m = CreditCardInfo{} }
method String (line 1022) | func (m *CreditCardInfo) String() string { return proto.CompactTextStr...
method ProtoMessage (line 1023) | func (*CreditCardInfo) ProtoMessage() {}
method Descriptor (line 1024) | func (*CreditCardInfo) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1028) | func (m *CreditCardInfo) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1031) | func (m *CreditCardInfo) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 1034) | func (m *CreditCardInfo) XXX_Merge(src proto.Message) {
method XXX_Size (line 1037) | func (m *CreditCardInfo) XXX_Size() int {
method XXX_DiscardUnknown (line 1040) | func (m *CreditCardInfo) XXX_DiscardUnknown() {
method GetCreditCardNumber (line 1046) | func (m *CreditCardInfo) GetCreditCardNumber() string {
method GetCreditCardCvv (line 1053) | func (m *CreditCardInfo) GetCreditCardCvv() int32 {
method GetCreditCardExpirationYear (line 1060) | func (m *CreditCardInfo) GetCreditCardExpirationYear() int32 {
method GetCreditCardExpirationMonth (line 1067) | func (m *CreditCardInfo) GetCreditCardExpirationMonth() int32 {
type ChargeRequest (line 1074) | type ChargeRequest struct
method Reset (line 1082) | func (m *ChargeRequest) Reset() { *m = ChargeRequest{} }
method String (line 1083) | func (m *ChargeRequest) String() string { return proto.CompactTextStri...
method ProtoMessage (line 1084) | func (*ChargeRequest) ProtoMessage() {}
method Descriptor (line 1085) | func (*ChargeRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1089) | func (m *ChargeRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1092) | func (m *ChargeRequest) XXX_Marshal(b []byte, deterministic bool) ([]b...
method XXX_Merge (line 1095) | func (m *ChargeRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1098) | func (m *ChargeRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1101) | func (m *ChargeRequest) XXX_DiscardUnknown() {
method GetAmount (line 1107) | func (m *ChargeRequest) GetAmount() *Money {
method GetCreditCard (line 1114) | func (m *ChargeRequest) GetCreditCard() *CreditCardInfo {
type ChargeResponse (line 1121) | type ChargeResponse struct
method Reset (line 1128) | func (m *ChargeResponse) Reset() { *m = ChargeResponse{} }
method String (line 1129) | func (m *ChargeResponse) String() string { return proto.CompactTextStr...
method ProtoMessage (line 1130) | func (*ChargeResponse) ProtoMessage() {}
method Descriptor (line 1131) | func (*ChargeResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1135) | func (m *ChargeResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1138) | func (m *ChargeResponse) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 1141) | func (m *ChargeResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1144) | func (m *ChargeResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1147) | func (m *ChargeResponse) XXX_DiscardUnknown() {
method GetTransactionId (line 1153) | func (m *ChargeResponse) GetTransactionId() string {
type OrderItem (line 1160) | type OrderItem struct
method Reset (line 1168) | func (m *OrderItem) Reset() { *m = OrderItem{} }
method String (line 1169) | func (m *OrderItem) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1170) | func (*OrderItem) ProtoMessage() {}
method Descriptor (line 1171) | func (*OrderItem) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1175) | func (m *OrderItem) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1178) | func (m *OrderItem) XXX_Marshal(b []byte, deterministic bool) ([]byte,...
method XXX_Merge (line 1181) | func (m *OrderItem) XXX_Merge(src proto.Message) {
method XXX_Size (line 1184) | func (m *OrderItem) XXX_Size() int {
method XXX_DiscardUnknown (line 1187) | func (m *OrderItem) XXX_DiscardUnknown() {
method GetItem (line 1193) | func (m *OrderItem) GetItem() *CartItem {
method GetCost (line 1200) | func (m *OrderItem) GetCost() *Money {
type OrderResult (line 1207) | type OrderResult struct
method Reset (line 1218) | func (m *OrderResult) Reset() { *m = OrderResult{} }
method String (line 1219) | func (m *OrderResult) String() string { return proto.CompactTextString...
method ProtoMessage (line 1220) | func (*OrderResult) ProtoMessage() {}
method Descriptor (line 1221) | func (*OrderResult) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1225) | func (m *OrderResult) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1228) | func (m *OrderResult) XXX_Marshal(b []byte, deterministic bool) ([]byt...
method XXX_Merge (line 1231) | func (m *OrderResult) XXX_Merge(src proto.Message) {
method XXX_Size (line 1234) | func (m *OrderResult) XXX_Size() int {
method XXX_DiscardUnknown (line 1237) | func (m *OrderResult) XXX_DiscardUnknown() {
method GetOrderId (line 1243) | func (m *OrderResult) GetOrderId() string {
method GetShippingTrackingId (line 1250) | func (m *OrderResult) GetShippingTrackingId() string {
method GetShippingCost (line 1257) | func (m *OrderResult) GetShippingCost() *Money {
method GetShippingAddress (line 1264) | func (m *OrderResult) GetShippingAddress() *Address {
method GetItems (line 1271) | func (m *OrderResult) GetItems() []*OrderItem {
type SendOrderConfirmationRequest (line 1278) | type SendOrderConfirmationRequest struct
method Reset (line 1286) | func (m *SendOrderConfirmationRequest) Reset() { *m = SendOrde...
method String (line 1287) | func (m *SendOrderConfirmationRequest) String() string { return proto....
method ProtoMessage (line 1288) | func (*SendOrderConfirmationRequest) ProtoMessage() {}
method Descriptor (line 1289) | func (*SendOrderConfirmationRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1293) | func (m *SendOrderConfirmationRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1296) | func (m *SendOrderConfirmationRequest) XXX_Marshal(b []byte, determini...
method XXX_Merge (line 1299) | func (m *SendOrderConfirmationRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1302) | func (m *SendOrderConfirmationRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1305) | func (m *SendOrderConfirmationRequest) XXX_DiscardUnknown() {
method GetEmail (line 1311) | func (m *SendOrderConfirmationRequest) GetEmail() string {
method GetOrder (line 1318) | func (m *SendOrderConfirmationRequest) GetOrder() *OrderResult {
type PlaceOrderRequest (line 1325) | type PlaceOrderRequest struct
method Reset (line 1336) | func (m *PlaceOrderRequest) Reset() { *m = PlaceOrderRequest{} }
method String (line 1337) | func (m *PlaceOrderRequest) String() string { return proto.CompactText...
method ProtoMessage (line 1338) | func (*PlaceOrderRequest) ProtoMessage() {}
method Descriptor (line 1339) | func (*PlaceOrderRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1343) | func (m *PlaceOrderRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1346) | func (m *PlaceOrderRequest) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 1349) | func (m *PlaceOrderRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1352) | func (m *PlaceOrderRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1355) | func (m *PlaceOrderRequest) XXX_DiscardUnknown() {
method GetUserId (line 1361) | func (m *PlaceOrderRequest) GetUserId() string {
method GetUserCurrency (line 1368) | func (m *PlaceOrderRequest) GetUserCurrency() string {
method GetAddress (line 1375) | func (m *PlaceOrderRequest) GetAddress() *Address {
method GetEmail (line 1382) | func (m *PlaceOrderRequest) GetEmail() string {
method GetCreditCard (line 1389) | func (m *PlaceOrderRequest) GetCreditCard() *CreditCardInfo {
type PlaceOrderResponse (line 1396) | type PlaceOrderResponse struct
method Reset (line 1403) | func (m *PlaceOrderResponse) Reset() { *m = PlaceOrderResponse...
method String (line 1404) | func (m *PlaceOrderResponse) String() string { return proto.CompactTex...
method ProtoMessage (line 1405) | func (*PlaceOrderResponse) ProtoMessage() {}
method Descriptor (line 1406) | func (*PlaceOrderResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1410) | func (m *PlaceOrderResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1413) | func (m *PlaceOrderResponse) XXX_Marshal(b []byte, deterministic bool)...
method XXX_Merge (line 1416) | func (m *PlaceOrderResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1419) | func (m *PlaceOrderResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1422) | func (m *PlaceOrderResponse) XXX_DiscardUnknown() {
method GetOrder (line 1428) | func (m *PlaceOrderResponse) GetOrder() *OrderResult {
type AdRequest (line 1435) | type AdRequest struct
method Reset (line 1443) | func (m *AdRequest) Reset() { *m = AdRequest{} }
method String (line 1444) | func (m *AdRequest) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1445) | func (*AdRequest) ProtoMessage() {}
method Descriptor (line 1446) | func (*AdRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1450) | func (m *AdRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1453) | func (m *AdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte,...
method XXX_Merge (line 1456) | func (m *AdRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1459) | func (m *AdRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1462) | func (m *AdRequest) XXX_DiscardUnknown() {
method GetContextKeys (line 1468) | func (m *AdRequest) GetContextKeys() []string {
type AdResponse (line 1475) | type AdResponse struct
method Reset (line 1482) | func (m *AdResponse) Reset() { *m = AdResponse{} }
method String (line 1483) | func (m *AdResponse) String() string { return proto.CompactTextString(...
method ProtoMessage (line 1484) | func (*AdResponse) ProtoMessage() {}
method Descriptor (line 1485) | func (*AdResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1489) | func (m *AdResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1492) | func (m *AdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte...
method XXX_Merge (line 1495) | func (m *AdResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1498) | func (m *AdResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1501) | func (m *AdResponse) XXX_DiscardUnknown() {
method GetAds (line 1507) | func (m *AdResponse) GetAds() []*Ad {
type Ad (line 1514) | type Ad struct
method Reset (line 1524) | func (m *Ad) Reset() { *m = Ad{} }
method String (line 1525) | func (m *Ad) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1526) | func (*Ad) ProtoMessage() {}
method Descriptor (line 1527) | func (*Ad) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1531) | func (m *Ad) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1534) | func (m *Ad) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
method XXX_Merge (line 1537) | func (m *Ad) XXX_Merge(src proto.Message) {
method XXX_Size (line 1540) | func (m *Ad) XXX_Size() int {
method XXX_DiscardUnknown (line 1543) | func (m *Ad) XXX_DiscardUnknown() {
method GetRedirectUrl (line 1549) | func (m *Ad) GetRedirectUrl() string {
method GetText (line 1556) | func (m *Ad) GetText() string {
function init (line 1563) | func init() {
constant _ (line 1604) | _ = grpc.SupportPackageIsVersion4
type CartServiceClient (line 1609) | type CartServiceClient interface
type cartServiceClient (line 1615) | type cartServiceClient struct
method AddItem (line 1623) | func (c *cartServiceClient) AddItem(ctx context.Context, in *AddItemRe...
method GetCart (line 1632) | func (c *cartServiceClient) GetCart(ctx context.Context, in *GetCartRe...
method EmptyCart (line 1641) | func (c *cartServiceClient) EmptyCart(ctx context.Context, in *EmptyCa...
function NewCartServiceClient (line 1619) | func NewCartServiceClient(cc *grpc.ClientConn) CartServiceClient {
type CartServiceServer (line 1651) | type CartServiceServer interface
function RegisterCartServiceServer (line 1657) | func RegisterCartServiceServer(s *grpc.Server, srv CartServiceServer) {
function _CartService_AddItem_Handler (line 1661) | func _CartService_AddItem_Handler(srv interface{}, ctx context.Context, ...
function _CartService_GetCart_Handler (line 1679) | func _CartService_GetCart_Handler(srv interface{}, ctx context.Context, ...
function _CartService_EmptyCart_Handler (line 1697) | func _CartService_EmptyCart_Handler(srv interface{}, ctx context.Context...
type RecommendationServiceClient (line 1739) | type RecommendationServiceClient interface
type recommendationServiceClient (line 1743) | type recommendationServiceClient struct
method ListRecommendations (line 1751) | func (c *recommendationServiceClient) ListRecommendations(ctx context....
function NewRecommendationServiceClient (line 1747) | func NewRecommendationServiceClient(cc *grpc.ClientConn) RecommendationS...
type RecommendationServiceServer (line 1761) | type RecommendationServiceServer interface
function RegisterRecommendationServiceServer (line 1765) | func RegisterRecommendationServiceServer(s *grpc.Server, srv Recommendat...
function _RecommendationService_ListRecommendations_Handler (line 1769) | func _RecommendationService_ListRecommendations_Handler(srv interface{},...
type ProductCatalogServiceClient (line 1803) | type ProductCatalogServiceClient interface
type productCatalogServiceClient (line 1809) | type productCatalogServiceClient struct
method ListProducts (line 1817) | func (c *productCatalogServiceClient) ListProducts(ctx context.Context...
method GetProduct (line 1826) | func (c *productCatalogServiceClient) GetProduct(ctx context.Context, ...
method SearchProducts (line 1835) | func (c *productCatalogServiceClient) SearchProducts(ctx context.Conte...
function NewProductCatalogServiceClient (line 1813) | func NewProductCatalogServiceClient(cc *grpc.ClientConn) ProductCatalogS...
type ProductCatalogServiceServer (line 1845) | type ProductCatalogServiceServer interface
function RegisterProductCatalogServiceServer (line 1851) | func RegisterProductCatalogServiceServer(s *grpc.Server, srv ProductCata...
function _ProductCatalogService_ListProducts_Handler (line 1855) | func _ProductCatalogService_ListProducts_Handler(srv interface{}, ctx co...
function _ProductCatalogService_GetProduct_Handler (line 1873) | func _ProductCatalogService_GetProduct_Handler(srv interface{}, ctx cont...
function _ProductCatalogService_SearchProducts_Handler (line 1891) | func _ProductCatalogService_SearchProducts_Handler(srv interface{}, ctx ...
type ShippingServiceClient (line 1933) | type ShippingServiceClient interface
type shippingServiceClient (line 1938) | type shippingServiceClient struct
method GetQuote (line 1946) | func (c *shippingServiceClient) GetQuote(ctx context.Context, in *GetQ...
method ShipOrder (line 1955) | func (c *shippingServiceClient) ShipOrder(ctx context.Context, in *Shi...
function NewShippingServiceClient (line 1942) | func NewShippingServiceClient(cc *grpc.ClientConn) ShippingServiceClient {
type ShippingServiceServer (line 1965) | type ShippingServiceServer interface
function RegisterShippingServiceServer (line 1970) | func RegisterShippingServiceServer(s *grpc.Server, srv ShippingServiceSe...
function _ShippingService_GetQuote_Handler (line 1974) | func _ShippingService_GetQuote_Handler(srv interface{}, ctx context.Cont...
function _ShippingService_ShipOrder_Handler (line 1992) | func _ShippingService_ShipOrder_Handler(srv interface{}, ctx context.Con...
type CurrencyServiceClient (line 2030) | type CurrencyServiceClient interface
type currencyServiceClient (line 2035) | type currencyServiceClient struct
method GetSupportedCurrencies (line 2043) | func (c *currencyServiceClient) GetSupportedCurrencies(ctx context.Con...
method Convert (line 2052) | func (c *currencyServiceClient) Convert(ctx context.Context, in *Curre...
function NewCurrencyServiceClient (line 2039) | func NewCurrencyServiceClient(cc *grpc.ClientConn) CurrencyServiceClient {
type CurrencyServiceServer (line 2062) | type CurrencyServiceServer interface
function RegisterCurrencyServiceServer (line 2067) | func RegisterCurrencyServiceServer(s *grpc.Server, srv CurrencyServiceSe...
function _CurrencyService_GetSupportedCurrencies_Handler (line 2071) | func _CurrencyService_GetSupportedCurrencies_Handler(srv interface{}, ct...
function _CurrencyService_Convert_Handler (line 2089) | func _CurrencyService_Convert_Handler(srv interface{}, ctx context.Conte...
type PaymentServiceClient (line 2127) | type PaymentServiceClient interface
type paymentServiceClient (line 2131) | type paymentServiceClient struct
method Charge (line 2139) | func (c *paymentServiceClient) Charge(ctx context.Context, in *ChargeR...
function NewPaymentServiceClient (line 2135) | func NewPaymentServiceClient(cc *grpc.ClientConn) PaymentServiceClient {
type PaymentServiceServer (line 2149) | type PaymentServiceServer interface
function RegisterPaymentServiceServer (line 2153) | func RegisterPaymentServiceServer(s *grpc.Server, srv PaymentServiceServ...
function _PaymentService_Charge_Handler (line 2157) | func _PaymentService_Charge_Handler(srv interface{}, ctx context.Context...
type EmailServiceClient (line 2191) | type EmailServiceClient interface
type emailServiceClient (line 2195) | type emailServiceClient struct
method SendOrderConfirmation (line 2203) | func (c *emailServiceClient) SendOrderConfirmation(ctx context.Context...
function NewEmailServiceClient (line 2199) | func NewEmailServiceClient(cc *grpc.ClientConn) EmailServiceClient {
type EmailServiceServer (line 2213) | type EmailServiceServer interface
function RegisterEmailServiceServer (line 2217) | func RegisterEmailServiceServer(s *grpc.Server, srv EmailServiceServer) {
function _EmailService_SendOrderConfirmation_Handler (line 2221) | func _EmailService_SendOrderConfirmation_Handler(srv interface{}, ctx co...
type CheckoutServiceClient (line 2255) | type CheckoutServiceClient interface
type checkoutServiceClient (line 2259) | type checkoutServiceClient struct
method PlaceOrder (line 2267) | func (c *checkoutServiceClient) PlaceOrder(ctx context.Context, in *Pl...
function NewCheckoutServiceClient (line 2263) | func NewCheckoutServiceClient(cc *grpc.ClientConn) CheckoutServiceClient {
type CheckoutServiceServer (line 2277) | type CheckoutServiceServer interface
function RegisterCheckoutServiceServer (line 2281) | func RegisterCheckoutServiceServer(s *grpc.Server, srv CheckoutServiceSe...
function _CheckoutService_PlaceOrder_Handler (line 2285) | func _CheckoutService_PlaceOrder_Handler(srv interface{}, ctx context.Co...
type AdServiceClient (line 2319) | type AdServiceClient interface
type adServiceClient (line 2323) | type adServiceClient struct
method GetAds (line 2331) | func (c *adServiceClient) GetAds(ctx context.Context, in *AdRequest, o...
function NewAdServiceClient (line 2327) | func NewAdServiceClient(cc *grpc.ClientConn) AdServiceClient {
type AdServiceServer (line 2341) | type AdServiceServer interface
function RegisterAdServiceServer (line 2345) | func RegisterAdServiceServer(s *grpc.Server, srv AdServiceServer) {
function _AdService_GetAds_Handler (line 2349) | func _AdService_GetAds_Handler(srv interface{}, ctx context.Context, dec...
function init (line 2380) | func init() { proto.RegisterFile("demo.proto", fileDescriptor_ca53982754...
FILE: microservices-demo/src/checkoutservice/main.go
constant listenPort (line 42) | listenPort = "5050"
constant usdCurrency (line 43) | usdCurrency = "USD"
function init (line 48) | func init() {
type checkoutService (line 62) | type checkoutService struct
method Check (line 210) | func (cs *checkoutService) Check(ctx context.Context, req *healthpb.He...
method Watch (line 214) | func (cs *checkoutService) Watch(req *healthpb.HealthCheckRequest, ws ...
method PlaceOrder (line 218) | func (cs *checkoutService) PlaceOrder(ctx context.Context, req *pb.Pla...
method prepareOrderItemsAndShippingQuoteFromCart (line 276) | func (cs *checkoutService) prepareOrderItemsAndShippingQuoteFromCart(c...
method quoteShipping (line 301) | func (cs *checkoutService) quoteShipping(ctx context.Context, address ...
method getUserCart (line 320) | func (cs *checkoutService) getUserCart(ctx context.Context, userID str...
method emptyUserCart (line 334) | func (cs *checkoutService) emptyUserCart(ctx context.Context, userID s...
method prepOrderItems (line 347) | func (cs *checkoutService) prepOrderItems(ctx context.Context, items [...
method convertCurrency (line 373) | func (cs *checkoutService) convertCurrency(ctx context.Context, from *...
method chargeCard (line 388) | func (cs *checkoutService) chargeCard(ctx context.Context, amount *pb....
method sendOrderConfirmation (line 404) | func (cs *checkoutService) sendOrderConfirmation(ctx context.Context, ...
method shipOrder (line 416) | func (cs *checkoutService) shipOrder(ctx context.Context, address *pb....
function main (line 71) | func main() {
function initJaegerTracing (line 121) | func initJaegerTracing() {
function initStats (line 143) | func initStats(exporter *stackdriver.Exporter) {
function initStackdriverTracing (line 153) | func initStackdriverTracing() {
function initTracing (line 175) | func initTracing() {
function initProfiling (line 180) | func initProfiling(service, version string) {
function mustMapEnv (line 202) | func mustMapEnv(target *string, envKey string) {
type orderPrep (line 270) | type orderPrep struct
FILE: microservices-demo/src/checkoutservice/money/money.go
constant nanosMin (line 24) | nanosMin = -999999999
constant nanosMax (line 25) | nanosMax = +999999999
constant nanosMod (line 26) | nanosMod = 1000000000
function IsValid (line 35) | func IsValid(m pb.Money) bool {
function signMatches (line 39) | func signMatches(m pb.Money) bool {
function validNanos (line 43) | func validNanos(nanos int32) bool { return nanosMin <= nanos && nanos <=...
function IsZero (line 46) | func IsZero(m pb.Money) bool { return m.GetUnits() == 0 && m.GetNanos() ...
function IsPositive (line 50) | func IsPositive(m pb.Money) bool {
function IsNegative (line 56) | func IsNegative(m pb.Money) bool {
function AreSameCurrency (line 62) | func AreSameCurrency(l, r pb.Money) bool {
function AreEquals (line 68) | func AreEquals(l, r pb.Money) bool {
function Negate (line 74) | func Negate(m pb.Money) pb.Money {
function Must (line 83) | func Must(v pb.Money, err error) pb.Money {
function Sum (line 93) | func Sum(l, r pb.Money) (pb.Money, error) {
function MultiplySlow (line 125) | func MultiplySlow(m pb.Money, n uint32) pb.Money {
FILE: microservices-demo/src/checkoutservice/money/money_test.go
function mmc (line 25) | func mmc(u int64, n int32, c string) pb.Money { return pb.Money{Units: u...
function mm (line 26) | func mm(u int64, n int32) pb.Money { return mmc(u, n, "") }
function TestIsValid (line 28) | func TestIsValid(t *testing.T) {
function TestIsZero (line 52) | func TestIsZero(t *testing.T) {
function TestIsPositive (line 73) | func TestIsPositive(t *testing.T) {
function TestIsNegative (line 94) | func TestIsNegative(t *testing.T) {
function TestAreSameCurrency (line 115) | func TestAreSameCurrency(t *testing.T) {
function TestAreEquals (line 140) | func TestAreEquals(t *testing.T) {
function TestNegate (line 165) | func TestNegate(t *testing.T) {
function TestMust_pass (line 185) | func TestMust_pass(t *testing.T) {
function TestMust_panic (line 192) | func TestMust_panic(t *testing.T) {
function TestSum (line 202) | func TestSum(t *testing.T) {
FILE: microservices-demo/src/currencyservice/client.js
constant PROTO_PATH (line 25) | const PROTO_PATH = path.join(__dirname, './proto/demo.proto');
constant PORT (line 26) | const PORT = 7000;
function _moneyToString (line 48) | function _moneyToString (m) {
FILE: microservices-demo/src/currencyservice/server.js
constant MAIN_PROTO_PATH (line 57) | const MAIN_PROTO_PATH = path.join(__dirname, './proto/demo.proto');
constant HEALTH_PROTO_PATH (line 58) | const HEALTH_PROTO_PATH = path.join(__dirname, './proto/grpc/health/v1/h...
constant PORT (line 60) | const PORT = process.env.PORT;
function _loadProto (line 75) | function _loadProto (path) {
function _getCurrencyData (line 93) | function _getCurrencyData (callback) {
function _carry (line 101) | function _carry (amount) {
function getSupportedCurrencies (line 112) | function getSupportedCurrencies (call, callback) {
function convert (line 122) | function convert (call, callback) {
function check (line 158) | function check (call, callback) {
function main (line 166) | function main () {
FILE: microservices-demo/src/emailservice/demo_pb2_grpc.py
class CartServiceStub (line 23) | class CartServiceStub(object):
method __init__ (line 28) | def __init__(self, channel):
class CartServiceServicer (line 51) | class CartServiceServicer(object):
method AddItem (line 56) | def AddItem(self, request, context):
method GetCart (line 63) | def GetCart(self, request, context):
method EmptyCart (line 70) | def EmptyCart(self, request, context):
function add_CartServiceServicer_to_server (line 78) | def add_CartServiceServicer_to_server(servicer, server):
class RecommendationServiceStub (line 101) | class RecommendationServiceStub(object):
method __init__ (line 106) | def __init__(self, channel):
class RecommendationServiceServicer (line 119) | class RecommendationServiceServicer(object):
method ListRecommendations (line 124) | def ListRecommendations(self, request, context):
function add_RecommendationServiceServicer_to_server (line 132) | def add_RecommendationServiceServicer_to_server(servicer, server):
class ProductCatalogServiceStub (line 145) | class ProductCatalogServiceStub(object):
method __init__ (line 150) | def __init__(self, channel):
class ProductCatalogServiceServicer (line 173) | class ProductCatalogServiceServicer(object):
method ListProducts (line 178) | def ListProducts(self, request, context):
method GetProduct (line 185) | def GetProduct(self, request, context):
method SearchProducts (line 192) | def SearchProducts(self, request, context):
function add_ProductCatalogServiceServicer_to_server (line 200) | def add_ProductCatalogServiceServicer_to_server(servicer, server):
class ShippingServiceStub (line 223) | class ShippingServiceStub(object):
method __init__ (line 228) | def __init__(self, channel):
class ShippingServiceServicer (line 246) | class ShippingServiceServicer(object):
method GetQuote (line 251) | def GetQuote(self, request, context):
method ShipOrder (line 258) | def ShipOrder(self, request, context):
function add_ShippingServiceServicer_to_server (line 266) | def add_ShippingServiceServicer_to_server(servicer, server):
class CurrencyServiceStub (line 284) | class CurrencyServiceStub(object):
method __init__ (line 289) | def __init__(self, channel):
class CurrencyServiceServicer (line 307) | class CurrencyServiceServicer(object):
method GetSupportedCurrencies (line 312) | def GetSupportedCurrencies(self, request, context):
method Convert (line 319) | def Convert(self, request, context):
function add_CurrencyServiceServicer_to_server (line 327) | def add_CurrencyServiceServicer_to_server(servicer, server):
class PaymentServiceStub (line 345) | class PaymentServiceStub(object):
method __init__ (line 350) | def __init__(self, channel):
class PaymentServiceServicer (line 363) | class PaymentServiceServicer(object):
method Charge (line 368) | def Charge(self, request, context):
function add_PaymentServiceServicer_to_server (line 376) | def add_PaymentServiceServicer_to_server(servicer, server):
class EmailServiceStub (line 389) | class EmailServiceStub(object):
method __init__ (line 394) | def __init__(self, channel):
class EmailServiceServicer (line 407) | class EmailServiceServicer(object):
method SendOrderConfirmation (line 412) | def SendOrderConfirmation(self, request, context):
function add_EmailServiceServicer_to_server (line 420) | def add_EmailServiceServicer_to_server(servicer, server):
class CheckoutServiceStub (line 433) | class CheckoutServiceStub(object):
method __init__ (line 438) | def __init__(self, channel):
class CheckoutServiceServicer (line 456) | class CheckoutServiceServicer(object):
method CreateOrder (line 461) | def CreateOrder(self, request, context):
method PlaceOrder (line 468) | def PlaceOrder(self, request, context):
function add_CheckoutServiceServicer_to_server (line 476) | def add_CheckoutServiceServicer_to_server(servicer, server):
FILE: microservices-demo/src/emailservice/email_client.py
function send_confirmation_email (line 36) | def send_confirmation_email(email, order):
FILE: microservices-demo/src/emailservice/email_server.py
class BaseEmailService (line 59) | class BaseEmailService(demo_pb2_grpc.EmailServiceServicer):
method Check (line 60) | def Check(self, request, context):
method Watch (line 64) | def Watch(self, request, context):
class EmailService (line 68) | class EmailService(BaseEmailService):
method __init__ (line 69) | def __init__(self):
method send_email (line 74) | def send_email(client, email_address, content):
method SendOrderConfirmation (line 93) | def SendOrderConfirmation(self, request, context):
class DummyEmailService (line 115) | class DummyEmailService(BaseEmailService):
method SendOrderConfirmation (line 116) | def SendOrderConfirmation(self, request, context):
class HealthCheck (line 120) | class HealthCheck():
method Check (line 121) | def Check(self, request, context):
function start (line 125) | def start(dummy_mode):
function initStackdriverProfiling (line 147) | def initStackdriverProfiling():
FILE: microservices-demo/src/emailservice/logger.py
class CustomJsonFormatter (line 23) | class CustomJsonFormatter(jsonlogger.JsonFormatter):
method add_fields (line 24) | def add_fields(self, log_record, record, message_dict):
function getJSONLogger (line 33) | def getJSONLogger(name):
FILE: microservices-demo/src/emailservice/tests/test_sample.py
function func (line 1) | def func(x):
function test_answer (line 5) | def test_answer():
FILE: microservices-demo/src/frontend/deployment_details.go
function init (line 15) | func init() {
function initializeLogger (line 22) | func initializeLogger() {
function loadDeploymentDetails (line 36) | func loadDeploymentDetails() {
FILE: microservices-demo/src/frontend/genproto/demo.pb.go
constant _ (line 40) | _ = proto.ProtoPackageIsVersion2
type CartItem (line 42) | type CartItem struct
method Reset (line 50) | func (m *CartItem) Reset() { *m = CartItem{} }
method String (line 51) | func (m *CartItem) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 52) | func (*CartItem) ProtoMessage() {}
method Descriptor (line 53) | func (*CartItem) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 57) | func (m *CartItem) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 60) | func (m *CartItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, ...
method XXX_Merge (line 63) | func (m *CartItem) XXX_Merge(src proto.Message) {
method XXX_Size (line 66) | func (m *CartItem) XXX_Size() int {
method XXX_DiscardUnknown (line 69) | func (m *CartItem) XXX_DiscardUnknown() {
method GetProductId (line 75) | func (m *CartItem) GetProductId() string {
method GetQuantity (line 82) | func (m *CartItem) GetQuantity() int32 {
type AddItemRequest (line 89) | type AddItemRequest struct
method Reset (line 97) | func (m *AddItemRequest) Reset() { *m = AddItemRequest{} }
method String (line 98) | func (m *AddItemRequest) String() string { return proto.CompactTextStr...
method ProtoMessage (line 99) | func (*AddItemRequest) ProtoMessage() {}
method Descriptor (line 100) | func (*AddItemRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 104) | func (m *AddItemRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 107) | func (m *AddItemRequest) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 110) | func (m *AddItemRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 113) | func (m *AddItemRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 116) | func (m *AddItemRequest) XXX_DiscardUnknown() {
method GetUserId (line 122) | func (m *AddItemRequest) GetUserId() string {
method GetItem (line 129) | func (m *AddItemRequest) GetItem() *CartItem {
type EmptyCartRequest (line 136) | type EmptyCartRequest struct
method Reset (line 143) | func (m *EmptyCartRequest) Reset() { *m = EmptyCartRequest{} }
method String (line 144) | func (m *EmptyCartRequest) String() string { return proto.CompactTextS...
method ProtoMessage (line 145) | func (*EmptyCartRequest) ProtoMessage() {}
method Descriptor (line 146) | func (*EmptyCartRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 150) | func (m *EmptyCartRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 153) | func (m *EmptyCartRequest) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 156) | func (m *EmptyCartRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 159) | func (m *EmptyCartRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 162) | func (m *EmptyCartRequest) XXX_DiscardUnknown() {
method GetUserId (line 168) | func (m *EmptyCartRequest) GetUserId() string {
type GetCartRequest (line 175) | type GetCartRequest struct
method Reset (line 182) | func (m *GetCartRequest) Reset() { *m = GetCartRequest{} }
method String (line 183) | func (m *GetCartRequest) String() string { return proto.CompactTextStr...
method ProtoMessage (line 184) | func (*GetCartRequest) ProtoMessage() {}
method Descriptor (line 185) | func (*GetCartRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 189) | func (m *GetCartRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 192) | func (m *GetCartRequest) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 195) | func (m *GetCartRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 198) | func (m *GetCartRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 201) | func (m *GetCartRequest) XXX_DiscardUnknown() {
method GetUserId (line 207) | func (m *GetCartRequest) GetUserId() string {
type Cart (line 214) | type Cart struct
method Reset (line 222) | func (m *Cart) Reset() { *m = Cart{} }
method String (line 223) | func (m *Cart) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 224) | func (*Cart) ProtoMessage() {}
method Descriptor (line 225) | func (*Cart) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 229) | func (m *Cart) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 232) | func (m *Cart) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro...
method XXX_Merge (line 235) | func (m *Cart) XXX_Merge(src proto.Message) {
method XXX_Size (line 238) | func (m *Cart) XXX_Size() int {
method XXX_DiscardUnknown (line 241) | func (m *Cart) XXX_DiscardUnknown() {
method GetUserId (line 247) | func (m *Cart) GetUserId() string {
method GetItems (line 254) | func (m *Cart) GetItems() []*CartItem {
type Empty (line 261) | type Empty struct
method Reset (line 267) | func (m *Empty) Reset() { *m = Empty{} }
method String (line 268) | func (m *Empty) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 269) | func (*Empty) ProtoMessage() {}
method Descriptor (line 270) | func (*Empty) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 274) | func (m *Empty) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 277) | func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, err...
method XXX_Merge (line 280) | func (m *Empty) XXX_Merge(src proto.Message) {
method XXX_Size (line 283) | func (m *Empty) XXX_Size() int {
method XXX_DiscardUnknown (line 286) | func (m *Empty) XXX_DiscardUnknown() {
type ListRecommendationsRequest (line 292) | type ListRecommendationsRequest struct
method Reset (line 300) | func (m *ListRecommendationsRequest) Reset() { *m = ListRecomm...
method String (line 301) | func (m *ListRecommendationsRequest) String() string { return proto.Co...
method ProtoMessage (line 302) | func (*ListRecommendationsRequest) ProtoMessage() {}
method Descriptor (line 303) | func (*ListRecommendationsRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 307) | func (m *ListRecommendationsRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 310) | func (m *ListRecommendationsRequest) XXX_Marshal(b []byte, determinist...
method XXX_Merge (line 313) | func (m *ListRecommendationsRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 316) | func (m *ListRecommendationsRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 319) | func (m *ListRecommendationsRequest) XXX_DiscardUnknown() {
method GetUserId (line 325) | func (m *ListRecommendationsRequest) GetUserId() string {
method GetProductIds (line 332) | func (m *ListRecommendationsRequest) GetProductIds() []string {
type ListRecommendationsResponse (line 339) | type ListRecommendationsResponse struct
method Reset (line 346) | func (m *ListRecommendationsResponse) Reset() { *m = ListRecom...
method String (line 347) | func (m *ListRecommendationsResponse) String() string { return proto.C...
method ProtoMessage (line 348) | func (*ListRecommendationsResponse) ProtoMessage() {}
method Descriptor (line 349) | func (*ListRecommendationsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 353) | func (m *ListRecommendationsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 356) | func (m *ListRecommendationsResponse) XXX_Marshal(b []byte, determinis...
method XXX_Merge (line 359) | func (m *ListRecommendationsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 362) | func (m *ListRecommendationsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 365) | func (m *ListRecommendationsResponse) XXX_DiscardUnknown() {
method GetProductIds (line 371) | func (m *ListRecommendationsResponse) GetProductIds() []string {
type Product (line 378) | type Product struct
method Reset (line 392) | func (m *Product) Reset() { *m = Product{} }
method String (line 393) | func (m *Product) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 394) | func (*Product) ProtoMessage() {}
method Descriptor (line 395) | func (*Product) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 399) | func (m *Product) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 402) | func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, e...
method XXX_Merge (line 405) | func (m *Product) XXX_Merge(src proto.Message) {
method XXX_Size (line 408) | func (m *Product) XXX_Size() int {
method XXX_DiscardUnknown (line 411) | func (m *Product) XXX_DiscardUnknown() {
method GetId (line 417) | func (m *Product) GetId() string {
method GetName (line 424) | func (m *Product) GetName() string {
method GetDescription (line 431) | func (m *Product) GetDescription() string {
method GetPicture (line 438) | func (m *Product) GetPicture() string {
method GetPriceUsd (line 445) | func (m *Product) GetPriceUsd() *Money {
method GetCategories (line 452) | func (m *Product) GetCategories() []string {
type ListProductsResponse (line 459) | type ListProductsResponse struct
method Reset (line 466) | func (m *ListProductsResponse) Reset() { *m = ListProductsResp...
method String (line 467) | func (m *ListProductsResponse) String() string { return proto.CompactT...
method ProtoMessage (line 468) | func (*ListProductsResponse) ProtoMessage() {}
method Descriptor (line 469) | func (*ListProductsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 473) | func (m *ListProductsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 476) | func (m *ListProductsResponse) XXX_Marshal(b []byte, deterministic boo...
method XXX_Merge (line 479) | func (m *ListProductsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 482) | func (m *ListProductsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 485) | func (m *ListProductsResponse) XXX_DiscardUnknown() {
method GetProducts (line 491) | func (m *ListProductsResponse) GetProducts() []*Product {
type GetProductRequest (line 498) | type GetProductRequest struct
method Reset (line 505) | func (m *GetProductRequest) Reset() { *m = GetProductRequest{} }
method String (line 506) | func (m *GetProductRequest) String() string { return proto.CompactText...
method ProtoMessage (line 507) | func (*GetProductRequest) ProtoMessage() {}
method Descriptor (line 508) | func (*GetProductRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 512) | func (m *GetProductRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 515) | func (m *GetProductRequest) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 518) | func (m *GetProductRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 521) | func (m *GetProductRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 524) | func (m *GetProductRequest) XXX_DiscardUnknown() {
method GetId (line 530) | func (m *GetProductRequest) GetId() string {
type SearchProductsRequest (line 537) | type SearchProductsRequest struct
method Reset (line 544) | func (m *SearchProductsRequest) Reset() { *m = SearchProductsR...
method String (line 545) | func (m *SearchProductsRequest) String() string { return proto.Compact...
method ProtoMessage (line 546) | func (*SearchProductsRequest) ProtoMessage() {}
method Descriptor (line 547) | func (*SearchProductsRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 551) | func (m *SearchProductsRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 554) | func (m *SearchProductsRequest) XXX_Marshal(b []byte, deterministic bo...
method XXX_Merge (line 557) | func (m *SearchProductsRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 560) | func (m *SearchProductsRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 563) | func (m *SearchProductsRequest) XXX_DiscardUnknown() {
method GetQuery (line 569) | func (m *SearchProductsRequest) GetQuery() string {
type SearchProductsResponse (line 576) | type SearchProductsResponse struct
method Reset (line 583) | func (m *SearchProductsResponse) Reset() { *m = SearchProducts...
method String (line 584) | func (m *SearchProductsResponse) String() string { return proto.Compac...
method ProtoMessage (line 585) | func (*SearchProductsResponse) ProtoMessage() {}
method Descriptor (line 586) | func (*SearchProductsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 590) | func (m *SearchProductsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 593) | func (m *SearchProductsResponse) XXX_Marshal(b []byte, deterministic b...
method XXX_Merge (line 596) | func (m *SearchProductsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 599) | func (m *SearchProductsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 602) | func (m *SearchProductsResponse) XXX_DiscardUnknown() {
method GetResults (line 608) | func (m *SearchProductsResponse) GetResults() []*Product {
type GetQuoteRequest (line 615) | type GetQuoteRequest struct
method Reset (line 623) | func (m *GetQuoteRequest) Reset() { *m = GetQuoteRequest{} }
method String (line 624) | func (m *GetQuoteRequest) String() string { return proto.CompactTextSt...
method ProtoMessage (line 625) | func (*GetQuoteRequest) ProtoMessage() {}
method Descriptor (line 626) | func (*GetQuoteRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 630) | func (m *GetQuoteRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 633) | func (m *GetQuoteRequest) XXX_Marshal(b []byte, deterministic bool) ([...
method XXX_Merge (line 636) | func (m *GetQuoteRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 639) | func (m *GetQuoteRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 642) | func (m *GetQuoteRequest) XXX_DiscardUnknown() {
method GetAddress (line 648) | func (m *GetQuoteRequest) GetAddress() *Address {
method GetItems (line 655) | func (m *GetQuoteRequest) GetItems() []*CartItem {
type GetQuoteResponse (line 662) | type GetQuoteResponse struct
method Reset (line 669) | func (m *GetQuoteResponse) Reset() { *m = GetQuoteResponse{} }
method String (line 670) | func (m *GetQuoteResponse) String() string { return proto.CompactTextS...
method ProtoMessage (line 671) | func (*GetQuoteResponse) ProtoMessage() {}
method Descriptor (line 672) | func (*GetQuoteResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 676) | func (m *GetQuoteResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 679) | func (m *GetQuoteResponse) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 682) | func (m *GetQuoteResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 685) | func (m *GetQuoteResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 688) | func (m *GetQuoteResponse) XXX_DiscardUnknown() {
method GetCostUsd (line 694) | func (m *GetQuoteResponse) GetCostUsd() *Money {
type ShipOrderRequest (line 701) | type ShipOrderRequest struct
method Reset (line 709) | func (m *ShipOrderRequest) Reset() { *m = ShipOrderRequest{} }
method String (line 710) | func (m *ShipOrderRequest) String() string { return proto.CompactTextS...
method ProtoMessage (line 711) | func (*ShipOrderRequest) ProtoMessage() {}
method Descriptor (line 712) | func (*ShipOrderRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 716) | func (m *ShipOrderRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 719) | func (m *ShipOrderRequest) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 722) | func (m *ShipOrderRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 725) | func (m *ShipOrderRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 728) | func (m *ShipOrderRequest) XXX_DiscardUnknown() {
method GetAddress (line 734) | func (m *ShipOrderRequest) GetAddress() *Address {
method GetItems (line 741) | func (m *ShipOrderRequest) GetItems() []*CartItem {
type ShipOrderResponse (line 748) | type ShipOrderResponse struct
method Reset (line 755) | func (m *ShipOrderResponse) Reset() { *m = ShipOrderResponse{} }
method String (line 756) | func (m *ShipOrderResponse) String() string { return proto.CompactText...
method ProtoMessage (line 757) | func (*ShipOrderResponse) ProtoMessage() {}
method Descriptor (line 758) | func (*ShipOrderResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 762) | func (m *ShipOrderResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 765) | func (m *ShipOrderResponse) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 768) | func (m *ShipOrderResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 771) | func (m *ShipOrderResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 774) | func (m *ShipOrderResponse) XXX_DiscardUnknown() {
method GetTrackingId (line 780) | func (m *ShipOrderResponse) GetTrackingId() string {
type Address (line 787) | type Address struct
method Reset (line 798) | func (m *Address) Reset() { *m = Address{} }
method String (line 799) | func (m *Address) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 800) | func (*Address) ProtoMessage() {}
method Descriptor (line 801) | func (*Address) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 805) | func (m *Address) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 808) | func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, e...
method XXX_Merge (line 811) | func (m *Address) XXX_Merge(src proto.Message) {
method XXX_Size (line 814) | func (m *Address) XXX_Size() int {
method XXX_DiscardUnknown (line 817) | func (m *Address) XXX_DiscardUnknown() {
method GetStreetAddress (line 823) | func (m *Address) GetStreetAddress() string {
method GetCity (line 830) | func (m *Address) GetCity() string {
method GetState (line 837) | func (m *Address) GetState() string {
method GetCountry (line 844) | func (m *Address) GetCountry() string {
method GetZipCode (line 851) | func (m *Address) GetZipCode() int32 {
type Money (line 859) | type Money struct
method Reset (line 877) | func (m *Money) Reset() { *m = Money{} }
method String (line 878) | func (m *Money) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 879) | func (*Money) ProtoMessage() {}
method Descriptor (line 880) | func (*Money) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 884) | func (m *Money) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 887) | func (m *Money) XXX_Marshal(b []byte, deterministic bool) ([]byte, err...
method XXX_Merge (line 890) | func (m *Money) XXX_Merge(src proto.Message) {
method XXX_Size (line 893) | func (m *Money) XXX_Size() int {
method XXX_DiscardUnknown (line 896) | func (m *Money) XXX_DiscardUnknown() {
method GetCurrencyCode (line 902) | func (m *Money) GetCurrencyCode() string {
method GetUnits (line 909) | func (m *Money) GetUnits() int64 {
method GetNanos (line 916) | func (m *Money) GetNanos() int32 {
type GetSupportedCurrenciesResponse (line 923) | type GetSupportedCurrenciesResponse struct
method Reset (line 931) | func (m *GetSupportedCurrenciesResponse) Reset() { *m = GetSup...
method String (line 932) | func (m *GetSupportedCurrenciesResponse) String() string { return prot...
method ProtoMessage (line 933) | func (*GetSupportedCurrenciesResponse) ProtoMessage() {}
method Descriptor (line 934) | func (*GetSupportedCurrenciesResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 938) | func (m *GetSupportedCurrenciesResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 941) | func (m *GetSupportedCurrenciesResponse) XXX_Marshal(b []byte, determi...
method XXX_Merge (line 944) | func (m *GetSupportedCurrenciesResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 947) | func (m *GetSupportedCurrenciesResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 950) | func (m *GetSupportedCurrenciesResponse) XXX_DiscardUnknown() {
method GetCurrencyCodes (line 956) | func (m *GetSupportedCurrenciesResponse) GetCurrencyCodes() []string {
type CurrencyConversionRequest (line 963) | type CurrencyConversionRequest struct
method Reset (line 972) | func (m *CurrencyConversionRequest) Reset() { *m = CurrencyCon...
method String (line 973) | func (m *CurrencyConversionRequest) String() string { return proto.Com...
method ProtoMessage (line 974) | func (*CurrencyConversionRequest) ProtoMessage() {}
method Descriptor (line 975) | func (*CurrencyConversionRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 979) | func (m *CurrencyConversionRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 982) | func (m *CurrencyConversionRequest) XXX_Marshal(b []byte, deterministi...
method XXX_Merge (line 985) | func (m *CurrencyConversionRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 988) | func (m *CurrencyConversionRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 991) | func (m *CurrencyConversionRequest) XXX_DiscardUnknown() {
method GetFrom (line 997) | func (m *CurrencyConversionRequest) GetFrom() *Money {
method GetToCode (line 1004) | func (m *CurrencyConversionRequest) GetToCode() string {
type CreditCardInfo (line 1011) | type CreditCardInfo struct
method Reset (line 1021) | func (m *CreditCardInfo) Reset() { *m = CreditCardInfo{} }
method String (line 1022) | func (m *CreditCardInfo) String() string { return proto.CompactTextStr...
method ProtoMessage (line 1023) | func (*CreditCardInfo) ProtoMessage() {}
method Descriptor (line 1024) | func (*CreditCardInfo) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1028) | func (m *CreditCardInfo) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1031) | func (m *CreditCardInfo) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 1034) | func (m *CreditCardInfo) XXX_Merge(src proto.Message) {
method XXX_Size (line 1037) | func (m *CreditCardInfo) XXX_Size() int {
method XXX_DiscardUnknown (line 1040) | func (m *CreditCardInfo) XXX_DiscardUnknown() {
method GetCreditCardNumber (line 1046) | func (m *CreditCardInfo) GetCreditCardNumber() string {
method GetCreditCardCvv (line 1053) | func (m *CreditCardInfo) GetCreditCardCvv() int32 {
method GetCreditCardExpirationYear (line 1060) | func (m *CreditCardInfo) GetCreditCardExpirationYear() int32 {
method GetCreditCardExpirationMonth (line 1067) | func (m *CreditCardInfo) GetCreditCardExpirationMonth() int32 {
type ChargeRequest (line 1074) | type ChargeRequest struct
method Reset (line 1082) | func (m *ChargeRequest) Reset() { *m = ChargeRequest{} }
method String (line 1083) | func (m *ChargeRequest) String() string { return proto.CompactTextStri...
method ProtoMessage (line 1084) | func (*ChargeRequest) ProtoMessage() {}
method Descriptor (line 1085) | func (*ChargeRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1089) | func (m *ChargeRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1092) | func (m *ChargeRequest) XXX_Marshal(b []byte, deterministic bool) ([]b...
method XXX_Merge (line 1095) | func (m *ChargeRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1098) | func (m *ChargeRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1101) | func (m *ChargeRequest) XXX_DiscardUnknown() {
method GetAmount (line 1107) | func (m *ChargeRequest) GetAmount() *Money {
method GetCreditCard (line 1114) | func (m *ChargeRequest) GetCreditCard() *CreditCardInfo {
type ChargeResponse (line 1121) | type ChargeResponse struct
method Reset (line 1128) | func (m *ChargeResponse) Reset() { *m = ChargeResponse{} }
method String (line 1129) | func (m *ChargeResponse) String() string { return proto.CompactTextStr...
method ProtoMessage (line 1130) | func (*ChargeResponse) ProtoMessage() {}
method Descriptor (line 1131) | func (*ChargeResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1135) | func (m *ChargeResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1138) | func (m *ChargeResponse) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 1141) | func (m *ChargeResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1144) | func (m *ChargeResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1147) | func (m *ChargeResponse) XXX_DiscardUnknown() {
method GetTransactionId (line 1153) | func (m *ChargeResponse) GetTransactionId() string {
type OrderItem (line 1160) | type OrderItem struct
method Reset (line 1168) | func (m *OrderItem) Reset() { *m = OrderItem{} }
method String (line 1169) | func (m *OrderItem) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1170) | func (*OrderItem) ProtoMessage() {}
method Descriptor (line 1171) | func (*OrderItem) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1175) | func (m *OrderItem) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1178) | func (m *OrderItem) XXX_Marshal(b []byte, deterministic bool) ([]byte,...
method XXX_Merge (line 1181) | func (m *OrderItem) XXX_Merge(src proto.Message) {
method XXX_Size (line 1184) | func (m *OrderItem) XXX_Size() int {
method XXX_DiscardUnknown (line 1187) | func (m *OrderItem) XXX_DiscardUnknown() {
method GetItem (line 1193) | func (m *OrderItem) GetItem() *CartItem {
method GetCost (line 1200) | func (m *OrderItem) GetCost() *Money {
type OrderResult (line 1207) | type OrderResult struct
method Reset (line 1218) | func (m *OrderResult) Reset() { *m = OrderResult{} }
method String (line 1219) | func (m *OrderResult) String() string { return proto.CompactTextString...
method ProtoMessage (line 1220) | func (*OrderResult) ProtoMessage() {}
method Descriptor (line 1221) | func (*OrderResult) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1225) | func (m *OrderResult) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1228) | func (m *OrderResult) XXX_Marshal(b []byte, deterministic bool) ([]byt...
method XXX_Merge (line 1231) | func (m *OrderResult) XXX_Merge(src proto.Message) {
method XXX_Size (line 1234) | func (m *OrderResult) XXX_Size() int {
method XXX_DiscardUnknown (line 1237) | func (m *OrderResult) XXX_DiscardUnknown() {
method GetOrderId (line 1243) | func (m *OrderResult) GetOrderId() string {
method GetShippingTrackingId (line 1250) | func (m *OrderResult) GetShippingTrackingId() string {
method GetShippingCost (line 1257) | func (m *OrderResult) GetShippingCost() *Money {
method GetShippingAddress (line 1264) | func (m *OrderResult) GetShippingAddress() *Address {
method GetItems (line 1271) | func (m *OrderResult) GetItems() []*OrderItem {
type SendOrderConfirmationRequest (line 1278) | type SendOrderConfirmationRequest struct
method Reset (line 1286) | func (m *SendOrderConfirmationRequest) Reset() { *m = SendOrde...
method String (line 1287) | func (m *SendOrderConfirmationRequest) String() string { return proto....
method ProtoMessage (line 1288) | func (*SendOrderConfirmationRequest) ProtoMessage() {}
method Descriptor (line 1289) | func (*SendOrderConfirmationRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1293) | func (m *SendOrderConfirmationRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1296) | func (m *SendOrderConfirmationRequest) XXX_Marshal(b []byte, determini...
method XXX_Merge (line 1299) | func (m *SendOrderConfirmationRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1302) | func (m *SendOrderConfirmationRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1305) | func (m *SendOrderConfirmationRequest) XXX_DiscardUnknown() {
method GetEmail (line 1311) | func (m *SendOrderConfirmationRequest) GetEmail() string {
method GetOrder (line 1318) | func (m *SendOrderConfirmationRequest) GetOrder() *OrderResult {
type PlaceOrderRequest (line 1325) | type PlaceOrderRequest struct
method Reset (line 1336) | func (m *PlaceOrderRequest) Reset() { *m = PlaceOrderRequest{} }
method String (line 1337) | func (m *PlaceOrderRequest) String() string { return proto.CompactText...
method ProtoMessage (line 1338) | func (*PlaceOrderRequest) ProtoMessage() {}
method Descriptor (line 1339) | func (*PlaceOrderRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1343) | func (m *PlaceOrderRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1346) | func (m *PlaceOrderRequest) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 1349) | func (m *PlaceOrderRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1352) | func (m *PlaceOrderRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1355) | func (m *PlaceOrderRequest) XXX_DiscardUnknown() {
method GetUserId (line 1361) | func (m *PlaceOrderRequest) GetUserId() string {
method GetUserCurrency (line 1368) | func (m *PlaceOrderRequest) GetUserCurrency() string {
method GetAddress (line 1375) | func (m *PlaceOrderRequest) GetAddress() *Address {
method GetEmail (line 1382) | func (m *PlaceOrderRequest) GetEmail() string {
method GetCreditCard (line 1389) | func (m *PlaceOrderRequest) GetCreditCard() *CreditCardInfo {
type PlaceOrderResponse (line 1396) | type PlaceOrderResponse struct
method Reset (line 1403) | func (m *PlaceOrderResponse) Reset() { *m = PlaceOrderResponse...
method String (line 1404) | func (m *PlaceOrderResponse) String() string { return proto.CompactTex...
method ProtoMessage (line 1405) | func (*PlaceOrderResponse) ProtoMessage() {}
method Descriptor (line 1406) | func (*PlaceOrderResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1410) | func (m *PlaceOrderResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1413) | func (m *PlaceOrderResponse) XXX_Marshal(b []byte, deterministic bool)...
method XXX_Merge (line 1416) | func (m *PlaceOrderResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1419) | func (m *PlaceOrderResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1422) | func (m *PlaceOrderResponse) XXX_DiscardUnknown() {
method GetOrder (line 1428) | func (m *PlaceOrderResponse) GetOrder() *OrderResult {
type AdRequest (line 1435) | type AdRequest struct
method Reset (line 1443) | func (m *AdRequest) Reset() { *m = AdRequest{} }
method String (line 1444) | func (m *AdRequest) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1445) | func (*AdRequest) ProtoMessage() {}
method Descriptor (line 1446) | func (*AdRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1450) | func (m *AdRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1453) | func (m *AdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte,...
method XXX_Merge (line 1456) | func (m *AdRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1459) | func (m *AdRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1462) | func (m *AdRequest) XXX_DiscardUnknown() {
method GetContextKeys (line 1468) | func (m *AdRequest) GetContextKeys() []string {
type AdResponse (line 1475) | type AdResponse struct
method Reset (line 1482) | func (m *AdResponse) Reset() { *m = AdResponse{} }
method String (line 1483) | func (m *AdResponse) String() string { return proto.CompactTextString(...
method ProtoMessage (line 1484) | func (*AdResponse) ProtoMessage() {}
method Descriptor (line 1485) | func (*AdResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1489) | func (m *AdResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1492) | func (m *AdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte...
method XXX_Merge (line 1495) | func (m *AdResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1498) | func (m *AdResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1501) | func (m *AdResponse) XXX_DiscardUnknown() {
method GetAds (line 1507) | func (m *AdResponse) GetAds() []*Ad {
type Ad (line 1514) | type Ad struct
method Reset (line 1524) | func (m *Ad) Reset() { *m = Ad{} }
method String (line 1525) | func (m *Ad) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1526) | func (*Ad) ProtoMessage() {}
method Descriptor (line 1527) | func (*Ad) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1531) | func (m *Ad) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1534) | func (m *Ad) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
method XXX_Merge (line 1537) | func (m *Ad) XXX_Merge(src proto.Message) {
method XXX_Size (line 1540) | func (m *Ad) XXX_Size() int {
method XXX_DiscardUnknown (line 1543) | func (m *Ad) XXX_DiscardUnknown() {
method GetRedirectUrl (line 1549) | func (m *Ad) GetRedirectUrl() string {
method GetText (line 1556) | func (m *Ad) GetText() string {
function init (line 1563) | func init() {
constant _ (line 1604) | _ = grpc.SupportPackageIsVersion4
type CartServiceClient (line 1609) | type CartServiceClient interface
type cartServiceClient (line 1615) | type cartServiceClient struct
method AddItem (line 1623) | func (c *cartServiceClient) AddItem(ctx context.Context, in *AddItemRe...
method GetCart (line 1632) | func (c *cartServiceClient) GetCart(ctx context.Context, in *GetCartRe...
method EmptyCart (line 1641) | func (c *cartServiceClient) EmptyCart(ctx context.Context, in *EmptyCa...
function NewCartServiceClient (line 1619) | func NewCartServiceClient(cc *grpc.ClientConn) CartServiceClient {
type CartServiceServer (line 1651) | type CartServiceServer interface
function RegisterCartServiceServer (line 1657) | func RegisterCartServiceServer(s *grpc.Server, srv CartServiceServer) {
function _CartService_AddItem_Handler (line 1661) | func _CartService_AddItem_Handler(srv interface{}, ctx context.Context, ...
function _CartService_GetCart_Handler (line 1679) | func _CartService_GetCart_Handler(srv interface{}, ctx context.Context, ...
function _CartService_EmptyCart_Handler (line 1697) | func _CartService_EmptyCart_Handler(srv interface{}, ctx context.Context...
type RecommendationServiceClient (line 1739) | type RecommendationServiceClient interface
type recommendationServiceClient (line 1743) | type recommendationServiceClient struct
method ListRecommendations (line 1751) | func (c *recommendationServiceClient) ListRecommendations(ctx context....
function NewRecommendationServiceClient (line 1747) | func NewRecommendationServiceClient(cc *grpc.ClientConn) RecommendationS...
type RecommendationServiceServer (line 1761) | type RecommendationServiceServer interface
function RegisterRecommendationServiceServer (line 1765) | func RegisterRecommendationServiceServer(s *grpc.Server, srv Recommendat...
function _RecommendationService_ListRecommendations_Handler (line 1769) | func _RecommendationService_ListRecommendations_Handler(srv interface{},...
type ProductCatalogServiceClient (line 1803) | type ProductCatalogServiceClient interface
type productCatalogServiceClient (line 1809) | type productCatalogServiceClient struct
method ListProducts (line 1817) | func (c *productCatalogServiceClient) ListProducts(ctx context.Context...
method GetProduct (line 1826) | func (c *productCatalogServiceClient) GetProduct(ctx context.Context, ...
method SearchProducts (line 1835) | func (c *productCatalogServiceClient) SearchProducts(ctx context.Conte...
function NewProductCatalogServiceClient (line 1813) | func NewProductCatalogServiceClient(cc *grpc.ClientConn) ProductCatalogS...
type ProductCatalogServiceServer (line 1845) | type ProductCatalogServiceServer interface
function RegisterProductCatalogServiceServer (line 1851) | func RegisterProductCatalogServiceServer(s *grpc.Server, srv ProductCata...
function _ProductCatalogService_ListProducts_Handler (line 1855) | func _ProductCatalogService_ListProducts_Handler(srv interface{}, ctx co...
function _ProductCatalogService_GetProduct_Handler (line 1873) | func _ProductCatalogService_GetProduct_Handler(srv interface{}, ctx cont...
function _ProductCatalogService_SearchProducts_Handler (line 1891) | func _ProductCatalogService_SearchProducts_Handler(srv interface{}, ctx ...
type ShippingServiceClient (line 1933) | type ShippingServiceClient interface
type shippingServiceClient (line 1938) | type shippingServiceClient struct
method GetQuote (line 1946) | func (c *shippingServiceClient) GetQuote(ctx context.Context, in *GetQ...
method ShipOrder (line 1955) | func (c *shippingServiceClient) ShipOrder(ctx context.Context, in *Shi...
function NewShippingServiceClient (line 1942) | func NewShippingServiceClient(cc *grpc.ClientConn) ShippingServiceClient {
type ShippingServiceServer (line 1965) | type ShippingServiceServer interface
function RegisterShippingServiceServer (line 1970) | func RegisterShippingServiceServer(s *grpc.Server, srv ShippingServiceSe...
function _ShippingService_GetQuote_Handler (line 1974) | func _ShippingService_GetQuote_Handler(srv interface{}, ctx context.Cont...
function _ShippingService_ShipOrder_Handler (line 1992) | func _ShippingService_ShipOrder_Handler(srv interface{}, ctx context.Con...
type CurrencyServiceClient (line 2030) | type CurrencyServiceClient interface
type currencyServiceClient (line 2035) | type currencyServiceClient struct
method GetSupportedCurrencies (line 2043) | func (c *currencyServiceClient) GetSupportedCurrencies(ctx context.Con...
method Convert (line 2052) | func (c *currencyServiceClient) Convert(ctx context.Context, in *Curre...
function NewCurrencyServiceClient (line 2039) | func NewCurrencyServiceClient(cc *grpc.ClientConn) CurrencyServiceClient {
type CurrencyServiceServer (line 2062) | type CurrencyServiceServer interface
function RegisterCurrencyServiceServer (line 2067) | func RegisterCurrencyServiceServer(s *grpc.Server, srv CurrencyServiceSe...
function _CurrencyService_GetSupportedCurrencies_Handler (line 2071) | func _CurrencyService_GetSupportedCurrencies_Handler(srv interface{}, ct...
function _CurrencyService_Convert_Handler (line 2089) | func _CurrencyService_Convert_Handler(srv interface{}, ctx context.Conte...
type PaymentServiceClient (line 2127) | type PaymentServiceClient interface
type paymentServiceClient (line 2131) | type paymentServiceClient struct
method Charge (line 2139) | func (c *paymentServiceClient) Charge(ctx context.Context, in *ChargeR...
function NewPaymentServiceClient (line 2135) | func NewPaymentServiceClient(cc *grpc.ClientConn) PaymentServiceClient {
type PaymentServiceServer (line 2149) | type PaymentServiceServer interface
function RegisterPaymentServiceServer (line 2153) | func RegisterPaymentServiceServer(s *grpc.Server, srv PaymentServiceServ...
function _PaymentService_Charge_Handler (line 2157) | func _PaymentService_Charge_Handler(srv interface{}, ctx context.Context...
type EmailServiceClient (line 2191) | type EmailServiceClient interface
type emailServiceClient (line 2195) | type emailServiceClient struct
method SendOrderConfirmation (line 2203) | func (c *emailServiceClient) SendOrderConfirmation(ctx context.Context...
function NewEmailServiceClient (line 2199) | func NewEmailServiceClient(cc *grpc.ClientConn) EmailServiceClient {
type EmailServiceServer (line 2213) | type EmailServiceServer interface
function RegisterEmailServiceServer (line 2217) | func RegisterEmailServiceServer(s *grpc.Server, srv EmailServiceServer) {
function _EmailService_SendOrderConfirmation_Handler (line 2221) | func _EmailService_SendOrderConfirmation_Handler(srv interface{}, ctx co...
type CheckoutServiceClient (line 2255) | type CheckoutServiceClient interface
type checkoutServiceClient (line 2259) | type checkoutServiceClient struct
method PlaceOrder (line 2267) | func (c *checkoutServiceClient) PlaceOrder(ctx context.Context, in *Pl...
function NewCheckoutServiceClient (line 2263) | func NewCheckoutServiceClient(cc *grpc.ClientConn) CheckoutServiceClient {
type CheckoutServiceServer (line 2277) | type CheckoutServiceServer interface
function RegisterCheckoutServiceServer (line 2281) | func RegisterCheckoutServiceServer(s *grpc.Server, srv CheckoutServiceSe...
function _CheckoutService_PlaceOrder_Handler (line 2285) | func _CheckoutService_PlaceOrder_Handler(srv interface{}, ctx context.Co...
type AdServiceClient (line 2319) | type AdServiceClient interface
type adServiceClient (line 2323) | type adServiceClient struct
method GetAds (line 2331) | func (c *adServiceClient) GetAds(ctx context.Context, in *AdRequest, o...
function NewAdServiceClient (line 2327) | func NewAdServiceClient(cc *grpc.ClientConn) AdServiceClient {
type AdServiceServer (line 2341) | type AdServiceServer interface
function RegisterAdServiceServer (line 2345) | func RegisterAdServiceServer(s *grpc.Server, srv AdServiceServer) {
function _AdService_GetAds_Handler (line 2349) | func _AdService_GetAds_Handler(srv interface{}, ctx context.Context, dec...
function init (line 2380) | func init() { proto.RegisterFile("demo.proto", fileDescriptor_ca53982754...
FILE: microservices-demo/src/frontend/handlers.go
type platformDetails (line 37) | type platformDetails struct
method setPlatformDetails (line 124) | func (plat *platformDetails) setPlatformDetails(env string) {
method homeHandler (line 54) | func (fe *frontendServer) homeHandler(w http.ResponseWriter, r *http.Req...
method productHandler (line 146) | func (fe *frontendServer) productHandler(w http.ResponseWriter, r *http....
method addToCartHandler (line 209) | func (fe *frontendServer) addToCartHandler(w http.ResponseWriter, r *htt...
method emptyCartHandler (line 233) | func (fe *frontendServer) emptyCartHandler(w http.ResponseWriter, r *htt...
method viewCartHandler (line 245) | func (fe *frontendServer) viewCartHandler(w http.ResponseWriter, r *http...
method placeOrderHandler (line 321) | func (fe *frontendServer) placeOrderHandler(w http.ResponseWriter, r *ht...
method logoutHandler (line 394) | func (fe *frontendServer) logoutHandler(w http.ResponseWriter, r *http.R...
method setCurrencyHandler (line 406) | func (fe *frontendServer) setCurrencyHandler(w http.ResponseWriter, r *h...
method chooseAd (line 429) | func (fe *frontendServer) chooseAd(ctx context.Context, ctxKeys []string...
function renderHTTPError (line 438) | func renderHTTPError(log logrus.FieldLogger, r *http.Request, w http.Res...
function currentCurrency (line 456) | func currentCurrency(r *http.Request) string {
function sessionID (line 464) | func sessionID(r *http.Request) string {
function cartIDs (line 472) | func cartIDs(c []*pb.CartItem) []string {
function cartSize (line 481) | func cartSize(c []*pb.CartItem) int {
function renderMoney (line 489) | func renderMoney(money pb.Money) string {
function renderCurrencyLogo (line 494) | func renderCurrencyLogo(currencyCode string) string {
function stringinSlice (line 511) | func stringinSlice(slice []string, val string) bool {
FILE: microservices-demo/src/frontend/main.go
constant port (line 39) | port = "8080"
constant defaultCurrency (line 40) | defaultCurrency = "USD"
constant cookieMaxAge (line 41) | cookieMaxAge = 60 * 60 * 48
constant cookiePrefix (line 43) | cookiePrefix = "shop_"
constant cookieSessionID (line 44) | cookieSessionID = cookiePrefix + "session-id"
constant cookieCurrency (line 45) | cookieCurrency = cookiePrefix + "currency"
type ctxKeySessionID (line 58) | type ctxKeySessionID struct
type frontendServer (line 60) | type frontendServer struct
function main (line 83) | func main() {
function initJaegerTracing (line 157) | func initJaegerTracing(log logrus.FieldLogger) {
function initStats (line 180) | func initStats(log logrus.FieldLogger, exporter *stackdriver.Exporter) {
function initStackdriverTracing (line 195) | func initStackdriverTracing(log logrus.FieldLogger) {
function initTracing (line 221) | func initTracing(log logrus.FieldLogger) {
function initProfiling (line 233) | func initProfiling(log logrus.FieldLogger, service, version string) {
function mustMapEnv (line 256) | func mustMapEnv(target *string, envKey string) {
function mustConnGRPC (line 264) | func mustConnGRPC(ctx context.Context, conn **grpc.ClientConn, addr stri...
FILE: microservices-demo/src/frontend/middleware.go
type ctxKeyLog (line 26) | type ctxKeyLog struct
type ctxKeyRequestID (line 27) | type ctxKeyRequestID struct
type logHandler (line 29) | type logHandler struct
method ServeHTTP (line 56) | func (lh *logHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
type responseRecorder (line 34) | type responseRecorder struct
method Header (line 40) | func (r *responseRecorder) Header() http.Header { return r.w.Header() }
method Write (line 42) | func (r *responseRecorder) Write(p []byte) (int, error) {
method WriteHeader (line 51) | func (r *responseRecorder) WriteHeader(statusCode int) {
function ensureSessionID (line 84) | func ensureSessionID(next http.Handler) http.HandlerFunc {
FILE: microservices-demo/src/frontend/money/money.go
constant nanosMin (line 24) | nanosMin = -999999999
constant nanosMax (line 25) | nanosMax = +999999999
constant nanosMod (line 26) | nanosMod = 1000000000
function IsValid (line 35) | func IsValid(m pb.Money) bool {
function signMatches (line 39) | func signMatches(m pb.Money) bool {
function validNanos (line 43) | func validNanos(nanos int32) bool { return nanosMin <= nanos && nanos <=...
function IsZero (line 46) | func IsZero(m pb.Money) bool { return m.GetUnits() == 0 && m.GetNanos() ...
function IsPositive (line 50) | func IsPositive(m pb.Money) bool {
function IsNegative (line 56) | func IsNegative(m pb.Money) bool {
function AreSameCurrency (line 62) | func AreSameCurrency(l, r pb.Money) bool {
function AreEquals (line 68) | func AreEquals(l, r pb.Money) bool {
function Negate (line 74) | func Negate(m pb.Money) pb.Money {
function Must (line 83) | func Must(v pb.Money, err error) pb.Money {
function Sum (line 93) | func Sum(l, r pb.Money) (pb.Money, error) {
function MultiplySlow (line 125) | func MultiplySlow(m pb.Money, n uint32) pb.Money {
FILE: microservices-demo/src/frontend/money/money_test.go
function mmc (line 25) | func mmc(u int64, n int32, c string) pb.Money { return pb.Money{Units: u...
function mm (line 26) | func mm(u int64, n int32) pb.Money { return mmc(u, n, "") }
function TestIsValid (line 28) | func TestIsValid(t *testing.T) {
function TestIsZero (line 52) | func TestIsZero(t *testing.T) {
function TestIsPositive (line 73) | func TestIsPositive(t *testing.T) {
function TestIsNegative (line 94) | func TestIsNegative(t *testing.T) {
function TestAreSameCurrency (line 115) | func TestAreSameCurrency(t *testing.T) {
function TestAreEquals (line 140) | func TestAreEquals(t *testing.T) {
function TestNegate (line 165) | func TestNegate(t *testing.T) {
function TestMust_pass (line 185) | func TestMust_pass(t *testing.T) {
function TestMust_panic (line 192) | func TestMust_panic(t *testing.T) {
function TestSum (line 202) | func TestSum(t *testing.T) {
FILE: microservices-demo/src/frontend/rpc.go
constant avoidNoopCurrencyConversionRPC (line 27) | avoidNoopCurrencyConversionRPC = false
method getCurrencies (line 30) | func (fe *frontendServer) getCurrencies(ctx context.Context) ([]string, ...
method getProducts (line 45) | func (fe *frontendServer) getProducts(ctx context.Context) ([]*pb.Produc...
method getProduct (line 51) | func (fe *frontendServer) getProduct(ctx context.Context, id string) (*p...
method getCart (line 57) | func (fe *frontendServer) getCart(ctx context.Context, userID string) ([...
method emptyCart (line 62) | func (fe *frontendServer) emptyCart(ctx context.Context, userID string) ...
method insertCart (line 67) | func (fe *frontendServer) insertCart(ctx context.Context, userID, produc...
method convertCurrency (line 77) | func (fe *frontendServer) convertCurrency(ctx context.Context, money *pb...
method getShippingQuote (line 87) | func (fe *frontendServer) getShippingQuote(ctx context.Context, items []...
method getRecommendations (line 99) | func (fe *frontendServer) getRecommendations(ctx context.Context, userID...
method getAd (line 119) | func (fe *frontendServer) getAd(ctx context.Context, ctxKeys []string) (...
FILE: microservices-demo/src/loadgenerator/locustfile.py
function index (line 31) | def index(l):
function setCurrency (line 34) | def setCurrency(l):
function browseProduct (line 39) | def browseProduct(l):
function viewCart (line 42) | def viewCart(l):
function addToCart (line 45) | def addToCart(l):
function checkout (line 52) | def checkout(l):
class UserBehavior (line 67) | class UserBehavior(TaskSet):
method on_start (line 69) | def on_start(self):
class WebsiteUser (line 79) | class WebsiteUser(HttpUser):
FILE: microservices-demo/src/paymentservice/charge.js
class CreditCardError (line 27) | class CreditCardError extends Error {
method constructor (line 28) | constructor (message) {
class InvalidCreditCard (line 34) | class InvalidCreditCard extends CreditCardError {
method constructor (line 35) | constructor (cardType) {
class UnacceptedCreditCard (line 40) | class UnacceptedCreditCard extends CreditCardError {
method constructor (line 41) | constructor (cardType) {
class ExpiredCreditCard (line 46) | class ExpiredCreditCard extends CreditCardError {
method constructor (line 47) | constructor (number, month, year) {
FILE: microservices-demo/src/paymentservice/index.js
constant PORT (line 60) | const PORT = process.env['PORT'];
constant PROTO_PATH (line 61) | const PROTO_PATH = path.join(__dirname, '/proto/');
FILE: microservices-demo/src/paymentservice/server.js
class HipsterShopServer (line 29) | class HipsterShopServer {
method constructor (line 30) | constructor(protoRoot, port = HipsterShopServer.PORT) {
method ChargeServiceHandler (line 47) | static ChargeServiceHandler(call, callback) {
method CheckHandler (line 58) | static CheckHandler(call, callback) {
method listen (line 63) | listen() {
method loadProto (line 76) | loadProto(path) {
method loadAllProtos (line 90) | loadAllProtos(protoRoot) {
FILE: microservices-demo/src/productcatalogservice/genproto/demo.pb.go
constant _ (line 40) | _ = proto.ProtoPackageIsVersion2
type CartItem (line 42) | type CartItem struct
method Reset (line 50) | func (m *CartItem) Reset() { *m = CartItem{} }
method String (line 51) | func (m *CartItem) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 52) | func (*CartItem) ProtoMessage() {}
method Descriptor (line 53) | func (*CartItem) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 57) | func (m *CartItem) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 60) | func (m *CartItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, ...
method XXX_Merge (line 63) | func (m *CartItem) XXX_Merge(src proto.Message) {
method XXX_Size (line 66) | func (m *CartItem) XXX_Size() int {
method XXX_DiscardUnknown (line 69) | func (m *CartItem) XXX_DiscardUnknown() {
method GetProductId (line 75) | func (m *CartItem) GetProductId() string {
method GetQuantity (line 82) | func (m *CartItem) GetQuantity() int32 {
type AddItemRequest (line 89) | type AddItemRequest struct
method Reset (line 97) | func (m *AddItemRequest) Reset() { *m = AddItemRequest{} }
method String (line 98) | func (m *AddItemRequest) String() string { return proto.CompactTextStr...
method ProtoMessage (line 99) | func (*AddItemRequest) ProtoMessage() {}
method Descriptor (line 100) | func (*AddItemRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 104) | func (m *AddItemRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 107) | func (m *AddItemRequest) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 110) | func (m *AddItemRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 113) | func (m *AddItemRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 116) | func (m *AddItemRequest) XXX_DiscardUnknown() {
method GetUserId (line 122) | func (m *AddItemRequest) GetUserId() string {
method GetItem (line 129) | func (m *AddItemRequest) GetItem() *CartItem {
type EmptyCartRequest (line 136) | type EmptyCartRequest struct
method Reset (line 143) | func (m *EmptyCartRequest) Reset() { *m = EmptyCartRequest{} }
method String (line 144) | func (m *EmptyCartRequest) String() string { return proto.CompactTextS...
method ProtoMessage (line 145) | func (*EmptyCartRequest) ProtoMessage() {}
method Descriptor (line 146) | func (*EmptyCartRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 150) | func (m *EmptyCartRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 153) | func (m *EmptyCartRequest) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 156) | func (m *EmptyCartRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 159) | func (m *EmptyCartRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 162) | func (m *EmptyCartRequest) XXX_DiscardUnknown() {
method GetUserId (line 168) | func (m *EmptyCartRequest) GetUserId() string {
type GetCartRequest (line 175) | type GetCartRequest struct
method Reset (line 182) | func (m *GetCartRequest) Reset() { *m = GetCartRequest{} }
method String (line 183) | func (m *GetCartRequest) String() string { return proto.CompactTextStr...
method ProtoMessage (line 184) | func (*GetCartRequest) ProtoMessage() {}
method Descriptor (line 185) | func (*GetCartRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 189) | func (m *GetCartRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 192) | func (m *GetCartRequest) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 195) | func (m *GetCartRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 198) | func (m *GetCartRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 201) | func (m *GetCartRequest) XXX_DiscardUnknown() {
method GetUserId (line 207) | func (m *GetCartRequest) GetUserId() string {
type Cart (line 214) | type Cart struct
method Reset (line 222) | func (m *Cart) Reset() { *m = Cart{} }
method String (line 223) | func (m *Cart) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 224) | func (*Cart) ProtoMessage() {}
method Descriptor (line 225) | func (*Cart) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 229) | func (m *Cart) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 232) | func (m *Cart) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro...
method XXX_Merge (line 235) | func (m *Cart) XXX_Merge(src proto.Message) {
method XXX_Size (line 238) | func (m *Cart) XXX_Size() int {
method XXX_DiscardUnknown (line 241) | func (m *Cart) XXX_DiscardUnknown() {
method GetUserId (line 247) | func (m *Cart) GetUserId() string {
method GetItems (line 254) | func (m *Cart) GetItems() []*CartItem {
type Empty (line 261) | type Empty struct
method Reset (line 267) | func (m *Empty) Reset() { *m = Empty{} }
method String (line 268) | func (m *Empty) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 269) | func (*Empty) ProtoMessage() {}
method Descriptor (line 270) | func (*Empty) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 274) | func (m *Empty) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 277) | func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, err...
method XXX_Merge (line 280) | func (m *Empty) XXX_Merge(src proto.Message) {
method XXX_Size (line 283) | func (m *Empty) XXX_Size() int {
method XXX_DiscardUnknown (line 286) | func (m *Empty) XXX_DiscardUnknown() {
type ListRecommendationsRequest (line 292) | type ListRecommendationsRequest struct
method Reset (line 300) | func (m *ListRecommendationsRequest) Reset() { *m = ListRecomm...
method String (line 301) | func (m *ListRecommendationsRequest) String() string { return proto.Co...
method ProtoMessage (line 302) | func (*ListRecommendationsRequest) ProtoMessage() {}
method Descriptor (line 303) | func (*ListRecommendationsRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 307) | func (m *ListRecommendationsRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 310) | func (m *ListRecommendationsRequest) XXX_Marshal(b []byte, determinist...
method XXX_Merge (line 313) | func (m *ListRecommendationsRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 316) | func (m *ListRecommendationsRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 319) | func (m *ListRecommendationsRequest) XXX_DiscardUnknown() {
method GetUserId (line 325) | func (m *ListRecommendationsRequest) GetUserId() string {
method GetProductIds (line 332) | func (m *ListRecommendationsRequest) GetProductIds() []string {
type ListRecommendationsResponse (line 339) | type ListRecommendationsResponse struct
method Reset (line 346) | func (m *ListRecommendationsResponse) Reset() { *m = ListRecom...
method String (line 347) | func (m *ListRecommendationsResponse) String() string { return proto.C...
method ProtoMessage (line 348) | func (*ListRecommendationsResponse) ProtoMessage() {}
method Descriptor (line 349) | func (*ListRecommendationsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 353) | func (m *ListRecommendationsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 356) | func (m *ListRecommendationsResponse) XXX_Marshal(b []byte, determinis...
method XXX_Merge (line 359) | func (m *ListRecommendationsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 362) | func (m *ListRecommendationsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 365) | func (m *ListRecommendationsResponse) XXX_DiscardUnknown() {
method GetProductIds (line 371) | func (m *ListRecommendationsResponse) GetProductIds() []string {
type Product (line 378) | type Product struct
method Reset (line 392) | func (m *Product) Reset() { *m = Product{} }
method String (line 393) | func (m *Product) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 394) | func (*Product) ProtoMessage() {}
method Descriptor (line 395) | func (*Product) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 399) | func (m *Product) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 402) | func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, e...
method XXX_Merge (line 405) | func (m *Product) XXX_Merge(src proto.Message) {
method XXX_Size (line 408) | func (m *Product) XXX_Size() int {
method XXX_DiscardUnknown (line 411) | func (m *Product) XXX_DiscardUnknown() {
method GetId (line 417) | func (m *Product) GetId() string {
method GetName (line 424) | func (m *Product) GetName() string {
method GetDescription (line 431) | func (m *Product) GetDescription() string {
method GetPicture (line 438) | func (m *Product) GetPicture() string {
method GetPriceUsd (line 445) | func (m *Product) GetPriceUsd() *Money {
method GetCategories (line 452) | func (m *Product) GetCategories() []string {
type ListProductsResponse (line 459) | type ListProductsResponse struct
method Reset (line 466) | func (m *ListProductsResponse) Reset() { *m = ListProductsResp...
method String (line 467) | func (m *ListProductsResponse) String() string { return proto.CompactT...
method ProtoMessage (line 468) | func (*ListProductsResponse) ProtoMessage() {}
method Descriptor (line 469) | func (*ListProductsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 473) | func (m *ListProductsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 476) | func (m *ListProductsResponse) XXX_Marshal(b []byte, deterministic boo...
method XXX_Merge (line 479) | func (m *ListProductsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 482) | func (m *ListProductsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 485) | func (m *ListProductsResponse) XXX_DiscardUnknown() {
method GetProducts (line 491) | func (m *ListProductsResponse) GetProducts() []*Product {
type GetProductRequest (line 498) | type GetProductRequest struct
method Reset (line 505) | func (m *GetProductRequest) Reset() { *m = GetProductRequest{} }
method String (line 506) | func (m *GetProductRequest) String() string { return proto.CompactText...
method ProtoMessage (line 507) | func (*GetProductRequest) ProtoMessage() {}
method Descriptor (line 508) | func (*GetProductRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 512) | func (m *GetProductRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 515) | func (m *GetProductRequest) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 518) | func (m *GetProductRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 521) | func (m *GetProductRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 524) | func (m *GetProductRequest) XXX_DiscardUnknown() {
method GetId (line 530) | func (m *GetProductRequest) GetId() string {
type SearchProductsRequest (line 537) | type SearchProductsRequest struct
method Reset (line 544) | func (m *SearchProductsRequest) Reset() { *m = SearchProductsR...
method String (line 545) | func (m *SearchProductsRequest) String() string { return proto.Compact...
method ProtoMessage (line 546) | func (*SearchProductsRequest) ProtoMessage() {}
method Descriptor (line 547) | func (*SearchProductsRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 551) | func (m *SearchProductsRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 554) | func (m *SearchProductsRequest) XXX_Marshal(b []byte, deterministic bo...
method XXX_Merge (line 557) | func (m *SearchProductsRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 560) | func (m *SearchProductsRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 563) | func (m *SearchProductsRequest) XXX_DiscardUnknown() {
method GetQuery (line 569) | func (m *SearchProductsRequest) GetQuery() string {
type SearchProductsResponse (line 576) | type SearchProductsResponse struct
method Reset (line 583) | func (m *SearchProductsResponse) Reset() { *m = SearchProducts...
method String (line 584) | func (m *SearchProductsResponse) String() string { return proto.Compac...
method ProtoMessage (line 585) | func (*SearchProductsResponse) ProtoMessage() {}
method Descriptor (line 586) | func (*SearchProductsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 590) | func (m *SearchProductsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 593) | func (m *SearchProductsResponse) XXX_Marshal(b []byte, deterministic b...
method XXX_Merge (line 596) | func (m *SearchProductsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 599) | func (m *SearchProductsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 602) | func (m *SearchProductsResponse) XXX_DiscardUnknown() {
method GetResults (line 608) | func (m *SearchProductsResponse) GetResults() []*Product {
type GetQuoteRequest (line 615) | type GetQuoteRequest struct
method Reset (line 623) | func (m *GetQuoteRequest) Reset() { *m = GetQuoteRequest{} }
method String (line 624) | func (m *GetQuoteRequest) String() string { return proto.CompactTextSt...
method ProtoMessage (line 625) | func (*GetQuoteRequest) ProtoMessage() {}
method Descriptor (line 626) | func (*GetQuoteRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 630) | func (m *GetQuoteRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 633) | func (m *GetQuoteRequest) XXX_Marshal(b []byte, deterministic bool) ([...
method XXX_Merge (line 636) | func (m *GetQuoteRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 639) | func (m *GetQuoteRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 642) | func (m *GetQuoteRequest) XXX_DiscardUnknown() {
method GetAddress (line 648) | func (m *GetQuoteRequest) GetAddress() *Address {
method GetItems (line 655) | func (m *GetQuoteRequest) GetItems() []*CartItem {
type GetQuoteResponse (line 662) | type GetQuoteResponse struct
method Reset (line 669) | func (m *GetQuoteResponse) Reset() { *m = GetQuoteResponse{} }
method String (line 670) | func (m *GetQuoteResponse) String() string { return proto.CompactTextS...
method ProtoMessage (line 671) | func (*GetQuoteResponse) ProtoMessage() {}
method Descriptor (line 672) | func (*GetQuoteResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 676) | func (m *GetQuoteResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 679) | func (m *GetQuoteResponse) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 682) | func (m *GetQuoteResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 685) | func (m *GetQuoteResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 688) | func (m *GetQuoteResponse) XXX_DiscardUnknown() {
method GetCostUsd (line 694) | func (m *GetQuoteResponse) GetCostUsd() *Money {
type ShipOrderRequest (line 701) | type ShipOrderRequest struct
method Reset (line 709) | func (m *ShipOrderRequest) Reset() { *m = ShipOrderRequest{} }
method String (line 710) | func (m *ShipOrderRequest) String() string { return proto.CompactTextS...
method ProtoMessage (line 711) | func (*ShipOrderRequest) ProtoMessage() {}
method Descriptor (line 712) | func (*ShipOrderRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 716) | func (m *ShipOrderRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 719) | func (m *ShipOrderRequest) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 722) | func (m *ShipOrderRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 725) | func (m *ShipOrderRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 728) | func (m *ShipOrderRequest) XXX_DiscardUnknown() {
method GetAddress (line 734) | func (m *ShipOrderRequest) GetAddress() *Address {
method GetItems (line 741) | func (m *ShipOrderRequest) GetItems() []*CartItem {
type ShipOrderResponse (line 748) | type ShipOrderResponse struct
method Reset (line 755) | func (m *ShipOrderResponse) Reset() { *m = ShipOrderResponse{} }
method String (line 756) | func (m *ShipOrderResponse) String() string { return proto.CompactText...
method ProtoMessage (line 757) | func (*ShipOrderResponse) ProtoMessage() {}
method Descriptor (line 758) | func (*ShipOrderResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 762) | func (m *ShipOrderResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 765) | func (m *ShipOrderResponse) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 768) | func (m *ShipOrderResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 771) | func (m *ShipOrderResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 774) | func (m *ShipOrderResponse) XXX_DiscardUnknown() {
method GetTrackingId (line 780) | func (m *ShipOrderResponse) GetTrackingId() string {
type Address (line 787) | type Address struct
method Reset (line 798) | func (m *Address) Reset() { *m = Address{} }
method String (line 799) | func (m *Address) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 800) | func (*Address) ProtoMessage() {}
method Descriptor (line 801) | func (*Address) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 805) | func (m *Address) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 808) | func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, e...
method XXX_Merge (line 811) | func (m *Address) XXX_Merge(src proto.Message) {
method XXX_Size (line 814) | func (m *Address) XXX_Size() int {
method XXX_DiscardUnknown (line 817) | func (m *Address) XXX_DiscardUnknown() {
method GetStreetAddress (line 823) | func (m *Address) GetStreetAddress() string {
method GetCity (line 830) | func (m *Address) GetCity() string {
method GetState (line 837) | func (m *Address) GetState() string {
method GetCountry (line 844) | func (m *Address) GetCountry() string {
method GetZipCode (line 851) | func (m *Address) GetZipCode() int32 {
type Money (line 859) | type Money struct
method Reset (line 877) | func (m *Money) Reset() { *m = Money{} }
method String (line 878) | func (m *Money) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 879) | func (*Money) ProtoMessage() {}
method Descriptor (line 880) | func (*Money) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 884) | func (m *Money) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 887) | func (m *Money) XXX_Marshal(b []byte, deterministic bool) ([]byte, err...
method XXX_Merge (line 890) | func (m *Money) XXX_Merge(src proto.Message) {
method XXX_Size (line 893) | func (m *Money) XXX_Size() int {
method XXX_DiscardUnknown (line 896) | func (m *Money) XXX_DiscardUnknown() {
method GetCurrencyCode (line 902) | func (m *Money) GetCurrencyCode() string {
method GetUnits (line 909) | func (m *Money) GetUnits() int64 {
method GetNanos (line 916) | func (m *Money) GetNanos() int32 {
type GetSupportedCurrenciesResponse (line 923) | type GetSupportedCurrenciesResponse struct
method Reset (line 931) | func (m *GetSupportedCurrenciesResponse) Reset() { *m = GetSup...
method String (line 932) | func (m *GetSupportedCurrenciesResponse) String() string { return prot...
method ProtoMessage (line 933) | func (*GetSupportedCurrenciesResponse) ProtoMessage() {}
method Descriptor (line 934) | func (*GetSupportedCurrenciesResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 938) | func (m *GetSupportedCurrenciesResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 941) | func (m *GetSupportedCurrenciesResponse) XXX_Marshal(b []byte, determi...
method XXX_Merge (line 944) | func (m *GetSupportedCurrenciesResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 947) | func (m *GetSupportedCurrenciesResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 950) | func (m *GetSupportedCurrenciesResponse) XXX_DiscardUnknown() {
method GetCurrencyCodes (line 956) | func (m *GetSupportedCurrenciesResponse) GetCurrencyCodes() []string {
type CurrencyConversionRequest (line 963) | type CurrencyConversionRequest struct
method Reset (line 972) | func (m *CurrencyConversionRequest) Reset() { *m = CurrencyCon...
method String (line 973) | func (m *CurrencyConversionRequest) String() string { return proto.Com...
method ProtoMessage (line 974) | func (*CurrencyConversionRequest) ProtoMessage() {}
method Descriptor (line 975) | func (*CurrencyConversionRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 979) | func (m *CurrencyConversionRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 982) | func (m *CurrencyConversionRequest) XXX_Marshal(b []byte, deterministi...
method XXX_Merge (line 985) | func (m *CurrencyConversionRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 988) | func (m *CurrencyConversionRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 991) | func (m *CurrencyConversionRequest) XXX_DiscardUnknown() {
method GetFrom (line 997) | func (m *CurrencyConversionRequest) GetFrom() *Money {
method GetToCode (line 1004) | func (m *CurrencyConversionRequest) GetToCode() string {
type CreditCardInfo (line 1011) | type CreditCardInfo struct
method Reset (line 1021) | func (m *CreditCardInfo) Reset() { *m = CreditCardInfo{} }
method String (line 1022) | func (m *CreditCardInfo) String() string { return proto.CompactTextStr...
method ProtoMessage (line 1023) | func (*CreditCardInfo) ProtoMessage() {}
method Descriptor (line 1024) | func (*CreditCardInfo) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1028) | func (m *CreditCardInfo) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1031) | func (m *CreditCardInfo) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 1034) | func (m *CreditCardInfo) XXX_Merge(src proto.Message) {
method XXX_Size (line 1037) | func (m *CreditCardInfo) XXX_Size() int {
method XXX_DiscardUnknown (line 1040) | func (m *CreditCardInfo) XXX_DiscardUnknown() {
method GetCreditCardNumber (line 1046) | func (m *CreditCardInfo) GetCreditCardNumber() string {
method GetCreditCardCvv (line 1053) | func (m *CreditCardInfo) GetCreditCardCvv() int32 {
method GetCreditCardExpirationYear (line 1060) | func (m *CreditCardInfo) GetCreditCardExpirationYear() int32 {
method GetCreditCardExpirationMonth (line 1067) | func (m *CreditCardInfo) GetCreditCardExpirationMonth() int32 {
type ChargeRequest (line 1074) | type ChargeRequest struct
method Reset (line 1082) | func (m *ChargeRequest) Reset() { *m = ChargeRequest{} }
method String (line 1083) | func (m *ChargeRequest) String() string { return proto.CompactTextStri...
method ProtoMessage (line 1084) | func (*ChargeRequest) ProtoMessage() {}
method Descriptor (line 1085) | func (*ChargeRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1089) | func (m *ChargeRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1092) | func (m *ChargeRequest) XXX_Marshal(b []byte, deterministic bool) ([]b...
method XXX_Merge (line 1095) | func (m *ChargeRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1098) | func (m *ChargeRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1101) | func (m *ChargeRequest) XXX_DiscardUnknown() {
method GetAmount (line 1107) | func (m *ChargeRequest) GetAmount() *Money {
method GetCreditCard (line 1114) | func (m *ChargeRequest) GetCreditCard() *CreditCardInfo {
type ChargeResponse (line 1121) | type ChargeResponse struct
method Reset (line 1128) | func (m *ChargeResponse) Reset() { *m = ChargeResponse{} }
method String (line 1129) | func (m *ChargeResponse) String() string { return proto.CompactTextStr...
method ProtoMessage (line 1130) | func (*ChargeResponse) ProtoMessage() {}
method Descriptor (line 1131) | func (*ChargeResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1135) | func (m *ChargeResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1138) | func (m *ChargeResponse) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 1141) | func (m *ChargeResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1144) | func (m *ChargeResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1147) | func (m *ChargeResponse) XXX_DiscardUnknown() {
method GetTransactionId (line 1153) | func (m *ChargeResponse) GetTransactionId() string {
type OrderItem (line 1160) | type OrderItem struct
method Reset (line 1168) | func (m *OrderItem) Reset() { *m = OrderItem{} }
method String (line 1169) | func (m *OrderItem) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1170) | func (*OrderItem) ProtoMessage() {}
method Descriptor (line 1171) | func (*OrderItem) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1175) | func (m *OrderItem) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1178) | func (m *OrderItem) XXX_Marshal(b []byte, deterministic bool) ([]byte,...
method XXX_Merge (line 1181) | func (m *OrderItem) XXX_Merge(src proto.Message) {
method XXX_Size (line 1184) | func (m *OrderItem) XXX_Size() int {
method XXX_DiscardUnknown (line 1187) | func (m *OrderItem) XXX_DiscardUnknown() {
method GetItem (line 1193) | func (m *OrderItem) GetItem() *CartItem {
method GetCost (line 1200) | func (m *OrderItem) GetCost() *Money {
type OrderResult (line 1207) | type OrderResult struct
method Reset (line 1218) | func (m *OrderResult) Reset() { *m = OrderResult{} }
method String (line 1219) | func (m *OrderResult) String() string { return proto.CompactTextString...
method ProtoMessage (line 1220) | func (*OrderResult) ProtoMessage() {}
method Descriptor (line 1221) | func (*OrderResult) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1225) | func (m *OrderResult) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1228) | func (m *OrderResult) XXX_Marshal(b []byte, deterministic bool) ([]byt...
method XXX_Merge (line 1231) | func (m *OrderResult) XXX_Merge(src proto.Message) {
method XXX_Size (line 1234) | func (m *OrderResult) XXX_Size() int {
method XXX_DiscardUnknown (line 1237) | func (m *OrderResult) XXX_DiscardUnknown() {
method GetOrderId (line 1243) | func (m *OrderResult) GetOrderId() string {
method GetShippingTrackingId (line 1250) | func (m *OrderResult) GetShippingTrackingId() string {
method GetShippingCost (line 1257) | func (m *OrderResult) GetShippingCost() *Money {
method GetShippingAddress (line 1264) | func (m *OrderResult) GetShippingAddress() *Address {
method GetItems (line 1271) | func (m *OrderResult) GetItems() []*OrderItem {
type SendOrderConfirmationRequest (line 1278) | type SendOrderConfirmationRequest struct
method Reset (line 1286) | func (m *SendOrderConfirmationRequest) Reset() { *m = SendOrde...
method String (line 1287) | func (m *SendOrderConfirmationRequest) String() string { return proto....
method ProtoMessage (line 1288) | func (*SendOrderConfirmationRequest) ProtoMessage() {}
method Descriptor (line 1289) | func (*SendOrderConfirmationRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1293) | func (m *SendOrderConfirmationRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1296) | func (m *SendOrderConfirmationRequest) XXX_Marshal(b []byte, determini...
method XXX_Merge (line 1299) | func (m *SendOrderConfirmationRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1302) | func (m *SendOrderConfirmationRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1305) | func (m *SendOrderConfirmationRequest) XXX_DiscardUnknown() {
method GetEmail (line 1311) | func (m *SendOrderConfirmationRequest) GetEmail() string {
method GetOrder (line 1318) | func (m *SendOrderConfirmationRequest) GetOrder() *OrderResult {
type PlaceOrderRequest (line 1325) | type PlaceOrderRequest struct
method Reset (line 1336) | func (m *PlaceOrderRequest) Reset() { *m = PlaceOrderRequest{} }
method String (line 1337) | func (m *PlaceOrderRequest) String() string { return proto.CompactText...
method ProtoMessage (line 1338) | func (*PlaceOrderRequest) ProtoMessage() {}
method Descriptor (line 1339) | func (*PlaceOrderRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1343) | func (m *PlaceOrderRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1346) | func (m *PlaceOrderRequest) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 1349) | func (m *PlaceOrderRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1352) | func (m *PlaceOrderRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1355) | func (m *PlaceOrderRequest) XXX_DiscardUnknown() {
method GetUserId (line 1361) | func (m *PlaceOrderRequest) GetUserId() string {
method GetUserCurrency (line 1368) | func (m *PlaceOrderRequest) GetUserCurrency() string {
method GetAddress (line 1375) | func (m *PlaceOrderRequest) GetAddress() *Address {
method GetEmail (line 1382) | func (m *PlaceOrderRequest) GetEmail() string {
method GetCreditCard (line 1389) | func (m *PlaceOrderRequest) GetCreditCard() *CreditCardInfo {
type PlaceOrderResponse (line 1396) | type PlaceOrderResponse struct
method Reset (line 1403) | func (m *PlaceOrderResponse) Reset() { *m = PlaceOrderResponse...
method String (line 1404) | func (m *PlaceOrderResponse) String() string { return proto.CompactTex...
method ProtoMessage (line 1405) | func (*PlaceOrderResponse) ProtoMessage() {}
method Descriptor (line 1406) | func (*PlaceOrderResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1410) | func (m *PlaceOrderResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1413) | func (m *PlaceOrderResponse) XXX_Marshal(b []byte, deterministic bool)...
method XXX_Merge (line 1416) | func (m *PlaceOrderResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1419) | func (m *PlaceOrderResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1422) | func (m *PlaceOrderResponse) XXX_DiscardUnknown() {
method GetOrder (line 1428) | func (m *PlaceOrderResponse) GetOrder() *OrderResult {
type AdRequest (line 1435) | type AdRequest struct
method Reset (line 1443) | func (m *AdRequest) Reset() { *m = AdRequest{} }
method String (line 1444) | func (m *AdRequest) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1445) | func (*AdRequest) ProtoMessage() {}
method Descriptor (line 1446) | func (*AdRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1450) | func (m *AdRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1453) | func (m *AdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte,...
method XXX_Merge (line 1456) | func (m *AdRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1459) | func (m *AdRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1462) | func (m *AdRequest) XXX_DiscardUnknown() {
method GetContextKeys (line 1468) | func (m *AdRequest) GetContextKeys() []string {
type AdResponse (line 1475) | type AdResponse struct
method Reset (line 1482) | func (m *AdResponse) Reset() { *m = AdResponse{} }
method String (line 1483) | func (m *AdResponse) String() string { return proto.CompactTextString(...
method ProtoMessage (line 1484) | func (*AdResponse) ProtoMessage() {}
method Descriptor (line 1485) | func (*AdResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1489) | func (m *AdResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1492) | func (m *AdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte...
method XXX_Merge (line 1495) | func (m *AdResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1498) | func (m *AdResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1501) | func (m *AdResponse) XXX_DiscardUnknown() {
method GetAds (line 1507) | func (m *AdResponse) GetAds() []*Ad {
type Ad (line 1514) | type Ad struct
method Reset (line 1524) | func (m *Ad) Reset() { *m = Ad{} }
method String (line 1525) | func (m *Ad) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1526) | func (*Ad) ProtoMessage() {}
method Descriptor (line 1527) | func (*Ad) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1531) | func (m *Ad) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1534) | func (m *Ad) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
method XXX_Merge (line 1537) | func (m *Ad) XXX_Merge(src proto.Message) {
method XXX_Size (line 1540) | func (m *Ad) XXX_Size() int {
method XXX_DiscardUnknown (line 1543) | func (m *Ad) XXX_DiscardUnknown() {
method GetRedirectUrl (line 1549) | func (m *Ad) GetRedirectUrl() string {
method GetText (line 1556) | func (m *Ad) GetText() string {
function init (line 1563) | func init() {
constant _ (line 1604) | _ = grpc.SupportPackageIsVersion4
type CartServiceClient (line 1609) | type CartServiceClient interface
type cartServiceClient (line 1615) | type cartServiceClient struct
method AddItem (line 1623) | func (c *cartServiceClient) AddItem(ctx context.Context, in *AddItemRe...
method GetCart (line 1632) | func (c *cartServiceClient) GetCart(ctx context.Context, in *GetCartRe...
method EmptyCart (line 1641) | func (c *cartServiceClient) EmptyCart(ctx context.Context, in *EmptyCa...
function NewCartServiceClient (line 1619) | func NewCartServiceClient(cc *grpc.ClientConn) CartServiceClient {
type CartServiceServer (line 1651) | type CartServiceServer interface
function RegisterCartServiceServer (line 1657) | func RegisterCartServiceServer(s *grpc.Server, srv CartServiceServer) {
function _CartService_AddItem_Handler (line 1661) | func _CartService_AddItem_Handler(srv interface{}, ctx context.Context, ...
function _CartService_GetCart_Handler (line 1679) | func _CartService_GetCart_Handler(srv interface{}, ctx context.Context, ...
function _CartService_EmptyCart_Handler (line 1697) | func _CartService_EmptyCart_Handler(srv interface{}, ctx context.Context...
type RecommendationServiceClient (line 1739) | type RecommendationServiceClient interface
type recommendationServiceClient (line 1743) | type recommendationServiceClient struct
method ListRecommendations (line 1751) | func (c *recommendationServiceClient) ListRecommendations(ctx context....
function NewRecommendationServiceClient (line 1747) | func NewRecommendationServiceClient(cc *grpc.ClientConn) RecommendationS...
type RecommendationServiceServer (line 1761) | type RecommendationServiceServer interface
function RegisterRecommendationServiceServer (line 1765) | func RegisterRecommendationServiceServer(s *grpc.Server, srv Recommendat...
function _RecommendationService_ListRecommendations_Handler (line 1769) | func _RecommendationService_ListRecommendations_Handler(srv interface{},...
type ProductCatalogServiceClient (line 1803) | type ProductCatalogServiceClient interface
type productCatalogServiceClient (line 1809) | type productCatalogServiceClient struct
method ListProducts (line 1817) | func (c *productCatalogServiceClient) ListProducts(ctx context.Context...
method GetProduct (line 1826) | func (c *productCatalogServiceClient) GetProduct(ctx context.Context, ...
method SearchProducts (line 1835) | func (c *productCatalogServiceClient) SearchProducts(ctx context.Conte...
function NewProductCatalogServiceClient (line 1813) | func NewProductCatalogServiceClient(cc *grpc.ClientConn) ProductCatalogS...
type ProductCatalogServiceServer (line 1845) | type ProductCatalogServiceServer interface
function RegisterProductCatalogServiceServer (line 1851) | func RegisterProductCatalogServiceServer(s *grpc.Server, srv ProductCata...
function _ProductCatalogService_ListProducts_Handler (line 1855) | func _ProductCatalogService_ListProducts_Handler(srv interface{}, ctx co...
function _ProductCatalogService_GetProduct_Handler (line 1873) | func _ProductCatalogService_GetProduct_Handler(srv interface{}, ctx cont...
function _ProductCatalogService_SearchProducts_Handler (line 1891) | func _ProductCatalogService_SearchProducts_Handler(srv interface{}, ctx ...
type ShippingServiceClient (line 1933) | type ShippingServiceClient interface
type shippingServiceClient (line 1938) | type shippingServiceClient struct
method GetQuote (line 1946) | func (c *shippingServiceClient) GetQuote(ctx context.Context, in *GetQ...
method ShipOrder (line 1955) | func (c *shippingServiceClient) ShipOrder(ctx context.Context, in *Shi...
function NewShippingServiceClient (line 1942) | func NewShippingServiceClient(cc *grpc.ClientConn) ShippingServiceClient {
type ShippingServiceServer (line 1965) | type ShippingServiceServer interface
function RegisterShippingServiceServer (line 1970) | func RegisterShippingServiceServer(s *grpc.Server, srv ShippingServiceSe...
function _ShippingService_GetQuote_Handler (line 1974) | func _ShippingService_GetQuote_Handler(srv interface{}, ctx context.Cont...
function _ShippingService_ShipOrder_Handler (line 1992) | func _ShippingService_ShipOrder_Handler(srv interface{}, ctx context.Con...
type CurrencyServiceClient (line 2030) | type CurrencyServiceClient interface
type currencyServiceClient (line 2035) | type currencyServiceClient struct
method GetSupportedCurrencies (line 2043) | func (c *currencyServiceClient) GetSupportedCurrencies(ctx context.Con...
method Convert (line 2052) | func (c *currencyServiceClient) Convert(ctx context.Context, in *Curre...
function NewCurrencyServiceClient (line 2039) | func NewCurrencyServiceClient(cc *grpc.ClientConn) CurrencyServiceClient {
type CurrencyServiceServer (line 2062) | type CurrencyServiceServer interface
function RegisterCurrencyServiceServer (line 2067) | func RegisterCurrencyServiceServer(s *grpc.Server, srv CurrencyServiceSe...
function _CurrencyService_GetSupportedCurrencies_Handler (line 2071) | func _CurrencyService_GetSupportedCurrencies_Handler(srv interface{}, ct...
function _CurrencyService_Convert_Handler (line 2089) | func _CurrencyService_Convert_Handler(srv interface{}, ctx context.Conte...
type PaymentServiceClient (line 2127) | type PaymentServiceClient interface
type paymentServiceClient (line 2131) | type paymentServiceClient struct
method Charge (line 2139) | func (c *paymentServiceClient) Charge(ctx context.Context, in *ChargeR...
function NewPaymentServiceClient (line 2135) | func NewPaymentServiceClient(cc *grpc.ClientConn) PaymentServiceClient {
type PaymentServiceServer (line 2149) | type PaymentServiceServer interface
function RegisterPaymentServiceServer (line 2153) | func RegisterPaymentServiceServer(s *grpc.Server, srv PaymentServiceServ...
function _PaymentService_Charge_Handler (line 2157) | func _PaymentService_Charge_Handler(srv interface{}, ctx context.Context...
type EmailServiceClient (line 2191) | type EmailServiceClient interface
type emailServiceClient (line 2195) | type emailServiceClient struct
method SendOrderConfirmation (line 2203) | func (c *emailServiceClient) SendOrderConfirmation(ctx context.Context...
function NewEmailServiceClient (line 2199) | func NewEmailServiceClient(cc *grpc.ClientConn) EmailServiceClient {
type EmailServiceServer (line 2213) | type EmailServiceServer interface
function RegisterEmailServiceServer (line 2217) | func RegisterEmailServiceServer(s *grpc.Server, srv EmailServiceServer) {
function _EmailService_SendOrderConfirmation_Handler (line 2221) | func _EmailService_SendOrderConfirmation_Handler(srv interface{}, ctx co...
type CheckoutServiceClient (line 2255) | type CheckoutServiceClient interface
type checkoutServiceClient (line 2259) | type checkoutServiceClient struct
method PlaceOrder (line 2267) | func (c *checkoutServiceClient) PlaceOrder(ctx context.Context, in *Pl...
function NewCheckoutServiceClient (line 2263) | func NewCheckoutServiceClient(cc *grpc.ClientConn) CheckoutServiceClient {
type CheckoutServiceServer (line 2277) | type CheckoutServiceServer interface
function RegisterCheckoutServiceServer (line 2281) | func RegisterCheckoutServiceServer(s *grpc.Server, srv CheckoutServiceSe...
function _CheckoutService_PlaceOrder_Handler (line 2285) | func _CheckoutService_PlaceOrder_Handler(srv interface{}, ctx context.Co...
type AdServiceClient (line 2319) | type AdServiceClient interface
type adServiceClient (line 2323) | type adServiceClient struct
method GetAds (line 2331) | func (c *adServiceClient) GetAds(ctx context.Context, in *AdRequest, o...
function NewAdServiceClient (line 2327) | func NewAdServiceClient(cc *grpc.ClientConn) AdServiceClient {
type AdServiceServer (line 2341) | type AdServiceServer interface
function RegisterAdServiceServer (line 2345) | func RegisterAdServiceServer(s *grpc.Server, srv AdServiceServer) {
function _AdService_GetAds_Handler (line 2349) | func _AdService_GetAds_Handler(srv interface{}, ctx context.Context, dec...
function init (line 2380) | func init() { proto.RegisterFile("demo.proto", fileDescriptor_ca53982754...
FILE: microservices-demo/src/productcatalogservice/server.go
function init (line 59) | func init() {
function main (line 77) | func main() {
function run (line 130) | func run(port string) string {
function initJaegerTracing (line 152) | func initJaegerTracing() {
function initStats (line 173) | func initStats(exporter *stackdriver.Exporter) {
function initStackdriverTracing (line 183) | func initStackdriverTracing() {
function initTracing (line 206) | func initTracing() {
function initProfiling (line 211) | func initProfiling(service, version string) {
type productCatalog (line 233) | type productCatalog struct
method Check (line 261) | func (p *productCatalog) Check(ctx context.Context, req *healthpb.Heal...
method Watch (line 265) | func (p *productCatalog) Watch(req *healthpb.HealthCheckRequest, ws he...
method ListProducts (line 269) | func (p *productCatalog) ListProducts(context.Context, *pb.Empty) (*pb...
method GetProduct (line 274) | func (p *productCatalog) GetProduct(ctx context.Context, req *pb.GetPr...
method SearchProducts (line 288) | func (p *productCatalog) SearchProducts(ctx context.Context, req *pb.S...
function readCatalogFile (line 235) | func readCatalogFile(catalog *pb.ListProductsResponse) error {
function parseCatalog (line 251) | func parseCatalog() []*pb.Product {
FILE: microservices-demo/src/productcatalogservice/server_test.go
function TestServer (line 30) | func TestServer(t *testing.T) {
FILE: microservices-demo/src/recommendationservice/demo_pb2_grpc.py
class CartServiceStub (line 21) | class CartServiceStub(object):
method __init__ (line 26) | def __init__(self, channel):
class CartServiceServicer (line 49) | class CartServiceServicer(object):
method AddItem (line 54) | def AddItem(self, request, context):
method GetCart (line 61) | def GetCart(self, request, context):
method EmptyCart (line 68) | def EmptyCart(self, request, context):
function add_CartServiceServicer_to_server (line 76) | def add_CartServiceServicer_to_server(servicer, server):
class RecommendationServiceStub (line 99) | class RecommendationServiceStub(object):
method __init__ (line 104) | def __init__(self, channel):
class RecommendationServiceServicer (line 117) | class RecommendationServiceServicer(object):
method ListRecommendations (line 122) | def ListRecommendations(self, request, context):
function add_RecommendationServiceServicer_to_server (line 130) | def add_RecommendationServiceServicer_to_server(servicer, server):
class ProductCatalogServiceStub (line 143) | class ProductCatalogServiceStub(object):
method __init__ (line 148) | def __init__(self, channel):
class ProductCatalogServiceServicer (line 171) | class ProductCatalogServiceServicer(object):
method ListProducts (line 176) | def ListProducts(self, request, context):
method GetProduct (line 183) | def GetProduct(self, request, context):
method SearchProducts (line 190) | def SearchProducts(self, request, context):
function add_ProductCatalogServiceServicer_to_server (line 198) | def add_ProductCatalogServiceServicer_to_server(servicer, server):
class ShippingServiceStub (line 221) | class ShippingServiceStub(object):
method __init__ (line 226) | def __init__(self, channel):
class ShippingServiceServicer (line 244) | class ShippingServiceServicer(object):
method GetQuote (line 249) | def GetQuote(self, request, context):
method ShipOrder (line 256) | def ShipOrder(self, request, context):
function add_ShippingServiceServicer_to_server (line 264) | def add_ShippingServiceServicer_to_server(servicer, server):
class CurrencyServiceStub (line 282) | class CurrencyServiceStub(object):
method __init__ (line 287) | def __init__(self, channel):
class CurrencyServiceServicer (line 305) | class CurrencyServiceServicer(object):
method GetSupportedCurrencies (line 310) | def GetSupportedCurrencies(self, request, context):
method Convert (line 317) | def Convert(self, request, context):
function add_CurrencyServiceServicer_to_server (line 325) | def add_CurrencyServiceServicer_to_server(servicer, server):
class PaymentServiceStub (line 343) | class PaymentServiceStub(object):
method __init__ (line 348) | def __init__(self, channel):
class PaymentServiceServicer (line 361) | class PaymentServiceServicer(object):
method Charge (line 366) | def Charge(self, request, context):
function add_PaymentServiceServicer_to_server (line 374) | def add_PaymentServiceServicer_to_server(servicer, server):
class EmailServiceStub (line 387) | class EmailServiceStub(object):
method __init__ (line 392) | def __init__(self, channel):
class EmailServiceServicer (line 405) | class EmailServiceServicer(object):
method SendOrderConfirmation (line 410) | def SendOrderConfirmation(self, request, context):
function add_EmailServiceServicer_to_server (line 418) | def add_EmailServiceServicer_to_server(servicer, server):
class CheckoutServiceStub (line 431) | class CheckoutServiceStub(object):
method __init__ (line 436) | def __init__(self, channel):
class CheckoutServiceServicer (line 449) | class CheckoutServiceServicer(object):
method PlaceOrder (line 454) | def PlaceOrder(self, request, context):
function add_CheckoutServiceServicer_to_server (line 462) | def add_CheckoutServiceServicer_to_server(servicer, server):
class AdsServiceStub (line 475) | class AdsServiceStub(object):
method __init__ (line 480) | def __init__(self, channel):
class AdsServiceServicer (line 493) | class AdsServiceServicer(object):
method GetAds (line 498) | def GetAds(self, request, context):
function add_AdsServiceServicer_to_server (line 506) | def add_AdsServiceServicer_to_server(servicer, server):
FILE: microservices-demo/src/recommendationservice/logger.py
class CustomJsonFormatter (line 23) | class CustomJsonFormatter(jsonlogger.JsonFormatter):
method add_fields (line 24) | def add_fields(self, log_record, record, message_dict):
function getJSONLogger (line 33) | def getJSONLogger(name):
FILE: microservices-demo/src/recommendationservice/recommendation_server.py
function initStackdriverProfiling (line 40) | def initStackdriverProfiling():
class RecommendationService (line 65) | class RecommendationService(demo_pb2_grpc.RecommendationServiceServicer):
method ListRecommendations (line 66) | def ListRecommendations(self, request, context):
method Check (line 84) | def Check(self, request, context):
method Watch (line 88) | def Watch(self, request, context):
FILE: microservices-demo/src/recommendationservice/tests/test_sample.py
function func (line 1) | def func(x):
function test_answer (line 5) | def test_answer():
FILE: microservices-demo/src/shippingservice/genproto/demo.pb.go
constant _ (line 40) | _ = proto.ProtoPackageIsVersion2
type CartItem (line 42) | type CartItem struct
method Reset (line 50) | func (m *CartItem) Reset() { *m = CartItem{} }
method String (line 51) | func (m *CartItem) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 52) | func (*CartItem) ProtoMessage() {}
method Descriptor (line 53) | func (*CartItem) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 57) | func (m *CartItem) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 60) | func (m *CartItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, ...
method XXX_Merge (line 63) | func (m *CartItem) XXX_Merge(src proto.Message) {
method XXX_Size (line 66) | func (m *CartItem) XXX_Size() int {
method XXX_DiscardUnknown (line 69) | func (m *CartItem) XXX_DiscardUnknown() {
method GetProductId (line 75) | func (m *CartItem) GetProductId() string {
method GetQuantity (line 82) | func (m *CartItem) GetQuantity() int32 {
type AddItemRequest (line 89) | type AddItemRequest struct
method Reset (line 97) | func (m *AddItemRequest) Reset() { *m = AddItemRequest{} }
method String (line 98) | func (m *AddItemRequest) String() string { return proto.CompactTextStr...
method ProtoMessage (line 99) | func (*AddItemRequest) ProtoMessage() {}
method Descriptor (line 100) | func (*AddItemRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 104) | func (m *AddItemRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 107) | func (m *AddItemRequest) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 110) | func (m *AddItemRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 113) | func (m *AddItemRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 116) | func (m *AddItemRequest) XXX_DiscardUnknown() {
method GetUserId (line 122) | func (m *AddItemRequest) GetUserId() string {
method GetItem (line 129) | func (m *AddItemRequest) GetItem() *CartItem {
type EmptyCartRequest (line 136) | type EmptyCartRequest struct
method Reset (line 143) | func (m *EmptyCartRequest) Reset() { *m = EmptyCartRequest{} }
method String (line 144) | func (m *EmptyCartRequest) String() string { return proto.CompactTextS...
method ProtoMessage (line 145) | func (*EmptyCartRequest) ProtoMessage() {}
method Descriptor (line 146) | func (*EmptyCartRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 150) | func (m *EmptyCartRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 153) | func (m *EmptyCartRequest) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 156) | func (m *EmptyCartRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 159) | func (m *EmptyCartRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 162) | func (m *EmptyCartRequest) XXX_DiscardUnknown() {
method GetUserId (line 168) | func (m *EmptyCartRequest) GetUserId() string {
type GetCartRequest (line 175) | type GetCartRequest struct
method Reset (line 182) | func (m *GetCartRequest) Reset() { *m = GetCartRequest{} }
method String (line 183) | func (m *GetCartRequest) String() string { return proto.CompactTextStr...
method ProtoMessage (line 184) | func (*GetCartRequest) ProtoMessage() {}
method Descriptor (line 185) | func (*GetCartRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 189) | func (m *GetCartRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 192) | func (m *GetCartRequest) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 195) | func (m *GetCartRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 198) | func (m *GetCartRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 201) | func (m *GetCartRequest) XXX_DiscardUnknown() {
method GetUserId (line 207) | func (m *GetCartRequest) GetUserId() string {
type Cart (line 214) | type Cart struct
method Reset (line 222) | func (m *Cart) Reset() { *m = Cart{} }
method String (line 223) | func (m *Cart) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 224) | func (*Cart) ProtoMessage() {}
method Descriptor (line 225) | func (*Cart) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 229) | func (m *Cart) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 232) | func (m *Cart) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro...
method XXX_Merge (line 235) | func (m *Cart) XXX_Merge(src proto.Message) {
method XXX_Size (line 238) | func (m *Cart) XXX_Size() int {
method XXX_DiscardUnknown (line 241) | func (m *Cart) XXX_DiscardUnknown() {
method GetUserId (line 247) | func (m *Cart) GetUserId() string {
method GetItems (line 254) | func (m *Cart) GetItems() []*CartItem {
type Empty (line 261) | type Empty struct
method Reset (line 267) | func (m *Empty) Reset() { *m = Empty{} }
method String (line 268) | func (m *Empty) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 269) | func (*Empty) ProtoMessage() {}
method Descriptor (line 270) | func (*Empty) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 274) | func (m *Empty) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 277) | func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, err...
method XXX_Merge (line 280) | func (m *Empty) XXX_Merge(src proto.Message) {
method XXX_Size (line 283) | func (m *Empty) XXX_Size() int {
method XXX_DiscardUnknown (line 286) | func (m *Empty) XXX_DiscardUnknown() {
type ListRecommendationsRequest (line 292) | type ListRecommendationsRequest struct
method Reset (line 300) | func (m *ListRecommendationsRequest) Reset() { *m = ListRecomm...
method String (line 301) | func (m *ListRecommendationsRequest) String() string { return proto.Co...
method ProtoMessage (line 302) | func (*ListRecommendationsRequest) ProtoMessage() {}
method Descriptor (line 303) | func (*ListRecommendationsRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 307) | func (m *ListRecommendationsRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 310) | func (m *ListRecommendationsRequest) XXX_Marshal(b []byte, determinist...
method XXX_Merge (line 313) | func (m *ListRecommendationsRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 316) | func (m *ListRecommendationsRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 319) | func (m *ListRecommendationsRequest) XXX_DiscardUnknown() {
method GetUserId (line 325) | func (m *ListRecommendationsRequest) GetUserId() string {
method GetProductIds (line 332) | func (m *ListRecommendationsRequest) GetProductIds() []string {
type ListRecommendationsResponse (line 339) | type ListRecommendationsResponse struct
method Reset (line 346) | func (m *ListRecommendationsResponse) Reset() { *m = ListRecom...
method String (line 347) | func (m *ListRecommendationsResponse) String() string { return proto.C...
method ProtoMessage (line 348) | func (*ListRecommendationsResponse) ProtoMessage() {}
method Descriptor (line 349) | func (*ListRecommendationsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 353) | func (m *ListRecommendationsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 356) | func (m *ListRecommendationsResponse) XXX_Marshal(b []byte, determinis...
method XXX_Merge (line 359) | func (m *ListRecommendationsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 362) | func (m *ListRecommendationsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 365) | func (m *ListRecommendationsResponse) XXX_DiscardUnknown() {
method GetProductIds (line 371) | func (m *ListRecommendationsResponse) GetProductIds() []string {
type Product (line 378) | type Product struct
method Reset (line 392) | func (m *Product) Reset() { *m = Product{} }
method String (line 393) | func (m *Product) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 394) | func (*Product) ProtoMessage() {}
method Descriptor (line 395) | func (*Product) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 399) | func (m *Product) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 402) | func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, e...
method XXX_Merge (line 405) | func (m *Product) XXX_Merge(src proto.Message) {
method XXX_Size (line 408) | func (m *Product) XXX_Size() int {
method XXX_DiscardUnknown (line 411) | func (m *Product) XXX_DiscardUnknown() {
method GetId (line 417) | func (m *Product) GetId() string {
method GetName (line 424) | func (m *Product) GetName() string {
method GetDescription (line 431) | func (m *Product) GetDescription() string {
method GetPicture (line 438) | func (m *Product) GetPicture() string {
method GetPriceUsd (line 445) | func (m *Product) GetPriceUsd() *Money {
method GetCategories (line 452) | func (m *Product) GetCategories() []string {
type ListProductsResponse (line 459) | type ListProductsResponse struct
method Reset (line 466) | func (m *ListProductsResponse) Reset() { *m = ListProductsResp...
method String (line 467) | func (m *ListProductsResponse) String() string { return proto.CompactT...
method ProtoMessage (line 468) | func (*ListProductsResponse) ProtoMessage() {}
method Descriptor (line 469) | func (*ListProductsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 473) | func (m *ListProductsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 476) | func (m *ListProductsResponse) XXX_Marshal(b []byte, deterministic boo...
method XXX_Merge (line 479) | func (m *ListProductsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 482) | func (m *ListProductsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 485) | func (m *ListProductsResponse) XXX_DiscardUnknown() {
method GetProducts (line 491) | func (m *ListProductsResponse) GetProducts() []*Product {
type GetProductRequest (line 498) | type GetProductRequest struct
method Reset (line 505) | func (m *GetProductRequest) Reset() { *m = GetProductRequest{} }
method String (line 506) | func (m *GetProductRequest) String() string { return proto.CompactText...
method ProtoMessage (line 507) | func (*GetProductRequest) ProtoMessage() {}
method Descriptor (line 508) | func (*GetProductRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 512) | func (m *GetProductRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 515) | func (m *GetProductRequest) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 518) | func (m *GetProductRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 521) | func (m *GetProductRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 524) | func (m *GetProductRequest) XXX_DiscardUnknown() {
method GetId (line 530) | func (m *GetProductRequest) GetId() string {
type SearchProductsRequest (line 537) | type SearchProductsRequest struct
method Reset (line 544) | func (m *SearchProductsRequest) Reset() { *m = SearchProductsR...
method String (line 545) | func (m *SearchProductsRequest) String() string { return proto.Compact...
method ProtoMessage (line 546) | func (*SearchProductsRequest) ProtoMessage() {}
method Descriptor (line 547) | func (*SearchProductsRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 551) | func (m *SearchProductsRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 554) | func (m *SearchProductsRequest) XXX_Marshal(b []byte, deterministic bo...
method XXX_Merge (line 557) | func (m *SearchProductsRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 560) | func (m *SearchProductsRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 563) | func (m *SearchProductsRequest) XXX_DiscardUnknown() {
method GetQuery (line 569) | func (m *SearchProductsRequest) GetQuery() string {
type SearchProductsResponse (line 576) | type SearchProductsResponse struct
method Reset (line 583) | func (m *SearchProductsResponse) Reset() { *m = SearchProducts...
method String (line 584) | func (m *SearchProductsResponse) String() string { return proto.Compac...
method ProtoMessage (line 585) | func (*SearchProductsResponse) ProtoMessage() {}
method Descriptor (line 586) | func (*SearchProductsResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 590) | func (m *SearchProductsResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 593) | func (m *SearchProductsResponse) XXX_Marshal(b []byte, deterministic b...
method XXX_Merge (line 596) | func (m *SearchProductsResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 599) | func (m *SearchProductsResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 602) | func (m *SearchProductsResponse) XXX_DiscardUnknown() {
method GetResults (line 608) | func (m *SearchProductsResponse) GetResults() []*Product {
type GetQuoteRequest (line 615) | type GetQuoteRequest struct
method Reset (line 623) | func (m *GetQuoteRequest) Reset() { *m = GetQuoteRequest{} }
method String (line 624) | func (m *GetQuoteRequest) String() string { return proto.CompactTextSt...
method ProtoMessage (line 625) | func (*GetQuoteRequest) ProtoMessage() {}
method Descriptor (line 626) | func (*GetQuoteRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 630) | func (m *GetQuoteRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 633) | func (m *GetQuoteRequest) XXX_Marshal(b []byte, deterministic bool) ([...
method XXX_Merge (line 636) | func (m *GetQuoteRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 639) | func (m *GetQuoteRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 642) | func (m *GetQuoteRequest) XXX_DiscardUnknown() {
method GetAddress (line 648) | func (m *GetQuoteRequest) GetAddress() *Address {
method GetItems (line 655) | func (m *GetQuoteRequest) GetItems() []*CartItem {
type GetQuoteResponse (line 662) | type GetQuoteResponse struct
method Reset (line 669) | func (m *GetQuoteResponse) Reset() { *m = GetQuoteResponse{} }
method String (line 670) | func (m *GetQuoteResponse) String() string { return proto.CompactTextS...
method ProtoMessage (line 671) | func (*GetQuoteResponse) ProtoMessage() {}
method Descriptor (line 672) | func (*GetQuoteResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 676) | func (m *GetQuoteResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 679) | func (m *GetQuoteResponse) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 682) | func (m *GetQuoteResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 685) | func (m *GetQuoteResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 688) | func (m *GetQuoteResponse) XXX_DiscardUnknown() {
method GetCostUsd (line 694) | func (m *GetQuoteResponse) GetCostUsd() *Money {
type ShipOrderRequest (line 701) | type ShipOrderRequest struct
method Reset (line 709) | func (m *ShipOrderRequest) Reset() { *m = ShipOrderRequest{} }
method String (line 710) | func (m *ShipOrderRequest) String() string { return proto.CompactTextS...
method ProtoMessage (line 711) | func (*ShipOrderRequest) ProtoMessage() {}
method Descriptor (line 712) | func (*ShipOrderRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 716) | func (m *ShipOrderRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 719) | func (m *ShipOrderRequest) XXX_Marshal(b []byte, deterministic bool) (...
method XXX_Merge (line 722) | func (m *ShipOrderRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 725) | func (m *ShipOrderRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 728) | func (m *ShipOrderRequest) XXX_DiscardUnknown() {
method GetAddress (line 734) | func (m *ShipOrderRequest) GetAddress() *Address {
method GetItems (line 741) | func (m *ShipOrderRequest) GetItems() []*CartItem {
type ShipOrderResponse (line 748) | type ShipOrderResponse struct
method Reset (line 755) | func (m *ShipOrderResponse) Reset() { *m = ShipOrderResponse{} }
method String (line 756) | func (m *ShipOrderResponse) String() string { return proto.CompactText...
method ProtoMessage (line 757) | func (*ShipOrderResponse) ProtoMessage() {}
method Descriptor (line 758) | func (*ShipOrderResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 762) | func (m *ShipOrderResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 765) | func (m *ShipOrderResponse) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 768) | func (m *ShipOrderResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 771) | func (m *ShipOrderResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 774) | func (m *ShipOrderResponse) XXX_DiscardUnknown() {
method GetTrackingId (line 780) | func (m *ShipOrderResponse) GetTrackingId() string {
type Address (line 787) | type Address struct
method Reset (line 798) | func (m *Address) Reset() { *m = Address{} }
method String (line 799) | func (m *Address) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 800) | func (*Address) ProtoMessage() {}
method Descriptor (line 801) | func (*Address) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 805) | func (m *Address) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 808) | func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, e...
method XXX_Merge (line 811) | func (m *Address) XXX_Merge(src proto.Message) {
method XXX_Size (line 814) | func (m *Address) XXX_Size() int {
method XXX_DiscardUnknown (line 817) | func (m *Address) XXX_DiscardUnknown() {
method GetStreetAddress (line 823) | func (m *Address) GetStreetAddress() string {
method GetCity (line 830) | func (m *Address) GetCity() string {
method GetState (line 837) | func (m *Address) GetState() string {
method GetCountry (line 844) | func (m *Address) GetCountry() string {
method GetZipCode (line 851) | func (m *Address) GetZipCode() int32 {
type Money (line 859) | type Money struct
method Reset (line 877) | func (m *Money) Reset() { *m = Money{} }
method String (line 878) | func (m *Money) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 879) | func (*Money) ProtoMessage() {}
method Descriptor (line 880) | func (*Money) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 884) | func (m *Money) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 887) | func (m *Money) XXX_Marshal(b []byte, deterministic bool) ([]byte, err...
method XXX_Merge (line 890) | func (m *Money) XXX_Merge(src proto.Message) {
method XXX_Size (line 893) | func (m *Money) XXX_Size() int {
method XXX_DiscardUnknown (line 896) | func (m *Money) XXX_DiscardUnknown() {
method GetCurrencyCode (line 902) | func (m *Money) GetCurrencyCode() string {
method GetUnits (line 909) | func (m *Money) GetUnits() int64 {
method GetNanos (line 916) | func (m *Money) GetNanos() int32 {
type GetSupportedCurrenciesResponse (line 923) | type GetSupportedCurrenciesResponse struct
method Reset (line 931) | func (m *GetSupportedCurrenciesResponse) Reset() { *m = GetSup...
method String (line 932) | func (m *GetSupportedCurrenciesResponse) String() string { return prot...
method ProtoMessage (line 933) | func (*GetSupportedCurrenciesResponse) ProtoMessage() {}
method Descriptor (line 934) | func (*GetSupportedCurrenciesResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 938) | func (m *GetSupportedCurrenciesResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 941) | func (m *GetSupportedCurrenciesResponse) XXX_Marshal(b []byte, determi...
method XXX_Merge (line 944) | func (m *GetSupportedCurrenciesResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 947) | func (m *GetSupportedCurrenciesResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 950) | func (m *GetSupportedCurrenciesResponse) XXX_DiscardUnknown() {
method GetCurrencyCodes (line 956) | func (m *GetSupportedCurrenciesResponse) GetCurrencyCodes() []string {
type CurrencyConversionRequest (line 963) | type CurrencyConversionRequest struct
method Reset (line 972) | func (m *CurrencyConversionRequest) Reset() { *m = CurrencyCon...
method String (line 973) | func (m *CurrencyConversionRequest) String() string { return proto.Com...
method ProtoMessage (line 974) | func (*CurrencyConversionRequest) ProtoMessage() {}
method Descriptor (line 975) | func (*CurrencyConversionRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 979) | func (m *CurrencyConversionRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 982) | func (m *CurrencyConversionRequest) XXX_Marshal(b []byte, deterministi...
method XXX_Merge (line 985) | func (m *CurrencyConversionRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 988) | func (m *CurrencyConversionRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 991) | func (m *CurrencyConversionRequest) XXX_DiscardUnknown() {
method GetFrom (line 997) | func (m *CurrencyConversionRequest) GetFrom() *Money {
method GetToCode (line 1004) | func (m *CurrencyConversionRequest) GetToCode() string {
type CreditCardInfo (line 1011) | type CreditCardInfo struct
method Reset (line 1021) | func (m *CreditCardInfo) Reset() { *m = CreditCardInfo{} }
method String (line 1022) | func (m *CreditCardInfo) String() string { return proto.CompactTextStr...
method ProtoMessage (line 1023) | func (*CreditCardInfo) ProtoMessage() {}
method Descriptor (line 1024) | func (*CreditCardInfo) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1028) | func (m *CreditCardInfo) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1031) | func (m *CreditCardInfo) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 1034) | func (m *CreditCardInfo) XXX_Merge(src proto.Message) {
method XXX_Size (line 1037) | func (m *CreditCardInfo) XXX_Size() int {
method XXX_DiscardUnknown (line 1040) | func (m *CreditCardInfo) XXX_DiscardUnknown() {
method GetCreditCardNumber (line 1046) | func (m *CreditCardInfo) GetCreditCardNumber() string {
method GetCreditCardCvv (line 1053) | func (m *CreditCardInfo) GetCreditCardCvv() int32 {
method GetCreditCardExpirationYear (line 1060) | func (m *CreditCardInfo) GetCreditCardExpirationYear() int32 {
method GetCreditCardExpirationMonth (line 1067) | func (m *CreditCardInfo) GetCreditCardExpirationMonth() int32 {
type ChargeRequest (line 1074) | type ChargeRequest struct
method Reset (line 1082) | func (m *ChargeRequest) Reset() { *m = ChargeRequest{} }
method String (line 1083) | func (m *ChargeRequest) String() string { return proto.CompactTextStri...
method ProtoMessage (line 1084) | func (*ChargeRequest) ProtoMessage() {}
method Descriptor (line 1085) | func (*ChargeRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1089) | func (m *ChargeRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1092) | func (m *ChargeRequest) XXX_Marshal(b []byte, deterministic bool) ([]b...
method XXX_Merge (line 1095) | func (m *ChargeRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1098) | func (m *ChargeRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1101) | func (m *ChargeRequest) XXX_DiscardUnknown() {
method GetAmount (line 1107) | func (m *ChargeRequest) GetAmount() *Money {
method GetCreditCard (line 1114) | func (m *ChargeRequest) GetCreditCard() *CreditCardInfo {
type ChargeResponse (line 1121) | type ChargeResponse struct
method Reset (line 1128) | func (m *ChargeResponse) Reset() { *m = ChargeResponse{} }
method String (line 1129) | func (m *ChargeResponse) String() string { return proto.CompactTextStr...
method ProtoMessage (line 1130) | func (*ChargeResponse) ProtoMessage() {}
method Descriptor (line 1131) | func (*ChargeResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1135) | func (m *ChargeResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1138) | func (m *ChargeResponse) XXX_Marshal(b []byte, deterministic bool) ([]...
method XXX_Merge (line 1141) | func (m *ChargeResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1144) | func (m *ChargeResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1147) | func (m *ChargeResponse) XXX_DiscardUnknown() {
method GetTransactionId (line 1153) | func (m *ChargeResponse) GetTransactionId() string {
type OrderItem (line 1160) | type OrderItem struct
method Reset (line 1168) | func (m *OrderItem) Reset() { *m = OrderItem{} }
method String (line 1169) | func (m *OrderItem) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1170) | func (*OrderItem) ProtoMessage() {}
method Descriptor (line 1171) | func (*OrderItem) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1175) | func (m *OrderItem) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1178) | func (m *OrderItem) XXX_Marshal(b []byte, deterministic bool) ([]byte,...
method XXX_Merge (line 1181) | func (m *OrderItem) XXX_Merge(src proto.Message) {
method XXX_Size (line 1184) | func (m *OrderItem) XXX_Size() int {
method XXX_DiscardUnknown (line 1187) | func (m *OrderItem) XXX_DiscardUnknown() {
method GetItem (line 1193) | func (m *OrderItem) GetItem() *CartItem {
method GetCost (line 1200) | func (m *OrderItem) GetCost() *Money {
type OrderResult (line 1207) | type OrderResult struct
method Reset (line 1218) | func (m *OrderResult) Reset() { *m = OrderResult{} }
method String (line 1219) | func (m *OrderResult) String() string { return proto.CompactTextString...
method ProtoMessage (line 1220) | func (*OrderResult) ProtoMessage() {}
method Descriptor (line 1221) | func (*OrderResult) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1225) | func (m *OrderResult) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1228) | func (m *OrderResult) XXX_Marshal(b []byte, deterministic bool) ([]byt...
method XXX_Merge (line 1231) | func (m *OrderResult) XXX_Merge(src proto.Message) {
method XXX_Size (line 1234) | func (m *OrderResult) XXX_Size() int {
method XXX_DiscardUnknown (line 1237) | func (m *OrderResult) XXX_DiscardUnknown() {
method GetOrderId (line 1243) | func (m *OrderResult) GetOrderId() string {
method GetShippingTrackingId (line 1250) | func (m *OrderResult) GetShippingTrackingId() string {
method GetShippingCost (line 1257) | func (m *OrderResult) GetShippingCost() *Money {
method GetShippingAddress (line 1264) | func (m *OrderResult) GetShippingAddress() *Address {
method GetItems (line 1271) | func (m *OrderResult) GetItems() []*OrderItem {
type SendOrderConfirmationRequest (line 1278) | type SendOrderConfirmationRequest struct
method Reset (line 1286) | func (m *SendOrderConfirmationRequest) Reset() { *m = SendOrde...
method String (line 1287) | func (m *SendOrderConfirmationRequest) String() string { return proto....
method ProtoMessage (line 1288) | func (*SendOrderConfirmationRequest) ProtoMessage() {}
method Descriptor (line 1289) | func (*SendOrderConfirmationRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1293) | func (m *SendOrderConfirmationRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1296) | func (m *SendOrderConfirmationRequest) XXX_Marshal(b []byte, determini...
method XXX_Merge (line 1299) | func (m *SendOrderConfirmationRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1302) | func (m *SendOrderConfirmationRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1305) | func (m *SendOrderConfirmationRequest) XXX_DiscardUnknown() {
method GetEmail (line 1311) | func (m *SendOrderConfirmationRequest) GetEmail() string {
method GetOrder (line 1318) | func (m *SendOrderConfirmationRequest) GetOrder() *OrderResult {
type PlaceOrderRequest (line 1325) | type PlaceOrderRequest struct
method Reset (line 1336) | func (m *PlaceOrderRequest) Reset() { *m = PlaceOrderRequest{} }
method String (line 1337) | func (m *PlaceOrderRequest) String() string { return proto.CompactText...
method ProtoMessage (line 1338) | func (*PlaceOrderRequest) ProtoMessage() {}
method Descriptor (line 1339) | func (*PlaceOrderRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1343) | func (m *PlaceOrderRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1346) | func (m *PlaceOrderRequest) XXX_Marshal(b []byte, deterministic bool) ...
method XXX_Merge (line 1349) | func (m *PlaceOrderRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1352) | func (m *PlaceOrderRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1355) | func (m *PlaceOrderRequest) XXX_DiscardUnknown() {
method GetUserId (line 1361) | func (m *PlaceOrderRequest) GetUserId() string {
method GetUserCurrency (line 1368) | func (m *PlaceOrderRequest) GetUserCurrency() string {
method GetAddress (line 1375) | func (m *PlaceOrderRequest) GetAddress() *Address {
method GetEmail (line 1382) | func (m *PlaceOrderRequest) GetEmail() string {
method GetCreditCard (line 1389) | func (m *PlaceOrderRequest) GetCreditCard() *CreditCardInfo {
type PlaceOrderResponse (line 1396) | type PlaceOrderResponse struct
method Reset (line 1403) | func (m *PlaceOrderResponse) Reset() { *m = PlaceOrderResponse...
method String (line 1404) | func (m *PlaceOrderResponse) String() string { return proto.CompactTex...
method ProtoMessage (line 1405) | func (*PlaceOrderResponse) ProtoMessage() {}
method Descriptor (line 1406) | func (*PlaceOrderResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1410) | func (m *PlaceOrderResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1413) | func (m *PlaceOrderResponse) XXX_Marshal(b []byte, deterministic bool)...
method XXX_Merge (line 1416) | func (m *PlaceOrderResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1419) | func (m *PlaceOrderResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1422) | func (m *PlaceOrderResponse) XXX_DiscardUnknown() {
method GetOrder (line 1428) | func (m *PlaceOrderResponse) GetOrder() *OrderResult {
type AdRequest (line 1435) | type AdRequest struct
method Reset (line 1443) | func (m *AdRequest) Reset() { *m = AdRequest{} }
method String (line 1444) | func (m *AdRequest) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1445) | func (*AdRequest) ProtoMessage() {}
method Descriptor (line 1446) | func (*AdRequest) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1450) | func (m *AdRequest) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1453) | func (m *AdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte,...
method XXX_Merge (line 1456) | func (m *AdRequest) XXX_Merge(src proto.Message) {
method XXX_Size (line 1459) | func (m *AdRequest) XXX_Size() int {
method XXX_DiscardUnknown (line 1462) | func (m *AdRequest) XXX_DiscardUnknown() {
method GetContextKeys (line 1468) | func (m *AdRequest) GetContextKeys() []string {
type AdResponse (line 1475) | type AdResponse struct
method Reset (line 1482) | func (m *AdResponse) Reset() { *m = AdResponse{} }
method String (line 1483) | func (m *AdResponse) String() string { return proto.CompactTextString(...
method ProtoMessage (line 1484) | func (*AdResponse) ProtoMessage() {}
method Descriptor (line 1485) | func (*AdResponse) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1489) | func (m *AdResponse) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1492) | func (m *AdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte...
method XXX_Merge (line 1495) | func (m *AdResponse) XXX_Merge(src proto.Message) {
method XXX_Size (line 1498) | func (m *AdResponse) XXX_Size() int {
method XXX_DiscardUnknown (line 1501) | func (m *AdResponse) XXX_DiscardUnknown() {
method GetAds (line 1507) | func (m *AdResponse) GetAds() []*Ad {
type Ad (line 1514) | type Ad struct
method Reset (line 1524) | func (m *Ad) Reset() { *m = Ad{} }
method String (line 1525) | func (m *Ad) String() string { return proto.CompactTextString(m) }
method ProtoMessage (line 1526) | func (*Ad) ProtoMessage() {}
method Descriptor (line 1527) | func (*Ad) Descriptor() ([]byte, []int) {
method XXX_Unmarshal (line 1531) | func (m *Ad) XXX_Unmarshal(b []byte) error {
method XXX_Marshal (line 1534) | func (m *Ad) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
method XXX_Merge (line 1537) | func (m *Ad) XXX_Merge(src proto.Message) {
method XXX_Size (line 1540) | func (m *Ad) XXX_Size() int {
method XXX_DiscardUnknown (line 1543) | func (m *Ad) XXX_DiscardUnknown() {
method GetRedirectUrl (line 1549) | func (m *Ad) GetRedirectUrl() string {
method GetText (line 1556) | func (m *Ad) GetText() string {
function init (line 1563) | func init() {
constant _ (line 1604) | _ = grpc.SupportPackageIsVersion4
type CartServiceClient (line 1609) | type CartServiceClient interface
type cartServiceClient (line 1615) | type cartServiceClient struct
method AddItem (line 1623) | func (c *cartServiceClient) AddItem(ctx context.Context, in *AddItemRe...
method GetCart (line 1632) | func (c *cartServiceClient) GetCart(ctx context.Context, in *GetCartRe...
method EmptyCart (line 1641) | func (c *cartServiceClient) EmptyCart(ctx context.Context, in *EmptyCa...
function NewCartServiceClient (line 1619) | func NewCartServiceClient(cc *grpc.ClientConn) CartServiceClient {
type CartServiceServer (line 1651) | type CartServiceServer interface
function RegisterCartServiceServer (line 1657) | func RegisterCartServiceServer(s *grpc.Server, srv CartServiceServer) {
function _CartService_AddItem_Handler (line 1661) | func _CartService_AddItem_Handler(srv interface{}, ctx context.Context, ...
function _CartService_GetCart_Handler (line 1679) | func _CartService_GetCart_Handler(srv interface{}, ctx context.Context, ...
function _CartService_EmptyCart_Handler (line 1697) | func _CartService_EmptyCart_Handler(srv interface{}, ctx context.Context...
type RecommendationServiceClient (line 1739) | type RecommendationServiceClient interface
type recommendationServiceClient (line 1743) | type recommendationServiceClient struct
method ListRecommendations (line 1751) | func (c *recommendationServiceClient) ListRecommendations(ctx context....
function NewRecommendationServiceClient (line 1747) | func NewRecommendationServiceClient(cc *grpc.ClientConn) RecommendationS...
type RecommendationServiceServer (line 1761) | type RecommendationServiceServer interface
function RegisterRecommendationServiceServer (line 1765) | func RegisterRecommendationServiceServer(s *grpc.Server, srv Recommendat...
function _RecommendationService_ListRecommendations_Handler (line 1769) | func _RecommendationService_ListRecommendations_Handler(srv interface{},...
type ProductCatalogServiceClient (line 1803) | type ProductCatalogServiceClient interface
type productCatalogServiceClient (line 1809) | type productCatalogServiceClient struct
method ListProducts (line 1817) | func (c *productCatalogServiceClient) ListProducts(ctx context.Context...
method GetProduct (line 1826) | func (c *productCatalogServiceClient) GetProduct(ctx context.Context, ...
method SearchProducts (line 1835) | func (c *productCatalogServiceClient) SearchProducts(ctx context.Conte...
function NewProductCatalogServiceClient (line 1813) | func NewProductCatalogServiceClient(cc *grpc.ClientConn) ProductCatalogS...
type ProductCatalogServiceServer (line 1845) | type ProductCatalogServiceServer interface
function RegisterProductCatalogServiceServer (line 1851) | func RegisterProductCatalogServiceServer(s *grpc.Server, srv ProductCata...
function _ProductCatalogService_ListProducts_Handler (line 1855) | func _ProductCatalogService_ListProducts_Handler(srv interface{}, ctx co...
function _ProductCatalogService_GetProduct_Handler (line 1873) | func _ProductCatalogService_GetProduct_Handler(srv interface{}, ctx cont...
function _ProductCatalogService_SearchProducts_Handler (line 1891) | func _ProductCatalogService_SearchProducts_Handler(srv interface{}, ctx ...
type ShippingServiceClient (line 1933) | type ShippingServiceClient interface
type shippingServiceClient (line 1938) | type shippingServiceClient struct
method GetQuote (line 1946) | func (c *shippingServiceClient) GetQuote(ctx context.Context, in *GetQ...
method ShipOrder (line 1955) | func (c *shippingServiceClient) ShipOrder(ctx context.Context, in *Shi...
function NewShippingServiceClient (line 1942) | func NewShippingServiceClient(cc *grpc.ClientConn) ShippingServiceClient {
type ShippingServiceServer (line 1965) | type ShippingServiceServer interface
function RegisterShippingServiceServer (line 1970) | func RegisterShippingServiceServer(s *grpc.Server, srv ShippingServiceSe...
function _ShippingService_GetQuote_Handler (line 1974) | func _ShippingService_GetQuote_Handler(srv interface{}, ctx context.Cont...
function _ShippingService_ShipOrder_Handler (line 1992) | func _ShippingService_ShipOrder_Handler(srv interface{}, ctx context.Con...
type CurrencyServiceClient (line 2030) | type CurrencyServiceClient interface
type currencyServiceClient (line 2035) | type currencyServiceClient struct
method GetSupportedCurrencies (line 2043) | func (c *currencyServiceClient) GetSupportedCurrencies(ctx context.Con...
method Convert (line 2052) | func (c *currencyServiceClient) Convert(ctx context.Context, in *Curre...
function NewCurrencyServiceClient (line 2039) | func NewCurrencyServiceClient(cc *grpc.ClientConn) CurrencyServiceClient {
type CurrencyServiceServer (line 2062) | type CurrencyServiceServer interface
function RegisterCurrencyServiceServer (line 2067) | func RegisterCurrencyServiceServer(s *grpc.Server, srv CurrencyServiceSe...
function _CurrencyService_GetSupportedCurrencies_Handler (line 2071) | func _CurrencyService_GetSupportedCurrencies_Handler(srv interface{}, ct...
function _CurrencyService_Convert_Handler (line 2089) | func _CurrencyService_Convert_Handler(srv interface{}, ctx context.Conte...
type PaymentServiceClient (line 2127) | type PaymentServiceClient interface
type paymentServiceClient (line 2131) | type paymentServiceClient struct
method Charge (line 2139) | func (c *paymentServiceClient) Charge(ctx context.Context, in *ChargeR...
function NewPaymentServiceClient (line 2135) | func NewPaymentServiceClient(cc *grpc.ClientConn) PaymentServiceClient {
type PaymentServiceServer (line 2149) | type PaymentServiceServer interface
function RegisterPaymentServiceServer (line 2153) | func RegisterPaymentServiceServer(s *grpc.Server, srv PaymentServiceServ...
function _PaymentService_Charge_Handler (line 2157) | func _PaymentService_Charge_Handler(srv interface{}, ctx context.Context...
type EmailServiceClient (line 2191) | type EmailServiceClient interface
type emailServiceClient (line 2195) | type emailServiceClient struct
method SendOrderConfirmation (line 2203) | func (c *emailServiceClient) SendOrderConfirmation(ctx context.Context...
function NewEmailServiceClient (line 2199) | func NewEmailServiceClient(cc *grpc.ClientConn) EmailServiceClient {
type EmailServiceServer (line 2213) | type EmailServiceServer interface
function RegisterEmailServiceServer (line 2217) | func RegisterEmailServiceServer(s *grpc.Server, srv EmailServiceServer) {
function _EmailService_SendOrderConfirmation_Handler (line 2221) | func _EmailService_SendOrderConfirmation_Handler(srv interface{}, ctx co...
type CheckoutServiceClient (line 2255) | type CheckoutServiceClient interface
type checkoutServiceClient (line 2259) | type checkoutServiceClient struct
method PlaceOrder (line 2267) | func (c *checkoutServiceClient) PlaceOrder(ctx context.Context, in *Pl...
fun
Condensed preview — 206 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,282K chars).
[
{
"path": ".github/workflows/game-2048-kubescape.yaml",
"chars": 4239,
"preview": "name: Game 2048 Kubescape CI/CD Example\n\non:\n # push:\n # branches: [ master ]\n # pull_request:\n # branches: [ ma"
},
{
"path": ".github/workflows/game-2048-snyk.yaml",
"chars": 7062,
"preview": "name: Game 2048 Snyk CI/CD Example\n\non:\n # push:\n # branches: [ master ]\n # pull_request:\n # branches: [ master "
},
{
"path": ".github/workflows/online-boutique-main-ci.yaml",
"chars": 4022,
"preview": "name: Online Boutique CI Main\n\non:\n # Used for testing only (can be disabled afterwards)\n workflow_dispatch:\n # Uncom"
},
{
"path": ".github/workflows/online-boutique-pr-ci.yaml",
"chars": 8019,
"preview": "name: Online Boutique PR CI\n\non:\n # Used for testing only (can be disabled afterwards)\n workflow_dispatch:\n # Uncomme"
},
{
"path": ".github/workflows/online-boutique-pr-kustomize-validation.yaml",
"chars": 991,
"preview": "name: Online Boutique PR Kustomize Validation\n\non:\n workflow_dispatch:\n # pull_request:\n # branches:\n # - main"
},
{
"path": ".github/workflows/online-boutique-release.yaml",
"chars": 3034,
"preview": "name: Online Boutique Release\n\non:\n workflow_dispatch:\n # push:\n # # Trigger on push events to any tag matching sem"
},
{
"path": ".github/workflows/online-boutique-snyk-docker-scan.yaml",
"chars": 2438,
"preview": "name: Online Boutique Snyk Docker Scan\n\non:\n # pull_request:\n # branches:\n # - main\n # paths:\n # - \"src"
},
{
"path": ".github/workflows/online-boutique-snyk-iac-scan.yaml",
"chars": 1766,
"preview": "name: Online Boutique Snyk IAC Scan\n\non:\n # pull_request:\n # branches:\n # - main\n # paths:\n # - \"argocd"
},
{
"path": ".github/workflows/online-boutique-snyk-source-code-scan.yaml",
"chars": 3604,
"preview": "name: Online Boutique Snyk Source Code Scan\n\non:\n # pull_request:\n # branches:\n # - main\n # paths:\n # -"
},
{
"path": ".gitignore",
"chars": 18,
"preview": "# macOS\n.DS_Store\n"
},
{
"path": "README.md",
"chars": 918,
"preview": "# DigitalOcean Kubernetes Sample Apps\n\nThis repository contains a collection of Kubernetes applications that can be used"
},
{
"path": "bookinfo-example/README.md",
"chars": 5431,
"preview": "# Overview\n\nThe [Bookinfo](https://istio.io/latest/docs/examples/bookinfo) application displays information about a book"
},
{
"path": "bookinfo-example/kustomize/kustomization.yaml",
"chars": 925,
"preview": "## Bookinfo Sample Application Kustomization\n\napiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\n\n# Making "
},
{
"path": "bookinfo-example/kustomize/resources/namespace.yaml",
"chars": 58,
"preview": "apiVersion: v1\nkind: Namespace\nmetadata:\n name: bookinfo\n"
},
{
"path": "doks-example/.travis.yml",
"chars": 142,
"preview": "services:\n - 'docker'\n\nscript:\n - docker build -t doks-example .\n - docker run --rm -it doks-example sleep 1\n\nnotific"
},
{
"path": "doks-example/Dockerfile",
"chars": 41,
"preview": "FROM nginx\n\nADD web /usr/share/nginx/html"
},
{
"path": "doks-example/LICENSE",
"chars": 1069,
"preview": "MIT License\n\nCopyright (c) 2019 DigitalOcean\n\nPermission is hereby granted, free of charge, to any person obtaining a co"
},
{
"path": "doks-example/README.md",
"chars": 951,
"preview": "[](https://travis-ci.org/digitalocean/"
},
{
"path": "doks-example/manifest.yaml",
"chars": 574,
"preview": "---\nkind: Service\napiVersion: v1\nmetadata:\n name: doks-example\nspec:\n type: LoadBalancer\n selector:\n app: doks-exa"
},
{
"path": "doks-example/script/docker-publish",
"chars": 123,
"preview": "#!/usr/bin/env bash\nset -euo pipefail\nTARGET=\"digitalocean/doks-example\"\ndocker build -t ${TARGET} .\ndocker push ${TARGE"
},
{
"path": "doks-example/script/down",
"chars": 251,
"preview": "#!/usr/bin/env bash\nset -euo pipefail\nCLUSTER=\"example\"\ndoctl compute load-balancer delete --force $(kubectl get svc dok"
},
{
"path": "doks-example/script/up",
"chars": 374,
"preview": "#!/usr/bin/env bash\nset -euo pipefail\nCLUSTER=\"example\"\nSERVICE=\"doks-example\"\nCONTEXT=\"do-nyc1-${CLUSTER}\"\ndoctl k8s cl"
},
{
"path": "doks-example/script/wait-for-service",
"chars": 439,
"preview": "#!/usr/bin/env bash\n# Pass the name of a service to check: sh wait-for-service.sh example\nset -euo pipefail\nEXTERNAL_IP="
},
{
"path": "doks-example/web/index.html",
"chars": 6500,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n <link rel=\"stylesheet\" href=\"https://assets.digitalocean.com/bui/1.2.2/bui.css"
},
{
"path": "doks-example/web/style.css",
"chars": 1091,
"preview": "html {\n height: 100%;\n}\n\nbody {\n margin: 0;\n padding: 25px;\n height: 100%;\n\n background-color: #0a1e99;\n "
},
{
"path": "emojivoto-example/README.md",
"chars": 4646,
"preview": "# Overview\n\n[Emojivoto](https://github.com/BuoyantIO/emojivoto) is a microservice application that allows users to vote "
},
{
"path": "emojivoto-example/kustomize/kustomization.yaml",
"chars": 689,
"preview": "## Emojivoto Sample Application Kustomization\n\napiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\n\n# Making"
},
{
"path": "emojivoto-example/kustomize/patches/emoji-svc.yaml",
"chars": 64,
"preview": "- op: add\n path: /metadata/labels\n value: \n app: emoji-svc\n"
},
{
"path": "emojivoto-example/kustomize/patches/voting-svc.yaml",
"chars": 65,
"preview": "- op: add\n path: /metadata/labels\n value: \n app: voting-svc\n"
},
{
"path": "game-2048-example/.dockerignore",
"chars": 324,
"preview": "**/.classpath\r\n**/.dockerignore\r\n**/.env\r\n**/.git\r\n**/.gitignore\r\n**/.project\r\n**/.settings\r\n**/.toolstarget\r\n**/.vs\r\n**"
},
{
"path": "game-2048-example/.gitignore",
"chars": 24,
"preview": "**/node_modules\n**/dist\n"
},
{
"path": "game-2048-example/Dockerfile",
"chars": 458,
"preview": "FROM node:16-slim AS builder\r\nWORKDIR /usr/src/app\r\nCOPY . .\r\nRUN npm install --include=dev\r\n#\r\n# Build mode can be set "
},
{
"path": "game-2048-example/LICENSE",
"chars": 1069,
"preview": "MIT License\n\nCopyright (c) 2019 DigitalOcean\n\nPermission is hereby granted, free of charge, to any person obtaining a co"
},
{
"path": "game-2048-example/README.md",
"chars": 6607,
"preview": "# Overview\n\nSample javascript application implementing the classic [2048 game](https://en.wikipedia.org/wiki/2048_(video"
},
{
"path": "game-2048-example/Tiltfile",
"chars": 167,
"preview": "os.putenv('DOCKER_DEFAULT_PLATFORM', 'linux/amd64')\n\nk8s_yaml(kustomize('kustomize'))\n\ndocker_build('game-2048', '.')\n\nk"
},
{
"path": "game-2048-example/knative-service.yaml",
"chars": 314,
"preview": "apiVersion: serving.knative.dev/v1\nkind: Service\nmetadata:\n name: game-2048\nspec:\n template:\n spec:\n container"
},
{
"path": "game-2048-example/kustomize/kustomization.yaml",
"chars": 497,
"preview": "## 2048 Game Sample Application Kustomization\n\napiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\n\n# Making"
},
{
"path": "game-2048-example/kustomize/resources/deployment.yaml",
"chars": 924,
"preview": "---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: game-2048\nspec:\n replicas: 1\n selector:\n matchLabels:\n "
},
{
"path": "game-2048-example/kustomize/resources/namespace.yaml",
"chars": 59,
"preview": "apiVersion: v1\nkind: Namespace\nmetadata:\n name: game-2048\n"
},
{
"path": "game-2048-example/kustomize/resources/service.yaml",
"chars": 160,
"preview": "apiVersion: v1\nkind: Service\nmetadata:\n name: game-2048\nspec:\n ports:\n - name: http\n port: 8080\n targetPo"
},
{
"path": "game-2048-example/package.json",
"chars": 669,
"preview": "{\n \"name\": \"knative-example\",\n \"version\": \"0.0.1\",\n \"private\": true,\n \"scripts\": {\n \"start\": \"webpack server --co"
},
{
"path": "game-2048-example/src/index.js",
"chars": 326,
"preview": "import 'game-2048/style/main.css';\nimport Game from 'game-2048';\n\nvar gameContainerDiv = document.createElement('div');\n"
},
{
"path": "game-2048-example/webpack.config.js",
"chars": 716,
"preview": "const path = require('path');\nconst HtmlWebpackPlugin = require('html-webpack-plugin')\n\nmodule.exports = {\n mode: pro"
},
{
"path": "microservices-demo/.gitignore",
"chars": 53,
"preview": "# macOS\n.DS_Store\n\n# Tilt settings\n/tilt_config.json\n"
},
{
"path": "microservices-demo/CODE_OF_CONDUCT.md",
"chars": 1981,
"preview": "# Contributor Code of Conduct\n\nAs contributors and maintainers of this project,\nand in the interest of fostering an open"
},
{
"path": "microservices-demo/CONTRIBUTING.md",
"chars": 1305,
"preview": "# How to Contribute\n\nWe'd love to accept your patches and contributions to this project. There are\njust a few small guid"
},
{
"path": "microservices-demo/LICENSE",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "microservices-demo/README.md",
"chars": 1333,
"preview": "# Overview\n\n**Note:**\n\n**This demo application serves as a companion for the [Kubernetes Adoption Journey](https://digit"
},
{
"path": "microservices-demo/Tiltfile",
"chars": 2962,
"preview": "#########################################################################\n#\n# Tiltfile logic\n#\n#######################"
},
{
"path": "microservices-demo/kustomize/base/cartservice.yaml",
"chars": 2482,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/kustomize/base/checkoutservice.yaml",
"chars": 2900,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/kustomize/base/currencyservice.yaml",
"chars": 2405,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/kustomize/base/emailservice.yaml",
"chars": 2360,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/kustomize/base/frontend.yaml",
"chars": 3217,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/kustomize/base/kustomization.yaml",
"chars": 332,
"preview": "apiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\n\nresources:\n - namespace.yaml\n - cartservice.yaml\n - "
},
{
"path": "microservices-demo/kustomize/base/namespace.yaml",
"chars": 68,
"preview": "apiVersion: v1\nkind: Namespace\nmetadata:\n name: microservices-demo\n"
},
{
"path": "microservices-demo/kustomize/base/paymentservice.yaml",
"chars": 2380,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/kustomize/base/productcatalogservice.yaml",
"chars": 2460,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/kustomize/base/recommendationservice.yaml",
"chars": 2537,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/kustomize/base/redis.yaml",
"chars": 1955,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/kustomize/base/shippingservice.yaml",
"chars": 2421,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/kustomize/dev/kustomization.yaml",
"chars": 1226,
"preview": "apiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\n\nnamespace: microservices-demo-dev\ncommonLabels:\n varia"
},
{
"path": "microservices-demo/kustomize/kustomization.yaml",
"chars": 105,
"preview": "apiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\n\nresources:\n - dev\n - staging\n - prod\n"
},
{
"path": "microservices-demo/kustomize/prod/kustomization.yaml",
"chars": 1587,
"preview": "apiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\n\nnamespace: microservices-demo-prod\ncommonLabels:\n vari"
},
{
"path": "microservices-demo/kustomize/staging/kustomization.yaml",
"chars": 1595,
"preview": "apiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\n\nnamespace: microservices-demo-staging\ncommonLabels:\n v"
},
{
"path": "microservices-demo/release-scripts/README.md",
"chars": 1993,
"preview": "# Overview of the Release Scripts\n\nThis directory contains the scripts for creating a new `microservices-demo` release.\n"
},
{
"path": "microservices-demo/release-scripts/license_header.txt",
"chars": 575,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/release-scripts/make-cnb-docker-images.sh",
"chars": 1126,
"preview": "#!/usr/bin/env bash\n\nset -euo pipefail\nSCRIPTDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nlog() { echo \"$1\" "
},
{
"path": "microservices-demo/release-scripts/make-docker-images.sh",
"chars": 1475,
"preview": "#!/usr/bin/env bash\n\n# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# y"
},
{
"path": "microservices-demo/release-scripts/make-release-artifacts.sh",
"chars": 3102,
"preview": "#!/usr/bin/env bash\n\n# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# y"
},
{
"path": "microservices-demo/release-scripts/make-release.sh",
"chars": 1653,
"preview": "#!/usr/bin/env bash\n\n# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# y"
},
{
"path": "microservices-demo/src/.gitignore",
"chars": 297,
"preview": "# Go: for the time being we are not checking in the vendor/ directories to git\n# to prevent the repo from getting larger"
},
{
"path": "microservices-demo/src/cartservice/.gitignore",
"chars": 24,
"preview": "**/bin/\n**/obj/\n.vs/*.*\n"
},
{
"path": "microservices-demo/src/cartservice/cartservice.sln",
"chars": 2855,
"preview": "\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 15\r\nVisualStudioVersion = 15.0.26124.0\r\n"
},
{
"path": "microservices-demo/src/cartservice/src/.dockerignore",
"chars": 52,
"preview": "**/*.sh\n**/*.bat\n**/bin/\n**/obj/\n**/out/\nDockerfile*"
},
{
"path": "microservices-demo/src/cartservice/src/Dockerfile",
"chars": 1490,
"preview": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/cartservice/src/Dockerfile.debug",
"chars": 1417,
"preview": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/cartservice/src/Program.cs",
"chars": 928,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/cartservice/src/Startup.cs",
"chars": 2530,
"preview": "using System;\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Diagnostics.HealthChecks;\nusing Microsoft.A"
},
{
"path": "microservices-demo/src/cartservice/src/appsettings.json",
"chars": 288,
"preview": "{\n \"Logging\": {\n \"LogLevel\": {\n \"Default\": \"Information\",\n \"Microsoft\": \"Warning\",\n \"Micros"
},
{
"path": "microservices-demo/src/cartservice/src/cartservice.csproj",
"chars": 494,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>net6.0</TargetFramework>\n </PropertyGroup"
},
{
"path": "microservices-demo/src/cartservice/src/cartstore/ICartStore.cs",
"chars": 898,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/cartservice/src/cartstore/RedisCartStore.cs",
"chars": 3930,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/cartservice/src/protos/Cart.proto",
"chars": 1210,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/cartservice/src/services/CartService.cs",
"chars": 1707,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/cartservice/src/services/HealthCheckService.cs",
"chars": 1415,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/cartservice/tests/.gitignore",
"chars": 20,
"preview": "/bin/*\n/obj/*\n/.vs/*"
},
{
"path": "microservices-demo/src/cartservice/tests/CartServiceTests.cs",
"chars": 5196,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/cartservice/tests/cartservice.tests.csproj",
"chars": 644,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>net6.0</TargetFramework>\n\n <IsPackable>fals"
},
{
"path": "microservices-demo/src/checkoutservice/.dockerignore",
"chars": 8,
"preview": "vendor/\n"
},
{
"path": "microservices-demo/src/checkoutservice/Dockerfile",
"chars": 1572,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/checkoutservice/README.md",
"chars": 123,
"preview": "# checkoutservice\n\nRun the following command to restore dependencies to `vendor/` directory:\n\n dep ensure --vendor-on"
},
{
"path": "microservices-demo/src/checkoutservice/genproto/demo.pb.go",
"chars": 90238,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/checkoutservice/genproto.sh",
"chars": 785,
"preview": "#!/bin/bash -eu\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
},
{
"path": "microservices-demo/src/checkoutservice/go.mod",
"chars": 1995,
"preview": "module github.com/GoogleCloudPlatform/microservices-demo/src/checkoutservice\n\ngo 1.18\n\nrequire (\n\tcloud.google.com/go/pr"
},
{
"path": "microservices-demo/src/checkoutservice/go.sum",
"chars": 73862,
"preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1"
},
{
"path": "microservices-demo/src/checkoutservice/main.go",
"chars": 13999,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/checkoutservice/money/money.go",
"chars": 3990,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/checkoutservice/money/money_test.go",
"chars": 7927,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/currencyservice/.dockerignore",
"chars": 24,
"preview": "client.js\nnode_modules/\n"
},
{
"path": "microservices-demo/src/currencyservice/.gitignore",
"chars": 14,
"preview": "node_modules/\n"
},
{
"path": "microservices-demo/src/currencyservice/Dockerfile",
"chars": 1274,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/currencyservice/client.js",
"chars": 1807,
"preview": "/*\n *\n * Copyright 2015 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "microservices-demo/src/currencyservice/data/currency_conversion.json",
"chars": 635,
"preview": "{\n \"EUR\": \"1.0\",\n \"USD\": \"1.1305\",\n \"JPY\": \"126.40\",\n \"BGN\": \"1.9558\",\n \"CZK\": \"25.592\",\n \"DKK\": \"7.4609\",\n \"GBP\""
},
{
"path": "microservices-demo/src/currencyservice/genproto.sh",
"chars": 783,
"preview": "#!/bin/bash -eu\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
},
{
"path": "microservices-demo/src/currencyservice/package.json",
"chars": 731,
"preview": "{\n \"name\": \"grpc-currency-service\",\n \"version\": \"0.1.0\",\n \"description\": \"A gRPC currency conversion microservice\",\n "
},
{
"path": "microservices-demo/src/currencyservice/proto/demo.proto",
"chars": 6069,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/currencyservice/proto/grpc/health/v1/health.proto",
"chars": 1288,
"preview": "// Copyright 2015 The gRPC Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not "
},
{
"path": "microservices-demo/src/currencyservice/server.js",
"chars": 4682,
"preview": "/*\n * Copyright 2018 Google LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not us"
},
{
"path": "microservices-demo/src/emailservice/.python-version",
"chars": 4,
"preview": "3.7\n"
},
{
"path": "microservices-demo/src/emailservice/Dockerfile",
"chars": 1527,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/emailservice/Procfile",
"chars": 28,
"preview": "web: python email_server.py\n"
},
{
"path": "microservices-demo/src/emailservice/demo_pb2.py",
"chars": 62575,
"preview": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo"
},
{
"path": "microservices-demo/src/emailservice/demo_pb2_grpc.py",
"chars": 16735,
"preview": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo"
},
{
"path": "microservices-demo/src/emailservice/email_client.py",
"chars": 1757,
"preview": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo"
},
{
"path": "microservices-demo/src/emailservice/email_server.py",
"chars": 6579,
"preview": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo"
},
{
"path": "microservices-demo/src/emailservice/genproto.sh",
"chars": 759,
"preview": "#!/bin/bash -eu\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
},
{
"path": "microservices-demo/src/emailservice/logger.py",
"chars": 1534,
"preview": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo"
},
{
"path": "microservices-demo/src/emailservice/pytest.ini",
"chars": 58,
"preview": "[pytest]\ntestpaths = tests\nconsole_output_style = classic\n"
},
{
"path": "microservices-demo/src/emailservice/requirements.in",
"chars": 355,
"preview": "google-api-core==2.8.2\ngrpcio-health-checking==1.47.0\ngrpcio==1.47.0\njinja2==3.1.2\nopencensus==0.9.0\nopencensus-ext-stac"
},
{
"path": "microservices-demo/src/emailservice/requirements.txt",
"chars": 3018,
"preview": "#\n# This file is autogenerated by pip-compile with python 3.10\n# To update, run:\n#\n# pip-compile --output-file=requir"
},
{
"path": "microservices-demo/src/emailservice/templates/confirmation.html",
"chars": 1916,
"preview": "<!DOCTYPE html>\n<!--\n Copyright 2020 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you m"
},
{
"path": "microservices-demo/src/emailservice/tests/test_sample.py",
"chars": 75,
"preview": "def func(x):\n return x + 1\n\n\ndef test_answer():\n assert func(3) == 4\n"
},
{
"path": "microservices-demo/src/frontend/.dockerignore",
"chars": 8,
"preview": "vendor/\n"
},
{
"path": "microservices-demo/src/frontend/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "microservices-demo/src/frontend/Dockerfile",
"chars": 1399,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/frontend/README.md",
"chars": 116,
"preview": "# frontend\n\nRun the following command to restore dependencies to `vendor/` directory:\n\n dep ensure --vendor-only\n"
},
{
"path": "microservices-demo/src/frontend/deployment_details.go",
"chars": 1578,
"preview": "package main\n\nimport (\n\t\"net/http\"\n\t\"os\"\n\t\"time\"\n\n\t\"cloud.google.com/go/compute/metadata\"\n\t\"github.com/sirupsen/logrus\"\n"
},
{
"path": "microservices-demo/src/frontend/genproto/demo.pb.go",
"chars": 90238,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/frontend/genproto.sh",
"chars": 771,
"preview": "#!/bin/bash -eu\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
},
{
"path": "microservices-demo/src/frontend/go.mod",
"chars": 2099,
"preview": "module github.com/GoogleCloudPlatform/microservices-demo/src/frontend\n\ngo 1.18\n\nrequire (\n\tcloud.google.com/go v0.104.0\n"
},
{
"path": "microservices-demo/src/frontend/go.sum",
"chars": 78649,
"preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1"
},
{
"path": "microservices-demo/src/frontend/handlers.go",
"chars": 16681,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/frontend/main.go",
"chars": 8793,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/frontend/middleware.go",
"chars": 2683,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/frontend/money/money.go",
"chars": 3983,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/frontend/money/money_test.go",
"chars": 7920,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/frontend/rpc.go",
"chars": 4214,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/frontend/static/images/credits.txt",
"chars": 155,
"preview": "folded-clothes-on-white-chair.jpg,,https://unsplash.com/photos/fr0J5-GIVyg\nfolded-clothes-on-white-chair-wide.jpg,,https"
},
{
"path": "microservices-demo/src/frontend/static/styles/cart.css",
"chars": 2246,
"preview": "/**\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not us"
},
{
"path": "microservices-demo/src/frontend/static/styles/order.css",
"chars": 1254,
"preview": "/**\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not us"
},
{
"path": "microservices-demo/src/frontend/static/styles/styles.css",
"chars": 10733,
"preview": "/**\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not us"
},
{
"path": "microservices-demo/src/frontend/templates/ad.html",
"chars": 820,
"preview": "<!--\n Copyright 2020 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this "
},
{
"path": "microservices-demo/src/frontend/templates/cart.html",
"chars": 10986,
"preview": "<!--\n Copyright 2020 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this "
},
{
"path": "microservices-demo/src/frontend/templates/error.html",
"chars": 1370,
"preview": "<!--\n Copyright 2020 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this "
},
{
"path": "microservices-demo/src/frontend/templates/footer.html",
"chars": 2352,
"preview": "<!--\n Copyright 2020 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this "
},
{
"path": "microservices-demo/src/frontend/templates/header.html",
"chars": 3908,
"preview": "<!--\n Copyright 2020 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this "
},
{
"path": "microservices-demo/src/frontend/templates/home.html",
"chars": 2175,
"preview": "<!--\n Copyright 2020 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this "
},
{
"path": "microservices-demo/src/frontend/templates/order.html",
"chars": 2589,
"preview": "<!--\n Copyright 2020 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this "
},
{
"path": "microservices-demo/src/frontend/templates/product.html",
"chars": 2149,
"preview": "<!--\n Copyright 2020 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this "
},
{
"path": "microservices-demo/src/frontend/templates/recommendations.html",
"chars": 1255,
"preview": "<!--\n Copyright 2020 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this "
},
{
"path": "microservices-demo/src/loadgenerator/Dockerfile",
"chars": 1062,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/loadgenerator/loadgenerator.yaml",
"chars": 2380,
"preview": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/loadgenerator/locustfile.py",
"chars": 2133,
"preview": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo"
},
{
"path": "microservices-demo/src/loadgenerator/requirements.in",
"chars": 15,
"preview": "locust==2.12.1\n"
},
{
"path": "microservices-demo/src/loadgenerator/requirements.txt",
"chars": 1479,
"preview": "#\n# This file is autogenerated by pip-compile with python 3.9\n# To update, run:\n#\n# pip-compile --output-file=require"
},
{
"path": "microservices-demo/src/paymentservice/.dockerignore",
"chars": 13,
"preview": "node_modules\n"
},
{
"path": "microservices-demo/src/paymentservice/.gitignore",
"chars": 23,
"preview": "node_modules\n.DS_Store\n"
},
{
"path": "microservices-demo/src/paymentservice/Dockerfile",
"chars": 1275,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/paymentservice/charge.js",
"chars": 2759,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/paymentservice/genproto.sh",
"chars": 781,
"preview": "#!/bin/bash -eu\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
},
{
"path": "microservices-demo/src/paymentservice/index.js",
"chars": 1526,
"preview": "/*\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "microservices-demo/src/paymentservice/package.json",
"chars": 710,
"preview": "{\n \"name\": \"paymentservice\",\n \"version\": \"0.0.1\",\n \"description\": \"Payment Microservice demo\",\n \"repository\": \"https"
},
{
"path": "microservices-demo/src/paymentservice/proto/demo.proto",
"chars": 6069,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/paymentservice/proto/grpc/health/v1/health.proto",
"chars": 1288,
"preview": "// Copyright 2015 The gRPC Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not "
},
{
"path": "microservices-demo/src/paymentservice/server.js",
"chars": 2974,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/productcatalogservice/.dockerignore",
"chars": 8,
"preview": "vendor/\n"
},
{
"path": "microservices-demo/src/productcatalogservice/Dockerfile",
"chars": 1584,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/productcatalogservice/README.md",
"chars": 1419,
"preview": "# productcatalogservice\n\nRun the following command to restore dependencies to `vendor/` directory:\n\n dep ensure --ven"
},
{
"path": "microservices-demo/src/productcatalogservice/genproto/demo.pb.go",
"chars": 90238,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/productcatalogservice/genproto.sh",
"chars": 797,
"preview": "#!/bin/bash -eu\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
},
{
"path": "microservices-demo/src/productcatalogservice/go.mod",
"chars": 1961,
"preview": "module github.com/GoogleCloudPlatform/microservices-demo/src/productcatalogservice\n\ngo 1.18\n\nrequire (\n\tcloud.google.com"
},
{
"path": "microservices-demo/src/productcatalogservice/go.sum",
"chars": 73515,
"preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1"
},
{
"path": "microservices-demo/src/productcatalogservice/products.json",
"chars": 3847,
"preview": "{\n \"products\": [\n {\n \"id\": \"OLJCESPC7Z\",\n \"name\": \"Sunglasses\",\n \"description"
},
{
"path": "microservices-demo/src/productcatalogservice/server.go",
"chars": 8229,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/productcatalogservice/server_test.go",
"chars": 2066,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/recommendationservice/.gitignore",
"chars": 6,
"preview": "*.pyc\n"
},
{
"path": "microservices-demo/src/recommendationservice/.python-version",
"chars": 4,
"preview": "3.7\n"
},
{
"path": "microservices-demo/src/recommendationservice/Dockerfile",
"chars": 1317,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/recommendationservice/Procfile",
"chars": 60,
"preview": "web: python /recommendationservice/recommendation_server.py\n"
},
{
"path": "microservices-demo/src/recommendationservice/client.py",
"chars": 1767,
"preview": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo"
},
{
"path": "microservices-demo/src/recommendationservice/demo_pb2.py",
"chars": 62566,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/recommendationservice/demo_pb2_grpc.py",
"chars": 17184,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/recommendationservice/genproto.sh",
"chars": 873,
"preview": "#!/bin/bash -eu\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
},
{
"path": "microservices-demo/src/recommendationservice/logger.py",
"chars": 1534,
"preview": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo"
},
{
"path": "microservices-demo/src/recommendationservice/pytest.ini",
"chars": 58,
"preview": "[pytest]\ntestpaths = tests\nconsole_output_style = classic\n"
},
{
"path": "microservices-demo/src/recommendationservice/recommendation_server.py",
"chars": 6136,
"preview": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo"
},
{
"path": "microservices-demo/src/recommendationservice/requirements.in",
"chars": 369,
"preview": "google-api-core==2.8.2\ngoogle-python-cloud-debugger==3.1\ngoogle-cloud-profiler==4.0.0\ngrpcio-health-checking==1.47.0\ngrp"
},
{
"path": "microservices-demo/src/recommendationservice/requirements.txt",
"chars": 3910,
"preview": "#\n# This file is autogenerated by pip-compile with python 3.7\n# To update, run:\n#\n# pip-compile --output-file=require"
},
{
"path": "microservices-demo/src/recommendationservice/tests/test_sample.py",
"chars": 75,
"preview": "def func(x):\n return x + 1\n\n\ndef test_answer():\n assert func(3) == 4\n"
},
{
"path": "microservices-demo/src/shippingservice/.dockerignore",
"chars": 8,
"preview": "vendor/\n"
},
{
"path": "microservices-demo/src/shippingservice/Dockerfile",
"chars": 1605,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "microservices-demo/src/shippingservice/README.md",
"chars": 351,
"preview": "# Shipping Service\n\nThe Shipping service provides price quote, tracking IDs, and the impression of order fulfillment & s"
},
{
"path": "microservices-demo/src/shippingservice/genproto/demo.pb.go",
"chars": 90238,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/shippingservice/genproto.sh",
"chars": 785,
"preview": "#!/bin/bash -eu\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
},
{
"path": "microservices-demo/src/shippingservice/go.mod",
"chars": 1967,
"preview": "module github.com/GoogleCloudPlatform/microservices-demo/src/shippingservice\n\ngo 1.18\n\nrequire (\n\tcloud.google.com/go/pr"
},
{
"path": "microservices-demo/src/shippingservice/go.sum",
"chars": 73595,
"preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1"
},
{
"path": "microservices-demo/src/shippingservice/main.go",
"chars": 6723,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/shippingservice/quote.go",
"chars": 1256,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "microservices-demo/src/shippingservice/shippingservice_test.go",
"chars": 2392,
"preview": "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
}
]
// ... and 6 more files (download for full content)
About this extraction
This page contains the full source code of the digitalocean/kubernetes-sample-apps GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 206 files (1.2 MB), approximately 423.4k tokens, and a symbol index with 2221 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.