template_service

package
v0.0.0-...-ba64992 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type I18nDocument

type I18nDocument struct {
	Id      primitive.ObjectID `bson:"_id,omitempty"`
	Locale  string             `bson:"locale"`
	Name    string             `bson:"name"`
	Message string             `bson:"message"`
}

func (*I18nDocument) GetId

func (d *I18nDocument) GetId() string

func (*I18nDocument) ToBson

func (d *I18nDocument) ToBson() (bson.M, error)

type I18nReLoader

type I18nReLoader = func(s *template_engine.I18nStore) error

type TemplateService

type TemplateService interface {
	Start(appCtx context.Context, mongoDatabase *mongo.Database, i18nReLoader I18nReLoader) error
	ReloadI18n() error

	RenderTemplate(template string, root *template_engine.RootContext) (string, error)
	NewRootContext() *template_engine.RootContext
}

func New

func New() TemplateService

Jump to

Keyboard shortcuts

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