Documentation ¶
Index ¶
- Constants
- func GetServiceForRequestOptional(ctx context.Context, key string) (service interface{}, has bool)
- func GetServiceForRequestRequired(ctx context.Context, key string) interface{}
- func GetServiceForRequestSafe(ctx context.Context, key string) (service interface{}, has bool, err error)
- func GetServiceOptional(key string) (service interface{}, has bool)
- func GetServiceRequired(key string) interface{}
- func GetServiceSafe(key string) (service interface{}, has bool, err error)
- func GinFromContext(ctx context.Context) *gin.Context
- func HasService(key string) bool
- func InitGin(server graphql.ExecutableSchema, ginInitHandler GinInitHandler) *gin.Engine
- type AppDefinition
- func (app *AppDefinition) Flags() *Flags
- func (app *AppDefinition) IsInLocalMode() bool
- func (app *AppDefinition) IsInMode(mode string) bool
- func (app *AppDefinition) IsInProdMode() bool
- func (app *AppDefinition) IsInTestMode() bool
- func (app *AppDefinition) Mode() string
- func (app *AppDefinition) Name() string
- type Config
- type DICInterface
- type Exit
- type Flags
- type FlagsRegistry
- type GinInitHandler
- type LogFieldProvider
- type LogRequestFieldProvider
- type ORMRegistryInitFunc
- type Registry
- type RequestLog
- type Script
- type ScriptIntermediate
- type ScriptInterval
- type ScriptIntervalOptional
- type ScriptOptional
- type ServiceDefinition
- type Spring
Constants ¶
View Source
const ModeLocal = "local"
View Source
const ModeProd = "prod"
View Source
const ModeTest = "test"
Variables ¶
This section is empty.
Functions ¶
func GetServiceOptional ¶
func GetServiceRequired ¶
func GetServiceRequired(key string) interface{}
func GetServiceSafe ¶
func HasService ¶
func InitGin ¶
func InitGin(server graphql.ExecutableSchema, ginInitHandler GinInitHandler) *gin.Engine
Types ¶
type AppDefinition ¶
type AppDefinition struct {
// contains filtered or unexported fields
}
func (*AppDefinition) Flags ¶
func (app *AppDefinition) Flags() *Flags
func (*AppDefinition) IsInLocalMode ¶
func (app *AppDefinition) IsInLocalMode() bool
func (*AppDefinition) IsInMode ¶
func (app *AppDefinition) IsInMode(mode string) bool
func (*AppDefinition) IsInProdMode ¶
func (app *AppDefinition) IsInProdMode() bool
func (*AppDefinition) IsInTestMode ¶
func (app *AppDefinition) IsInTestMode() bool
func (*AppDefinition) Mode ¶
func (app *AppDefinition) Mode() string
func (*AppDefinition) Name ¶
func (app *AppDefinition) Name() string
type DICInterface ¶
type DICInterface interface { App() *AppDefinition Log() apexLog.Interface Config() *Config OrmConfig() (orm.ValidatedRegistry, bool) OrmEngine() (*orm.Engine, bool) LogForContext(ctx context.Context) *RequestLog OrmEngineForContext(ctx context.Context) (*orm.Engine, bool) }
func DIC ¶
func DIC() DICInterface
type FlagsRegistry ¶
type FlagsRegistry struct {
// contains filtered or unexported fields
}
type GinInitHandler ¶
type LogFieldProvider ¶
type ORMRegistryInitFunc ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) RegisterDIService ¶
func (r *Registry) RegisterDIService(service ...*ServiceDefinition) *Registry
type RequestLog ¶
type RequestLog struct {
// contains filtered or unexported fields
}
type ScriptIntermediate ¶
type ScriptIntermediate interface {
IsIntermediate() bool
}
type ScriptInterval ¶
type ScriptIntervalOptional ¶
type ScriptIntervalOptional interface {
IntervalActive() bool
}
type ScriptOptional ¶
type ScriptOptional interface {
Active() bool
}
type ServiceDefinition ¶
type ServiceDefinition struct { Name string Global bool Script bool Build func(ctn di.Container) (interface{}, error) Close func(obj interface{}) error Flags func(registry *FlagsRegistry) }
func ServiceDefinitionOrmEngine ¶
func ServiceDefinitionOrmEngine() *ServiceDefinition
func ServiceDefinitionOrmEngineForContext ¶
func ServiceDefinitionOrmEngineForContext() *ServiceDefinition
func ServiceDefinitionOrmRegistry ¶
func ServiceDefinitionOrmRegistry(init ORMRegistryInitFunc) *ServiceDefinition
func ServiceProviderConfigDirectory ¶
func ServiceProviderConfigDirectory(configDirectory string) *ServiceDefinition
Source Files ¶
Click to show internal directories.
Click to hide internal directories.