Coder Social home page Coder Social logo

fer's Introduction

fer

fer is not Ferdian

INSTALL

go get github.com/kumparan/fer

It should be available as command now in terminal.

Check fer version

fer version

Feature

  • Scaffold New Microservices
  • Generate Service&test files and Client files From Proto
  • DB migration file generator
  • Generate Repository (include model)
  • Gocek, checks go mod update info
  • Add worker with command
  • Add Nats Subscriber with command

Config

Add .ferconfig.json into $HOME/.ferconfig.json, use the .ferconfig.json.example as reference

Kumparan Microservices Generator

fer generate project content-service --proto pb/example/example.proto

you can make microservices start from proto. see the proto example in pb/ folder

Usage

you need to create proto file with services RPC with path like this pb/'$service/$protoname.proto

example (see the proto example in folder pb/) pb/content/content_service.proto

service ContentService{
     // Topic  << you must define the domain
     rpc CreateTopic(CreateTopicRequest) returns (Topic) {}
     rpc DeleteTopicByID(DeleteByIDRequest) returns (Empty) {}
 
     // Story  << you must define the domain
     rpc CreateStory(CreateTopicRequest) returns (Topic){}
     rpc DeleteStoryByID(DeleteByIDRequest) returns (Empty){}
 }

and create microservices fer generate project content-service --proto pb/example/example.proto

  • new service will generated like this
-content-service/
   -client/    ->(Generated From Proto)
   -config/
   -console/
   -db/
   -event/
   -pb/
   -repository/
   -service/     ->(Generated From Proto)
   -worker/
   -config.yml
   -config.yml.dev
   -config.yml.example
   -config.yml.prod
   -config.yml.staging
   -go.mod       ->(mod is already with service name)
   -go.sum
   -LICENSE
   -main.go
   -Makefile
   -README.md

DB MigrationFile Generator

You can create db migration file

fer generate migration create_story

and new migration will be created like this

db/migration/20191007130809_create_story.sql

Repository & Model Generator

You can create repository and model file fer generate repository promoted_link

and new repository and model will be created like this

repository/model/promoted_link.go created
repository/promoted_link_repository.go created

Push Deploy Tag

fer deploy dev-a for deployment, push deployment tag

Create Changelog

fer create chglog vx.x.x to generate CHANGELOG.md

Gocek

fer gocek check current working directory

fer gocek all check all directory listed in .ferconfig.json

fer's People

Contributors

bambangdeny avatar fajrifernanda avatar luthfiaida avatar naluthfi avatar notblessy avatar samuelmjn avatar zhenqianz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.