template

package
v0.1.387 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blackbox

type Blackbox interface {
	// contains filtered or unexported methods
}

type Client

type Client interface {
	Blackbox
	contract.TemplateOperator
}

func NewClient

func NewClient(opts ClientOptions) (Client, error)

type ClientOption

type ClientOption func(*ClientOptions)

func WithTemplatesFS

func WithTemplatesFS(x fs.FS) ClientOption

func WithTemplatesPath

func WithTemplatesPath(x string) ClientOption

type ClientOptions

type ClientOptions struct {
	TemplatesFS   fs.FS
	TemplatesPath string
}

func ApplyClientOptions

func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions

type DefaultTool

type DefaultTool struct {
	T *contract.Tool[Client]
}

func NewTool

func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool

func (*DefaultTool) Render

func (d *DefaultTool) Render(ctx context.Context, opts contract.RenderOptions) error

Render renders a template with the given options.

type Tool

type Tool interface {
	contract.TemplateOperator
}

Jump to

Keyboard shortcuts

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