template service: add Render() method

This commit is contained in:
2020-04-15 18:33:30 +02:00
parent 42aba649c8
commit 636b2dbf8f
2 changed files with 25 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package template
import (
"io"
"net/http"
"github.com/pkg/errors"
@ -13,6 +14,7 @@ const ServiceName service.Name = "template"
// Service is a templating service
type Service interface {
RenderPage(w http.ResponseWriter, templateName string, data interface{}) error
Render(w io.Writer, templateName string, data interface{}) error
}
// From retrieves the template service in the given container