It provides you basic api structure for development.
You can add your api to pkg/api folder and register api to service in main.go file like below.
If you want authorization by JWT you can set "IsPublic" flag as false but you need to modify login api for verify credentials.
var routes = []models.Route{
models.Route{HandlerFunction: api.Login, Path: "/login", MethodName: "POST", IsPublic: true},
models.Route{HandlerFunction: api.VerifyTest, Path: "/myNewApi", MethodName: "POST", IsPublic: false},
}
It includes logging middleware. Logging middleware is logging all requests to log file which seperated by date.
You can run the service with the following command.
You need to set your service variables in .env file before run
In cmd folder
go run main.go