Documentation ¶
Index ¶
- Constants
- func GetServiceForRequestRequired(ctx context.Context, key string) interface{}
- func GetServiceFromRequest(ctx context.Context, key string) interface{}
- 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 SetContainer(c di.Container)
- func SetRequestServices(servicesDefinitionsRequest []*DefinitionRequest)
- type DIInterface
- type DefinitionGlobal
- type DefinitionRequest
Constants ¶
View Source
const ( AppService = "app" ConfigService = "config" ErrorLoggerService = "error_logger" LocalizerService = "localizer" ExtractorService = "extractor" JWTService = "jwt" DDOSService = "ddos" ORMConfigService = "orm_config" ORMEngineGlobalService = "orm_engine_global" ORMEngineRequestService = "orm_engine_request" OSSGoogleService = "oss_google" PasswordService = "password" SlackAPIService = "slack_api" AmazonS3Service = "amazon_s3" UploaderService = "uploader" StripeService = "stripe" CheckoutService = "checkout" DynamicLinkService = "dynamic_link" SocketRegistryService = "socket_registry" APILoggerService = "api_logger" AuthenticationService = "authentication" ClockService = "clock" SMSService = "sms" GeneratorService = "generator_service" MailMandrill = "mail_mandrill" GoogleService = "google" FacebookService = "facebook" CrudService = "crud" )
View Source
const (
GinKey key = iota
)
Variables ¶
This section is empty.
Functions ¶
func GetServiceFromRequest ¶ added in v0.8.35
func GetServiceOptional ¶
func GetServiceRequired ¶
func GetServiceRequired(key string) interface{}
func GetServiceSafe ¶
func HasService ¶
func SetContainer ¶
func SetRequestServices ¶ added in v0.8.35
func SetRequestServices(servicesDefinitionsRequest []*DefinitionRequest)
Types ¶
type DIInterface ¶
type DIInterface interface { App() *app.App Config() config.IConfig OrmConfig() (beeorm.ValidatedRegistry, bool) OrmEngine() (*beeorm.Engine, bool) OrmEngineForContext(ctx context.Context) *beeorm.Engine JWT() (*jwt.JWT, bool) Password() (*password.Password, bool) SlackAPI() (*slackapi.SlackAPI, bool) ErrorLogger() (errorlogger.ErrorLogger, bool) OSSGoogle() (oss.Client, bool) AmazonS3() (s3.Client, bool) SocketRegistry() (*socket.Registry, bool) APILoggerService() (apilogger.APILogger, bool) AuthenticationService() (*authentication.Authentication, bool) SMSService() (sms.ISender, bool) GeneratorService() (generator.Generator, bool) MailMandrillService() mail.Sender Stripe() (stripe.IStripe, bool) GoogleService() *social.Google Checkout() (checkout.ICheckout, bool) ClockService() clock.Clock UploaderService() (uploader.Uploader, bool) CrudService() *crud.Crud LocalizerService() localizer.Localizer FileExtractorService() *fileextractor.FileExtractor }
func DI ¶
func DI() DIInterface
type DefinitionGlobal ¶ added in v0.8.35
Click to show internal directories.
Click to hide internal directories.