MCPcopy
hub / github.com/go-goyave/goyave / Composable

Interface Composable

component.go:14–23  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

12// accessors to the essential server resources.
13// A component can be parent of several sub-components.
14type 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

Callers 18

TestRecoveryMiddlewareFunction · 0.65
TestLanguageMiddlewareFunction · 0.65
TestValidateMiddlewareFunction · 0.65
GlobalMiddlewareMethod · 0.65
MiddlewareMethod · 0.65
StatusHandlerMethod · 0.65
ControllerMethod · 0.65
TestPanicStatusHandlerFunction · 0.65
TestRouteFunction · 0.65
HandleMethod · 0.65
TestRouterFunction · 0.65
HandleMethod · 0.65

Implementers 1

Componentcomponent.go

Calls

no outgoing calls

Tested by

no test coverage detected