Documentation
¶
Index ¶
- Constants
- func GetContainerFromRequest(ctx context.Context) (ctn di.Container)
- 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 HasService(key string) bool
- func SetContainer(c di.Container)
- type DIInterface
- type Definition
Constants ¶
View Source
const (
GinKey key = iota
)
Variables ¶
This section is empty.
Functions ¶
func GetServiceOptional ¶
func GetServiceRequired ¶
func GetServiceRequired(key string) interface{}
func GetServiceSafe ¶
func HasService ¶
func SetContainer ¶
Types ¶
type DIInterface ¶
type DIInterface interface {
App() *app.App
Config() *config.Config
OrmConfig() (orm.ValidatedRegistry, bool)
OrmEngine() (*orm.Engine, bool)
OrmEngineForContext(ctx context.Context) (*orm.Engine, bool)
JWT() (*jwt.JWT, bool)
Password() (*password.Password, bool)
SlackAPI() (*slackapi.SlackAPI, bool)
ErrorLogger() (errorlogger.ErrorLogger, bool)
OSSGoogle() (oss.Client, bool)
}
func DI ¶
func DI() DIInterface
Click to show internal directories.
Click to hide internal directories.