Skip to content

nirajgeorgian/account

Repository files navigation

Account API

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

Setup to start working on this project

Install GoLang

version as of writing: go version go1.12.4 darwin/amd64

setup $GOPATH

# In your bash profile
export GOPATH="/Users/nirajgeorgian/Documents/go"
export PATH=$PATH:$GOPATH/bin

IMPORTANT! Make sure this repository is located at

$GOPATH/src/github.com/nirajgeorgian/account

Install protobuf

Mac: make setup-protobuf-mac Linux: make setup-protobuf-linux

See: Error if there are any failures

Setup Go environment

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

Development

run the api's locally

Generate protos

After updating protobuf files, you need to regenerate dependent code

make protos

Build Services

make build

Running account service

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]

ex: ./bin/server server --help

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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published