caleb’s code
https://github.com/golang-book/bootca...
todd’s code
https://github.com/GoesToEleven/Golan...
course outline
https://goo.gl/EIbk7a
Learn The Language - Golang Training
https://goo.gl/DB1GvG
Learn The Language - Great Golang Books
https://www.golang-book.com/books/intro (Caleb Doxsey)
http://amzn.to/1PmlB1w (Bill Kennedy)
http://amzn.to/21nO1Mc (Donovan & Kernighan)
http://amzn.to/1PmlKSB (Balbaert)
Learn The Language - Quick Code Samples
https://gobyexample.com/
Playlist of all videos in training
https://goo.gl/WWCh9D
Index of Videos
https://goo.gl/SDgaEr
ASK QUESTIONS & GET HELP
https://forum.golangbridge.org/c/gett...
STAY CONNECTED
G+ https://goo.gl/kWyztP
https://twitter.com/Todd_McLeod
https://www.youtube.com/user/toddmcleod
NOTES ON THIS VIDEO:
continuing to set up GCS; (10) you have to generate a SERVICE ACCOUNT so open your project then go into CREDENTIALS then under OAUTH click CREATE NEW CLIENT ID and choose SERVICE ACCOUNT; a file will download; a PRIVATE KEY for your service account; you need to save this file; (11) we need a P12 KEY so click GENERATE NEW P12 KEY; creates a P12 which is a way of storing a key and it has a password and the password is notasecret; we now have a PRIVATE KEY; we can use this private key to connect to GCS; but the key is in the wrong format (12) app engine wants a PEM file; we have to convert our P12 to PEM; run this command at the terminal ( 1:38)
cat Hello*.p12 | openssl pkcs12 -nodes -nocerts -passin pass:notasecret | openssl rsa ~/gcs.pem
this is where the docs talk about it here (search for “following these instructions”) and here
After you create a Client ID for a service account (see Generating a private key) and download the private key, you might need to convert the key to other formats. The key is provided in PKCS12 format, which is supported by many different programming languages and libraries. However, it can be converted into other formats using OpenSSL. # Convert the key from pkcs12 to pkcs1 (PEM).
$ cat /path/to/xxxx-privatekey.p12 | openssl pkcs12 -nodes -nocerts -passin pass:notasecret | openssl rsa /path/to/secret.pem
Using that PEM file, I can connect to GCS from my development server on my computer; this lets you test your code locally; when your application is live, your application will be able to get the credentials to access the bucket from the app engine service;
NOW WE ARE READY TO START OUR GCS SERVER; step (13); at terminal
~/go_appengine/dev_appserver.py . --appidentity_email_address your_app_email_address@developer.gserviceaccount.com --appidentity_private_key_path pem_file.pem
where your_app_email_address is the encrypted email address from the CREATE NEW CLIENT ID OAUTH AREA UNDER API’S AND AUTH CREDENTIALS IN GOOGLE DEVELOPERS CONSOLE under SERVICE ACCOUNT; :
Now we can write some code! Step (14) ( 6:00); http client; OAUTH2 transport;
This is complicated because making something easy makes it easy to hack;
Setting up Google Cloud Storage programming logic and design pdf | |
| 7 Likes | 7 Dislikes |
| 2,595 views views | 21.3K followers |
| Education | Upload TimePublished on 24 Jul 2015 |
Không có nhận xét nào:
Đăng nhận xét