Account Service is responsible for entire account section of job portal microservice
- Create an account
- Update an account
- Delete an account
- Suspend an account
Setup to start working on this project
version as of writing: go version go1.12.4 darwin/amd64
# In your bash profile
export GOPATH="/Users/nirajgeorgian/Documents/go"
export PATH=$PATH:$GOPATH/bin
$GOPATH/src/github.com/nirajgeorgian/account
Mac: make setup-protobuf-mac
Linux: make setup-protobuf-linux
See: Error if there are any failures
Install go dep tool (https://github.com/golang/dep)
make setup-dep
Install go dependencies*
make setup-go
these need to be managed outside of the vendor/ directory because they are used in proto code generation
run the api's locally
After updating protobuf files, you need to regenerate dependent code
make protos
make build
account service is build as an command line application. After running
make build
run./bin/server --help
to view available commands
account service is responsible for CRUD with account entity
Usage:
account [flags]
account [command]
Available Commands:
createAccount create an account with gRPC server on:3000
help Help about any command
serve serves the gRPC server
version Print the account service version
Flags:
-c, --config string config file (default is config.yaml)
-h, --help help for account
-v, --verbose verbose output (default is false)
-r, --viper Use Viper for configuration (default is true) (default true)
Use "account [command] --help" for more information about a command.
use is like this
./bin/server [command] [flags]
start the gRPC server on provided port along with the provided database URI
Usage:
account serve [flags]
Flags:
-d, --databaseuri string database URI for postgresql (required)
-h, --help help for serve
-p, --port int port configuration for this application (default 3000)
-x, --proxycount string no. of proxy count
-k, --secretkey string secret key for application (required) (default "dododuckN9")
Global Flags:
-c, --config string config file (default is config.yaml)
-v, --verbose verbose output (default is false)
-r, --viper Use Viper for configuration (default is true) (default true)