Documentation ¶
Index ¶
- func ConnectGorm(c config.MysqlConf, l logx.LogConf) (*gorm.DB, error)
- func ConnectRedis(c config.RedisConf) (*redis.Client, error)
- func InitEmailDeliver(c config.Config) (*mail.MqEmailDeliver, error)
- func InitOauth(c map[string]config.OauthConf) map[string]oauth.Oauth
- func NewTestConfig() config.Config
- type ServiceContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectRedis ¶
func InitEmailDeliver ¶
func InitEmailDeliver(c config.Config) (*mail.MqEmailDeliver, error)
func NewTestConfig ¶
Types ¶
type ServiceContext ¶
type ServiceContext struct { Config config.Config Gorm *gorm.DB Redis *redis.Client LocalCache *collection.Cache EmailDeliver *mail.MqEmailDeliver CaptchaHolder *captcha.CaptchaHolder Oauth map[string]oauth.Oauth TUserModel model.TUserModel TUserOauthModel model.TUserOauthModel TUserLoginHistoryModel model.TUserLoginHistoryModel TRoleModel model.TRoleModel TApiModel model.TApiModel TMenuModel model.TMenuModel TUserRoleModel model.TUserRoleModel TRoleApiModel model.TRoleApiModel TRoleMenuModel model.TRoleMenuModel // blog models TWebsiteConfigModel model.TWebsiteConfigModel TArticleModel model.TArticleModel TCategoryModel model.TCategoryModel TTagModel model.TTagModel TArticleTagModel model.TArticleTagModel TCommentModel model.TCommentModel TRemarkModel model.TRemarkModel TFriendModel model.TFriendModel TTalkModel model.TTalkModel TPhotoModel model.TPhotoModel TAlbumModel model.TAlbumModel TPageModel model.TPageModel TVisitHistoryModel model.TVisitHistoryModel TOperationLogModel model.TOperationLogModel TChatMessageModel model.TChatMessageModel TFileFolderModel model.TFileFolderModel TFileUploadModel model.TFileUploadModel }
func NewServiceContext ¶
func NewServiceContext(c config.Config) *ServiceContext
func NewTestServiceContext ¶
func NewTestServiceContext() *ServiceContext
Click to show internal directories.
Click to hide internal directories.