Git Product home page Git Product logo

clar's Introduction

CLean ARchitecture

This is a Go application for creating a clean architecture of the application being developed.

⚠ Currently only MySQL is supported

Table of Contents

Build

make && sudo mv bin/clar /usr/local/bin/

Usage

Initialization

clar i [-d dbtype|--db=dbtype] [-i|--internal]

or

clar init [-d dbtype|--db=dbtype] [-i|--internal]
  • dbtype - for what type of database (default: mysql).
  • -i, --internal - put the code in the internal directory.

Will be created:

Entity And Repository

Creating a entity with repository.

clar e [-n name|--name=name] [-i|--internal]

or

clar entity -n name|--name=name [-d dbtype|--db=dbtype] [-i|--internal] [-s|--simple] or [-e|--empty]
  • name - entity name (required).
  • dbtype - for what type of database (default: mysql).
  • -s, --simple - simple entity.
  • -e, --empty - empty entity.
  • -i, --internal - put the code in the internal directory.

Will be created (example clar i -nuser):

if there was no initialization, there will be automatic initialization for the selected database.

Array Structure For JSON Columns

Creating an array structure for a json column.

clar a -n name|--name=name [-i|--internal]

or

clar array -n name|--name=name [-i|--internal]
  • name - struct name (required).
  • -i, --internal - put the code in the internal directory.

Will be created (example clar i -nmyArr) domain/entity/my_arr.go.

Structure For JSON Columns

Creating a structure for a json column.

clar s -n name|--name=name [-i|--internal]

or

clar struct -n name|--name=name [-i|--internal]
  • name - struct name (required).
  • -i, --internal - put the code in the internal directory.

Will be created (example clar i -nmyStruct) domain/entity/my_struct.go.

Migration Tools

Creating migration tools code.

clar m [-d dbtype|--db=dbtype] [-i|--internal]

or

clar migrate [-d dbtype|--db=dbtype] [-i|--internal]
  • dbtype - for what type of database (default: mysql).
  • -i, --internal - put the code in the internal directory.

Will be created (for MySQL):

Help

Any of the options:

clar -h|--help

License

MIT License © Roman Novikov

clar's People

Contributors

novikovroman avatar

Stargazers

 avatar

Watchers

James Cloos 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.