lego

command module
v0.0.0-...-1180a88 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: MIT Imports: 7 Imported by: 0

README

lego

Lego is a tool for limiting the writing of boilerplate code and copypasta when creating an application. It provides functionality to generate common necessary structures such as HTTP handlers, routers, models, configurations, and more.

Getting Started

To install, run:

go install github.com/colinso/lego

Create a config file. Currently only yaml is supported. Examples can be found in yamlConfigs.

To generate a basic Go microservice, run lego generate <pathToConfig> <pathToProject>. This will create your router, server, handlers, and set up dependency injection and config files.

Run your service with make run from the project root. This will start an HTTP server at port 8080 by default.

Roadmap

Quality of Life
  • Add error handling so that it's clear what bad configs caused what
  • Use swaggo to generate swagger docs
  • Allow for default service configs - if you don't specify, what do we spin up?
  • Only overwrite existing files if specified --> Ask for confirmation?
  • JSON/TOML support
HTTP
Repo
  • Generate repo layer for DB schema
  • Call repo layer from service layer
Service Types
  • AWS Lambda support
  • CLI tool support
Questions/Ideas
  • What if I changed the yaml structure? Create service defined by model rather than layers?

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL