routes

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

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

func Register(e *gin.Engine, p repo.Pool, c cfg2.Usecases) error

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.

Jump to

Keyboard shortcuts

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