pushplatform

package module
v0.0.0-...-8f76a04 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 1 Imported by: 0

README

push-platform

other_service => [PushPlatform]http_server => SQS => [PushPlatform]worker => SNS for Push

getting started

Settings up
1. create .env
# required environment
ENV=development
DEBUG=true

LOCALHOST_HTTP_DSN="0.0.0.0:50100"
LOCALHOST_HTTP_TIMEOUT="2s"

# AWS Secrets keys only use local machine, not remote machines
AWS_REGION=ap-northeast-2
AWS_ACCESS_KEY_ID=###
AWS_SECRET_ACCESS_KEY=###
2. direnv allow
  • direnv is good for backend engineers
~/Workspace/pickstudio/push-platform   main ✚ ● ?  direnv allow
# direnv: export +AWS_REGION +DEBUG +ENV +HTTP_SERVER_DSN ....
3. go run server
go run cmd/http_server/main.go
go run cmd/worker/main.go
Developments
run unit test
go test ./... -v
run integration test
go run cmd/http_server/main.go
# on another terminal
go run cmd/e2e_test/main.go
generate codes
  • openapi code following api/oapi/oapi.yaml
oapi-codegen --config=api/oapi/v1/oapi-codegen-config.yaml api/oapi/v1/v1.yaml > api/oapi/v1/v1.oapi.go
go generate ./...

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OAPISpecYAML embed.FS

OAPISpecYAML is the Open API Specifications Manifest document that defines golive HTTP API.

View Source
var StaticSwaggerUI embed.FS

Static is a collection of pre-built static files for swagger web ui.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
api
oapi/v1
Package v1 provides primitives to interact with the openapi HTTP API.
Package v1 provides primitives to interact with the openapi HTTP API.
cmd
e2e_test command
http_server command
worker command
edge
chi
sqs
internal
pkg
er

Jump to

Keyboard shortcuts

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