参考:golang-samples/cloudsql/postgres/database-sql at master · GoogleCloudPlatform/golang-samples
- Cloud SQL Clientロールを持つSAとJSONキー作成
package middleware | |
import ( | |
"bytes" | |
"context" | |
"encoding/base64" | |
"encoding/json" | |
"net/http" | |
) |
参考:golang-samples/cloudsql/postgres/database-sql at master · GoogleCloudPlatform/golang-samples
FROM golang:1.15-buster AS debug | |
WORKDIR /app | |
COPY . . | |
RUN curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin | |
CMD air | |
FROM golang:1.15-buster AS build | |
WORKDIR /app | |
ENV CGO_ENABLED=0 | |
COPY go.* ./ |
github-actions/README.md at master · GoogleCloudPlatform/github-actions
End-to-end testing (or “E2E”) is the biggest, scariest, slowest, and most valuable type of testing around. They don’t interact at a code level, they interact like they’re a real user doing real things. They’re usually not going to cover every little thing, they’re more about ensuring critical paths through the ecosystem are supported, touching multiple applications and APIs to achieve that task.
The interactions are real, maybe a few config variables are using “Test” keys for sending emails and making payments, and maybe those are sandbox environments, but everything else is actually happening.
These sorts of tests are slow and hard to set up, they need to have real records created in the database and real users need to exist to do that. If the tests are run in a QA environment maybe they can do a big reset script to make all the APIs start from scratch, or its creating a new user every time - which can make the database huge if these tests run hourly.
E2E usually involves running the enti
https://stackoverflow.com/questions/55300370/postgresql-serial-vs-identity
serial
は、Postgresで古くから使われてきた自動生成された一意の値の「古い」実装です。しかし、これはSQL標準の記法ではありません。
GinはGo (Golang)で書かれたWebフレームワークです。martiniのようなAPIを採用しており、httprouterのおかげで最大40倍のパフォーマンスを実現しています。パフォーマンスと生産性を求めるならば、Ginを気に入ることでしょう。
Ginの紹介