Wisely building web applications.
With athena
you can easily run net/http
applications that will gracefully be stopped once receive a INTERRUPT
signal (Ctrl+C). For example:
athena.GracefulHTTP(&http.Server{
Addr: ":3000", // bind address
Handler: app.Handler(), // your http handler
}, serviceStarter) // from github.com/lab259/go-rscsrv
If you prefer fasthttp
:
athena.GracefulFastHTTP(
app.NewServer(), // your fasthttp server
":3000", // bind address
serviceStarter, // from github.com/lab259/go-rscsrv
)
athena
ships with a CLI to generate models (for PostgreSQL and MongoDB) and services. Execute athena --help
for more information:
Usage: athena [OPTIONS] COMMAND [arg...]
Wisely building web applications
Options:
-v, --version Show the version and exit
Commands:
make:service Generate a service
make:model Generate a model
make:mgomodel Generate a mgo model
A configuration loader implementation from YAML files.
Parse pagination values (current page and page size) with sane defaults.
Built-in go-rscsrv
's Service implementation for common services:
Utilities for testing applications:
envtest
: overwrite environment variablesginkgtest
: initialize ginkgo with macchiato + reporters for CIhttptest
: wrappers for net/http, fasthttp, hermes usinghttpexpect
mgotest
: helpers for cleansing the databasepsqltest
: overwrite the default PostgreSQL service implemenation to use transationsrscsrvtest
: initilize serveral services (with before and after hooks)
Validate structs and values using the go-playground/validator.v9
.
What things you need to setup the project:
Close the repository:
git clone [email protected]:lab259/athena.git
Now, the dependencies must be installed.
cd athena && go mod download
😉 Finally, you are done to start developing.
In the root directory, execute:
make test
To enable coverage, execute:
make coverage
To generate the HTML coverage report, execute:
make coverage coverage-html