1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-01-26 05:27:33 +02:00
authboss/renderer.go

16 lines
476 B
Go
Raw Normal View History

2017-02-20 14:28:38 -08:00
package authboss
import "context"
// RenderLoader is an object that understands how to load display templates.
// It's possible that Init() is a no-op if the responses are JSON or anything
// else.
type RenderLoader interface {
Init(names []string) (Renderer, error)
2017-02-20 14:28:38 -08:00
}
// Renderer is a type that can render a given template with some data.
type Renderer interface {
Render(ctx context.Context, name string, data HTMLData) (output []byte, contentType string, err error)
2017-02-20 14:28:38 -08:00
}