Versions in this module Expand all Collapse all v1 v1.4.1 Jan 8, 2021 Changes in this version + const ModeLocal + const ModeProd + const ModeTest + 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 struct + 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 struct + type DICInterface interface + App func() *AppDefinition + Config func() *Config + Log func() apexLog.Interface + LogForContext func(ctx context.Context) *RequestLog + OrmConfig func() (orm.ValidatedRegistry, bool) + OrmEngine func() (*orm.Engine, bool) + OrmEngineForContext func(ctx context.Context) (*orm.Engine, bool) + func DIC() DICInterface + type Exit interface + Custom func(exitCode int) + Error func() + Valid func() + type Flags struct + func (f *Flags) Bool(name string) bool + func (f *Flags) String(name string) string + type FlagsRegistry struct + func (r *FlagsRegistry) Bool(name string, value bool, usage string) + func (r *FlagsRegistry) String(name string, value string, usage string) + type GinInitHandler func(ginEngine *gin.Engine) + type LogFieldProvider func() apexLog.Fielder + type LogRequestFieldProvider func(ctx *gin.Context) apexLog.Fielder + type ORMRegistryInitFunc func(registry *orm.Registry) + type Registry struct + func New(appName string) *Registry + func (r *Registry) Build() *Spring + func (r *Registry) RegisterDIService(service ...*ServiceDefinition) *Registry + type RequestLog struct + func (l *RequestLog) Log(ctx *gin.Context) apexLog.Interface + type Script interface + Description func() string + Run func(ctx context.Context, exit Exit) + Unique func() bool + type ScriptIntermediate interface + IsIntermediate func() bool + type ScriptInterval interface + Interval func() time.Duration + type ScriptIntervalOptional interface + IntervalActive func() bool + type ScriptOptional interface + Active func() bool + type ServiceDefinition struct + Build func(ctn di.Container) (interface{}, error) + Close func(obj interface{}) error + Flags func(registry *FlagsRegistry) + Global bool + Name string + Script bool + func ServiceDefinitionOrmEngine() *ServiceDefinition + func ServiceDefinitionOrmEngineForContext() *ServiceDefinition + func ServiceDefinitionOrmRegistry(init ORMRegistryInitFunc) *ServiceDefinition + func ServiceProviderConfigDirectory(configDirectory string) *ServiceDefinition + type Spring struct + func (s *Spring) RunScript(script Script) + func (s *Spring) RunServer(defaultPort uint, server graphql.ExecutableSchema, ...)