gateway

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: MIT

README

Go Reference Go Report Card codecov Tests Release

Gateway

Main entrypoint to GRPC microservices.

Run

Get the gateway service account as a key JSON file.

gcloud iam service-accounts keys create ./gateway-key.json \
    --iam-account=echo-slam-planetfall-gateway@echo-slam-planetfall.iam.gserviceaccount.com

Set the GOOGLE_APPLICATION_CREDENTIALS as the path to this JSON file.

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key/json/gateway-key.json

Setup your configuration file (ex: config.dev.yaml)

Run

go run ./cmd/server/main.go --env development --config ./config/config.dev.yaml

Tests

Run the tests

go test ./...

Run the tests with coverage

go test -v -race -covermode=atomic -coverprofile=coverage.out ./...

Print the coverage in HTML

go tool cover -html=coverage.out

Lint

Report card

goreportcard-cli

Golang Lint

golangci-lint run

Release

go mod tidy
go test ./...
git commit -m "release"
git tag v0.1.0
git push origin v0.1.0
GOPROXY=proxy.golang.org go list -m github.com/planetfall/gateway@v0.1.0

Directories

Path Synopsis
cmd
internal
connection/grpc
Package grpc provides a Connection implementation.
Package grpc provides a Connection implementation.
controller
Package controller provides a base helper type.
Package controller provides a base helper type.
controller/download
Package download aims to interact with the download job using Cloud and websocket features.
Package download aims to interact with the download job using Cloud and websocket features.
controller/download/subscriber
Package subscribe is a helper that interacts with Pub/Sub Cloud feature.
Package subscribe is a helper that interacts with Pub/Sub Cloud feature.
controller/search
Package search contains the music researcher controller.
Package search contains the music researcher controller.
service
Package service manage the service controllers and the HTTP server.
Package service manage the service controllers and the HTTP server.
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL