Added template renderer service.
This commit is contained in:
parent
d2ce5c34c4
commit
38cf009b70
5 changed files with 146 additions and 78 deletions
|
|
@ -27,6 +27,7 @@ type Container struct {
|
|||
ORM *ent.Client
|
||||
Mail *MailClient
|
||||
Auth *AuthClient
|
||||
Templates *TemplateRenderer
|
||||
}
|
||||
|
||||
func NewContainer() *Container {
|
||||
|
|
@ -38,6 +39,7 @@ func NewContainer() *Container {
|
|||
c.initORM()
|
||||
c.initMail()
|
||||
c.initAuth()
|
||||
c.initTemplateRenderer()
|
||||
return c
|
||||
}
|
||||
|
||||
|
|
@ -144,3 +146,7 @@ func (c *Container) initMail() {
|
|||
func (c *Container) initAuth() {
|
||||
c.Auth = NewAuthClient(c.Config, c.ORM)
|
||||
}
|
||||
|
||||
func (c *Container) initTemplateRenderer() {
|
||||
c.Templates = NewTemplateRenderer(c.Config)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue