Composable defines all the functions every component of the presentation layer (HTTP/REST) of your application must implement. These functions are accessors to the essential server resources. A component can be parent of several sub-components.
| 12 | // accessors to the essential server resources. |
| 13 | // A component can be parent of several sub-components. |
| 14 | type Composable interface { |
| 15 | Init(server *Server) |
| 16 | Server() *Server |
| 17 | DB() *gorm.DB |
| 18 | Config() *config.Config |
| 19 | Lang() *lang.Languages |
| 20 | Logger() *slog.Logger |
| 21 | Service(name string) Service |
| 22 | LookupService(name string) (Service, bool) |
| 23 | } |
| 24 | |
| 25 | // Registrer qualifies a controller that registers its routes itself. |
| 26 | // It is required for controllers to implement this interface if you want |
no outgoing calls
no test coverage detected