apicube

module
v0.0.0-...-9677058 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: GPL-2.0

README

apicube

GoDoc Build Status Go Report Card

Install Packages(dep)

$ make install deps

Protocol generation.

$ make protocol
$ make deps  # I think need this cmd when you are going to install with beginning after "make protocol"

Dependencies Library

protoc@3.6+

$ brew install protobuf

Model migration(Optional)

$ make modelgen

Elasticsearch migration

$ make reindex

Development

Build packages and Run server

$ make runner  # Auto build when file is edited

$ export GRPC_TRACE=all
$ export GRPC_VERBOSITY=DEBUG
$ export GRPC_GO_LOG_VERBOSITY_LEVEL=2
$ export GRPC_GO_LOG_SEVERITY_LEVEL=info
$ export APICUBE_ESURL=http://127.0.0.1:9200
$ (cd ./rpc && make run)

Road to the Goish

This is completely Goish code if resolved all of errors.

$ make check
$ make check-completely

Environment Variables

Frequency used below

Key Default Value Description
APICUBE_URI grpc://0.0.0.0:50001 APICube server: this var is set grpc server's host and port, which means the same as FQDN
APICUBE_GWURI http://0.0.0.0:50000 APICube server: this var is set grpc gateway server's host and port, which means the same as FQDN
APICUBE_RDBURI redis://127.0.0.1:6379/10 Redis: this var is set server host and port with db number, that's like DSN
APICUBE_DLMURI redis://127.0.0.1:6379/9 Redis: DLMURI is set distributed lock server host and port with db number, that's like DSN
APICUBE_ESURL http://127.0.0.1:9200 Elasticsearch: this means is the same as APICUBE_URI
APICUBE_FURI file://./storage/data.flac Storage folder: this var is set s3 or file uri
APICUBE_DSN root:@tcp(127.0.0.1:3306)/apicube?parseTime=true MySQL: Data source name
APICUBE_MODE development Defines project environment mode: development,staging,production
GOOGLE_APPLICATION_CREDENTIALS None Google API Credentials Json e.g. apicube-fca6752be359.json

see base/util/env.go

Directories

Path Synopsis
base
data/storage
Package storage gonna be implementation that stream io processing for memory performance.
Package storage gonna be implementation that stream io processing for memory performance.
job
util/logger
Package logger is simply logger with sentry
Package logger is simply logger with sentry
cmd
rpc
mockpb/mock_lifecycle
Package mock_lifecycle is a generated GoMock package.
Package mock_lifecycle is a generated GoMock package.
mockpb/mock_product
Package mock_product is a generated GoMock package.
Package mock_product is a generated GoMock package.
pb/apicube/lifecycle
Package lifecycle is a reverse proxy.
Package lifecycle is a reverse proxy.
pb/apicube/product
Package product is a reverse proxy.
Package product is a reverse proxy.

Jump to

Keyboard shortcuts

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