svc

package
v0.0.0-...-6d7266f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectGorm

func ConnectGorm(c config.MysqlConf, l logx.LogConf) (*gorm.DB, error)

func ConnectRedis

func ConnectRedis(c config.RedisConf) (*redis.Client, error)

func InitEmailDeliver

func InitEmailDeliver(c config.Config) (*mail.MqEmailDeliver, error)

func InitOauth

func InitOauth(c map[string]config.OauthConf) map[string]oauth.Oauth

func NewTestConfig

func NewTestConfig() config.Config

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL