You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
#åãã« èè ã¯Goè¨èªãã¤ã³ãã©æ§ç¯èªååæè¡ã«é¢ããç¥èã¯ãã¾ããªãã®ã§ãç¥èã®ããä¸ç´è ã¯é©åãªã¢ããã¤ã¹ãªããééãã®ææããã¦é ããã¨å¹¸ã§ãã ãã®ãããªã·ãã¥ã¨ã¼ã·ã§ã³ãæ³å®ãã¦ãã¾ãã ããæ¥ãä¸å¸ãããããªç¡è¶ã¶ããã»ã»ã» ãåãåªç§ãªãã ããGoè¨èªãè¯ãã¿ããã ããGoè¨èªã§ã»ãã¥ã¢ãªAPIã軽ãä½ã£ã¦ããã¦ããã¤ãã§ã«ã¤ã³ãã©æ§ç¯èªååãæµè¡ã£ã¦ããããå°å ¥ãã¦å®è¡ç°å¢ã®æ§ç¯ãèªååãã¨ãã¦ã ã¨ããç¡è¶ã¶ããããã¨ãã«ããªãã¯ãã®ãããªã¾ãªãããä¸å¸ã«åããã§ãããã å®å¿ãã¦ä¸ããããããªããªãã®ããã«ãã®è¨äºãæ¸ãã¾ãããç¬ åè«ã¯ãã¦ãããæ¬é¡ã«å ¥ãã¾ãã #æ§æ ä»åã®æ§æãå³ã«è¡¨ãã¦ã¿ã¾ãã å³ã®åç §å Go Lang, GitLab, Vagrant, Docker, CircleCi, Ansible, Terraform, AWS 工夫ããç¹ éçºç°
ããã«ã¡ã¯ãã¾ã¡ããã®å·¥è¤ã§ãã ã¾ã¡ããã§ã¯éçºãã¬ã¼ã ã¯ã¼ã¯ã« Rails ãæ¡ç¨ãã¦ãã¾ãããæè¿ã®æ°è¦æ¡ä»¶ã§ã¯ Go è¨èªãæ¡ç¨ãã¦ã¿ã¦ãã¾ãããã®è¨äºã§ã¯ãGo ã§éçºãå§ããã«ããã£ã¦è¡ã£ãã©ã¤ãã©ãªé¸å®ã®ä¸èº«ãç´¹ä»ãããã¨æãã¾ãã é¸å®ã«ããã£ã¦ã¯ãawesome-go ã Qiita ãªã©ã®è¨äºãåèã«ãã¾ããã ModulesGo 1.11 ãã Go modules ãå°å ¥ãããã¨ã®ãã¨ã§ãç´ ç´ã« Go modules ãå©ç¨ãããã¨ã«ãã¾ãããç¹ã«ããããã¨ããªãå©ç¨ãã§ãã¦ãã¾ãã Web Application FrameworkgRPC + grpc-gateway or grpc-web ã»https://github.com/grpc/grpc-go ã»ðproto ã§ã¹ãã¼ãé§åéçºãå¯è½ ã»ð ââï¸REST API ãæä¾ããå ´å㯠grpc-ga
2017å¹´10æ2æ¥ golangã使ã£ã¦éçºããWebAPIã1å¹´åéç¨ãã¦æ¹åãã¦ãããã¨ã¼æé20åPVã®ãã³ã¬ãµã¼ãã¹éçºã®è£å´ ã¯ããã« åãã¾ãã¦ããµã¼ãã¼ãµã¤ãã¨ã³ã¸ãã¢ã®æ½æ ¹ç°ã§ãã 0ããç«ã¡ä¸ã3å¹´ã§æé20åPVéæï¼ãã³ã¬ZEROã®éçºãç½å¼ããã¨ã³ã¸ãã¢ãã¼ã ã§ã®ç´¹ä»ã«ãããããã«ãå¼ç¤¾ã§ã¯è¤æ°ã®ãã³ã¬ã¢ããªã®éçºã並è¡ãã¦é²ãããã¦ãã¾ãã ãã®ä¸ã§ä»åã¯ãã³ã¬ZEROã®æé·éç¨ã§ã¶ã¤ããã ä¹ãè¶ãã¦ããåé¡ããµã¼ãã¼ãµã¤ãè¦ç¹ã§ç´¹ä»ãã¦ããããã¨æãã¾ãã ä¹ãè¶ãã¦ããåé¡ æåã¯PHP5.6+Phalconã¨ãããã¤ã¯ããã¬ã¼ã ã¯ã¼ã¯ã§ãããã¯ããéç¨ãã¦ãã¾ããã ãã³ã¬ZEROã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ã®ã¢ãããã¼ãã®éã«ãgolangãæ¡ç¨ãã¾ããã çç±ã¯ä»¥ä¸ã®2ç¹ã§ãã ãã¤ããªä¸ã¤ã§åä½ãã(å¤é¨ä¾åããªã) 軽éã§ãã¤ããã©ã¼ãã³ã¹ å¼ç¤¾ã«ã¯ç©æ¥µ
ã¯ããã« ååã¯microservicesã®éå ·ã¨ãã¦gRPCã触ã£ã¦ã¿ãã®ã§ä»åã¯å°è¦æ¨¡ãµã¼ãã¹ã«ãã¦ã¿ã¾ãã ã¯ããã« ãµã¼ãã¹æ§æ å®è£ address: ä½ç½®æ å ±ãããã®ä½æãè¿ã maps: ä½ç½®æ å ±ããå¨è¾ºå°å³ãè¿ã API: ãã¼ã¸ã®é¨åãã¤ããæ å ±ãè¿ã front: ãã¼ã¸ã®æ ãè¿ã nginx: ãªãã¼ã¹ãããã· + httpså¦ç åãã ã¾ã¨ã æ¡ç¨æ å ± ãµã¼ãã¹æ§æ Geolocation APIã使ã£ã¦JavaScriptã§ã¯ã©ã¤ã¢ã³ãã®ä½ç½®æ å ±ãåå¾ãã¦ããã®ä½ç½®ã«é¢é£ããæ å ±ã表示ãããã¨ãããã®ãèãã¾ãã ä½ç½®æ å ±ããã®æ å ±åå¾ã¯Yahoo! Open Local Platform (YOLP)ãå©ç¨ãããã¨ã«ãã¾ãã åmicroserviceã®æ¦è¦ã«ã¤ãã¦ã¯: nginx: ãªãã¼ã¹ãããã·ã¨ãã¦åãã»ããGeolocation APIã®å©ç¨ã«ã¯HT
1. ã¡ãªã¼ã¯ãªã¹ãã¹âª ã¯ãªã¹ãã¹ãä»å¹´ããã£ã¦ãã¾ããï¼ ã¿ãªããæ人ã¨ã¤ã«ããã¼ã·ã§ã³ãè¦ã¦æ¥½ããã ããã¦ãã§ããããï¼ ç§ã¯ã²ãããã³ã¿ãã«å ¥ã£ã¦ã¬ãã¬ãããäºå®ã§ãã ã¨ããã§ãã¿ãªããã¯æ人ã¨ã¯ãªã¹ãã¹ã«ã¤ã«ããã¼ã·ã§ã³ãè¦ã«è¡ãã¨ãã£ãäºå®ãåæ»ã«ç®¡çã§ãã¦ãã¾ããï¼ ããï¼è¡ãã£ã¦è¨ã£ãããï¼å¿ããã®ï¼ã ãªãã¦è¨ããã¦ãã¸ããæ²ããããããã¦ãã¾ãããï¼ ãããªæ人ã¨ã®ã¹ã±ã¸ã¥ã¼ã«ç®¡çã«ãå°ãã®æ¹ã«ãªã¹ã¹ã¡ãªã®ã ãGoogle Calendarã ã§ãï¼ å ±æè¨å®ããã¦ããã°ããäºãã®ã¹ã±ã¸ã¥ã¼ã«ãä¸ã¤ã®ã«ã¬ã³ãã¼ã§ç®¡çãããã¨ãã§ãã¾ãã support.google.com PC ããã®å©ç¨ã¯ãã¡ãããiPhone ããã Android ãããã¢ããªã¨ãã¦å©ç¨ã§ãã¾ããããã©ã¦ã¶ããããã°ã©ãããã§ãå©ç¨ã§ãã¾ãã ããã... ããï¼äºå®è¿½å ããããï¼è¦ã¦ãªãã®
æ¤è¨¼ç°å¢ Windows10 Home Edition C:\>go version go version go1.8 windows/amd64 Access Token ã®åå¾ ä»¥ä¸ã®è¨äºãåèã« Gmail API ã§ä½¿ç¨ãã Access Token ãåå¾ãã takaya030.hatenablog.com oauth2 é¢é£ããã±ã¼ã¸ã®åå¾ C:\>go get golang.org/x/oauth2 C:\>go get golang.org/x/oauth2/google C:\>go get google.golang.org/api/gmail/v1 ã½ã¼ã¹ã³ã¼ã gmailtest.go package main import ( "fmt" "time" "log" "golang.org/x/oauth2" "golang.org/x/oauth2/google
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}