Documentation ¶
Overview ¶
Package routes contains all resource packages and facilitates instantiation and registration of all repo, use case, and resource packages based on the user provided configuration settings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register instantiates relevant repositories and use cases based on the c configuration settings. The p connections pool is passed to the use case instances, so they may acquire/release connections and transactions on demand. These connections/transactions will be passed to the repositories later in order to run relevant queries on them and accomplish those use cases. Each use case package is named like carsuc and each repository package is named like carsrp. Register instantiates a series of "resource" structs, from packages which are named like carsrs, in order to adapt the use cases interfaces with the REST APIs. These resources are registered as request handlers using the e gin-gonic engine instance. Possible errors will be returned after possible wrapping.
Types ¶
This section is empty.