template

package
v0.7.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTemplateRender = errors.New("template error")

Functions

func DecodeTemplateHookFunc

func DecodeTemplateHookFunc() mapstructure.DecodeHookFunc

Types

type Request

type Request struct {
	Method   string
	URL      *url.URL
	ClientIP []string
	// contains filtered or unexported fields
}

func WrapRequest

func WrapRequest(ctx heimdall.Context) *Request

func (*Request) Cookie

func (r *Request) Cookie(name string) string

func (*Request) Header

func (r *Request) Header(name string) string

type Template

type Template interface {
	Render(ctx heimdall.Context, sub *subject.Subject, values map[string]string) (string, error)
	Hash() []byte
}

func New

func New(val string) (Template, error)

Jump to

Keyboard shortcuts

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