gotmpl

package
v0.0.0-...-86901c9 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observation

type Observation struct {
	Meta        map[string]any
	Observation string
}

type TemplateCtx

type TemplateCtx struct {
	// The template id
	Id       string `json:"id"`
	Template string `json:"template"`

	Params map[string]any `json:"params"`
	// contains filtered or unexported fields
}

func New

func New() *TemplateCtx

func (*TemplateCtx) HttpDo

func (tc *TemplateCtx) HttpDo(r *http.Request) (any, error)

func (*TemplateCtx) HttpRequest

func (tc *TemplateCtx) HttpRequest(method, url string, tmpl string, headers ...string) (any, error)

func (*TemplateCtx) Post

func (tc *TemplateCtx) Post(url string, tmpl string, headers ...string) (any, error)

func (*TemplateCtx) Read

func (tc *TemplateCtx) Read(r io.ReadCloser) (any, error)

func (*TemplateCtx) Run

func (tc *TemplateCtx) Run(ctx context.Context) (any, error)

Jump to

Keyboard shortcuts

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