This Go Web Template is a simple starter template for a Go web application. It includes a web server API, as well as a starter CLI to manage the web server/database inside the container. It should be noted that while while use of the standard library is a high priority, this template does make use of multiple external packages. It does however abide by the standard http handler pattern.
The App folder contains the main modules packages/applications that utilize the other packages. These are the applications that are compiled and shipped with the docker-image.
#### internal
Internal packages are used to provide the core functionality of the application that need to be shared across Applications _but_ are still tightly coupled to other packages or applications. These can often be bridges from the pkgs folder to the app folder to provide a common interface.
#### pkgs
The packages directory contains packages that are considered drop-in and are not tightly coupled to the application. These packages should provide a simple and easily describable feature. For example. The `hasher` package provides a Password Hashing function and checker and can easily be used in this application or any other.
A good rule to follow is, if you can copy the code from one package to a completely. different project with no-modifications, it belongs here.
#### ent
As an exception to the above, this project adhears to the convention set by `Ent` we use a `ent` folder to contain the database schema. If you'd like to replace the Ent package with an alternative, you can review the repository layer in the `internal` folder.
[Checkout the Entgo.io Getting Started Page](https://entgo.io/docs/getting-started)
### Configuring The API
See the [Application Configuration](#application-configuration) section for more information.
## How To Use: Application CLI
### Manage Users
#### List Users
```bash
go run ./app/cli/*.go users list
```
#### Create User
**Development**
```bash
go run ./app/cli/*.go users add --name=hay-kot --password=password --email=hay-kot@pm.me --is-super