Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piyushjajoo/crud
crud is a cobra based CLI utility which helps in scaffolding a simple go based micro-service along with build scripts, api documentation, micro-service documentation and k8s deployment manifests
https://github.com/piyushjajoo/crud
cli cobra crud-cli docker golang helm http-server k8s kubernetes scaffolding
Last synced: 21 days ago
JSON representation
crud is a cobra based CLI utility which helps in scaffolding a simple go based micro-service along with build scripts, api documentation, micro-service documentation and k8s deployment manifests
- Host: GitHub
- URL: https://github.com/piyushjajoo/crud
- Owner: piyushjajoo
- License: mit
- Created: 2021-11-23T04:20:33.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-25T17:51:13.000Z (about 3 years ago)
- Last Synced: 2024-11-18T02:47:56.625Z (3 months ago)
- Topics: cli, cobra, crud-cli, docker, golang, helm, http-server, k8s, kubernetes, scaffolding
- Language: Go
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# crud
crud is a CLI utility which helps in scaffolding a simple go based micro-service along with
build scripts, api documentation, micro-service documentation and k8s deployment manifests## Install Crud CLI
Run following command to install the cli -
```shell
go install github.com/piyushjajoo/crud@latest
```### crud help
```
crud is a CLI utility which helps in scaffolding a simple go based micro-service along with
build scripts, api documentation, micro-service documentation and k8s deployment manifestsUsage:
crud [command]Available Commands:
completion generate the autocompletion script for the specified shell
help Help about any command
init init creates the scaffolding for the go based micro-serviceFlags:
-h, --help help for crudUse "crud [command] --help" for more information about a command.
```## Initialize Command
Initialize command initializes the project.
If `--swagger` flag is provided, swagger documentation will be created.
If `--chart` flag is provided, helm chart to deploy the service will be created.```shell
crud init github.com/piyushjajoo/inventory --swagger --chart
```### crud init help
```
Init (cobra init) command initializes the go module along with a bare-bone http-server.
Please make sure you have go installed and GOPATH set. Also make sure you have helm v3 installed as well.By default if no flags provided it initializes following -
1. go.mod and go.sum files
2. Dockerfile to build your micro-service along with build.sh script
3. main.go with bare http-server written in gorilla mux
4. README.md with basic SummaryIf you want api documentation provide --swagger flag. If you want helm chart provide --chart flag.
Usage:
crud init [flags]Aliases:
init, initialize, initialise, createFlags:
-c, --chart to generate helm chart
-h, --help help for init
-n, --name string module name for the go module, last part of the name will be used for directory name (e.g 'github.com/piyushjajoo/crud' is the module name and crud is the directory name)
-s, --swagger to generate swagger api documentation file
```