httptemplate

package
v0.0.0-...-ba0f816 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TOMLAction

func TOMLAction(w http.ResponseWriter, r *http.Request)

Types

type Output

type Output struct {
	Views []*View
}

type Template

type Template struct {
	Name        string
	Description string
	Config      TemplateConfig
	Data        map[string]string
}

func (*Template) MustTOML

func (t *Template) MustTOML() []byte

func (*Template) Parse

func (t *Template) Parse() (*templateview.View, error)

func (*Template) Validate

func (t *Template) Validate() (string, error)

type TemplateConfig

type TemplateConfig struct {
	TTLInSeconds    int64
	Delivery        string
	Topic           string
	ContentTemplate map[string]string
	HeaderTemplate  map[string]string
	Params          texttemplate.ParamDefinitions
	Engine          string
}

type View

type View struct {
	Name        string
	Description string
	Type        string
	Config      *templateview.Config
}

Jump to

Keyboard shortcuts

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