-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUse Go Code to Work with Google Cloud Data Sources
32 lines (20 loc) · 1.26 KB
/
Use Go Code to Work with Google Cloud Data Sources
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
export PROJECT_ID=$(gcloud info --format="value(config.project)")
git clone https://github.com/GoogleCloudPlatform/DIY-Tools.git
gcloud firestore import gs://$PROJECT_ID-firestore/prd-back
cd ~/DIY-Tools/gcp-data-drive/cmd/webserver
go build -mod=readonly -v -o gcp-data-drive
./gcp-data-drive
------------------------------------------------------------------------------------------
export PREVIEW_URL=
------------------------------------------------------------------------------------------
export PROJECT_ID=$(gcloud info --format="value(config.project)")
echo $PREVIEW_URL/fs/$PROJECT_ID/symbols/product/symbol
echo -e "\033[32m$PREVIEW_URL/bq/$PROJECT_ID/publicviews/ca_zip_codes?authuser=0&environment_name=default\033[0m"
------------------------------------------------------------------------------------------
cd ~/DIY-Tools/gcp-data-drive/cmd/webserver
gcloud app deploy app.yaml --project $PROJECT_ID -q
export TARGET_URL=https://$(gcloud app describe --format="value(defaultHostname)")
curl $TARGET_URL/fs/$PROJECT_ID/symbols/product/symbol
curl $TARGET_URL/fs/$PROJECT_ID/symbols/product/symbol/008888166900
curl $TARGET_URL/bq/$PROJECT_ID/publicviews/ca_zip_codes
YOU ARE DOING A GREAT JOB, KEEP WORKING !!!