package svc import ( "app-cloudep-tweeting-service/internal/config" model "app-cloudep-tweeting-service/internal/model/mongo" vi "code.30cm.net/digimon/library-go/validator" ) type ServiceContext struct { Config config.Config Validate vi.Validate PostModel model.PostModel CommentModel model.CommentModel } func NewServiceContext(c config.Config) *ServiceContext { return &ServiceContext{ Config: c, Validate: vi.MustValidator(), PostModel: MustPostModel(c), CommentModel: MustCommentModel(c), } }