Documentation
¶
Overview ¶
Alias public types and functions for the package gimbap.
Index ¶
- func CreateApp(option app.AppOption) *app.GimbapApp
- func DefineController(option controller.ControllerOption) *controller.Controller
- func DefineModule(option module.ModuleOption) *module.Module
- func DefineProvider(option provider.ProviderOption) *provider.Provider
- func GetProvider[T interface{}](a app.GimbapApp, prov T) (ret T)
- type AppOption
- type Controller
- type ControllerOption
- type GimbapApp
- type IController
- type IMicroService
- type IServerEngine
- type Module
- type ModuleOption
- type Provider
- type ProviderOption
- type RouteSpec
- type RuntimeOptions
- type ServerEngineOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefineController ¶
func DefineController(option controller.ControllerOption) *controller.Controller
Define a controller.
Defines a special provider that is used to handle RESTful requests. The controller will be registered to the app and can be injected to the other controllers.
func DefineModule ¶
func DefineModule(option module.ModuleOption) *module.Module
Define a module.
This defines a module with the given option. The module is used to determine the dependencies of the providers.
func DefineProvider ¶
func DefineProvider(option provider.ProviderOption) *provider.Provider
Define a provider.
This defines a provider with the given option. The provider will be registered to the app and can be injected to the controllers.
func GetProvider ¶
Function to get a provider from the app.
Provide the app and the provider type to get the provider instance. If the provider is not found, it will panic.
Types ¶
type Controller ¶ added in v0.0.4
type Controller = controller.Controller
type aliases for public apis
type ControllerOption ¶
type ControllerOption = controller.ControllerOption
type aliases for public apis
type ServerEngineOption ¶
type ServerEngineOption = engine.ServerEngineOption
type aliases for public apis
Directories
¶
| Path | Synopsis |
|---|---|
|
File: http-engine.go
|
File: http-engine.go |
|
File: module.go
|
File: module.go |
|
file: provider.go
|
file: provider.go |