ioc

package
v0.0.0-...-77539bd Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CategoryProviders = wire.NewSet(handler.NewCategoryHandler, service.NewCategoryService, repository.NewCategoryRepository, dao.NewCategoryDao,
		wire.Bind(new(service.ICategoryService), new(*service.CategoryService)),
		wire.Bind(new(repository.ICategoryRepository), new(*repository.CategoryRepository)),
		wire.Bind(new(dao.ICategoryDao), new(*dao.CategoryDao)),
	)
	CommentProviders = wire.NewSet(handler2.NewCommentHandler, service2.NewCommentService, repository2.NewCommentRepository, dao2.NewCommentDao,
		wire.Bind(new(service2.ICommentService), new(*service2.CommentService)),
		wire.Bind(new(repository2.ICommentRepository), new(*repository2.CommentRepository)),
		wire.Bind(new(dao2.ICommentDao), new(*dao2.CommentDao)))

	FriendProviders = wire.NewSet(handler4.NewFriendHandler, service4.NewFriendService, repository4.NewFriendRepository, dao4.NewFriendDao,
		wire.Bind(new(service4.IFriendService), new(*service4.FriendService)),
		wire.Bind(new(repository4.IFriendRepository), new(*repository4.FriendRepository)),
		wire.Bind(new(dao4.IFriendDao), new(*dao4.FriendDao)))
	VlProviders = wire.NewSet(handler6.NewVisitLogHandler, service6.NewVisitLogService, repository6.NewVisitLogRepository, dao6.NewVisitLogDao,
		wire.Bind(new(service6.IVisitLogService), new(*service6.VisitLogService)),
		wire.Bind(new(repository6.IVisitLogRepository), new(*repository6.VisitLogRepository)),
		wire.Bind(new(dao6.IVisitLogDao), new(*dao6.VisitLogDao)))

	EmailProviders = wire.NewSet(service7.NewEmailService, wire.Bind(new(service7.IEmailService), new(*service7.EmailService)))

	MsgProviders = wire.NewSet(service8.NewMessageService, wire.Bind(new(service8.IMessageService), new(*service8.MessageService)))

	MsgTplProviders = wire.NewSet(handler7.NewMsgTplHandler, service9.NewMsgTplService, repository7.NewMsgTplRepository, dao7.NewMsgTplDao,
		wire.Bind(new(service9.IMsgTplService), new(*service9.MsgTplService)),
		wire.Bind(new(repository7.IMsgTplRepository), new(*repository7.MsgTplRepository)),
		wire.Bind(new(dao7.IMsgTplDao), new(*dao7.MsgTplDao)))

	CountStatsProviders = wire.NewSet(handler11.NewCountStatsHandler, service10.NewCountStatsService, repository8.NewCountStatsRepository, dao8.NewCountStatsDao,
		wire.Bind(new(service10.ICountStatsService), new(*service10.CountStatsService)),
		wire.Bind(new(repository8.ICountStatsRepository), new(*repository8.CountStatsRepository)),
		wire.Bind(new(dao8.ICountStatsDao), new(*dao8.CountStatsDao)))

	TagProviders = wire.NewSet(handler8.NewTagHandler, service11.NewTagService, repository9.NewTagRepository, dao9.NewTagDao,
		wire.Bind(new(service11.ITagService), new(*service11.TagService)),
		wire.Bind(new(repository9.ITagRepository), new(*repository9.TagRepository)),
		wire.Bind(new(dao9.ITagDao), new(*dao9.TagDao)),
	)
	FileProviders = wire.NewSet(handler9.NewFileHandler, service12.NewFileService, repository10.NewFileRepository, dao10.NewFileDao,
		wire.Bind(new(service12.IFileService), new(*service12.FileService)),
		wire.Bind(new(repository10.IFileRepository), new(*repository10.FileRepository)),
		wire.Bind(new(dao10.IFileDao), new(*dao10.FileDao)),
	)

	BackupProviders = wire.NewSet(handler12.NewBackupHandler, service13.NewBackupService,
		wire.Bind(new(service13.IBackupService), new(*service13.BackupService)),
	)
)

Functions

func InitLogger

func InitLogger() io.Writer

func InitMiddlewares

func InitMiddlewares(writer io.Writer, isWebsiteInitialized func() bool) []gin.HandlerFunc

func JwtParseMiddleware

func JwtParseMiddleware(isWebsiteInitialized func() bool) gin.HandlerFunc

JwtParseMiddleware jwt 解析中间件

func NewGinEngine

func NewGinEngine(fileHdr *handler3.FileHandler, ctgHdr *ctgHandler.CategoryHandler, cmtHdr *commentHandler.CommentHandler, cfgHdr *website_config.Handler, frdHdr *friendHanlder.FriendHandler, postHdr *post.Handler, vlHdr *vlHandler.VisitLogHandler, msgTplHandler *handler.MsgTplHandler, tagsHandler *handler2.TagHandler, daHandler *data_analysis.Handler, csHandler *handler5.CountStatsHandler, backupHandler *handler6.BackupHandler, middleware []gin.HandlerFunc, validators Validators, postIndexHdr *post_index.Handler, postDraftHdr *post_draft.Handler, aggregatePostHdr *aggregate_post.Handler, postLikesHdr *post_like.Handler) (*gin.Engine, error)

func NewMongoDB

func NewMongoDB() *mongo.Database

Types

type Validators

type Validators map[string]func(fl validator.FieldLevel) bool

func InitGinValidators

func InitGinValidators() Validators

Jump to

Keyboard shortcuts

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