templateservice

package
v0.0.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteTemplate

func ExecuteTemplate(inj *Injector, w io.Writer, file string, data interface{}) error

ExecuteTemplate executed a template with the supplied data into the io.Writer w

func GetFlashbag

func GetFlashbag(logger *logrus.Entry, mgr *sessionstore.SessionManager) func() template.HTML

GetFlashbag return a HTML string populated with flash messages, if available

func GetUsernameById

func GetUsernameById(ds *dbservice.DBService, id uint) string

GetUsernameById returns a username by id

func ParseEmailTemplate

func ParseEmailTemplate(messageType string, data interface{}) (string, error)

ParseEmailTemplate parses and email template with the given data

Types

type Injector

type Injector struct {
	Logger  *logrus.Entry
	SessMgr *sessionstore.SessionManager
	Ds      *dbservice.DBService
}

Jump to

Keyboard shortcuts

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