Help us shape the future of Go! Take the 2026 Go Developer Survey

template

package
v1.74.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleRenderer

type BundleRenderer = api.BundleRenderer

Re-export api types for backward compatibility

type Factory

type Factory = api.Factory

Re-export api types for backward compatibility

type Registry

type Registry interface {
	Register(factory Factory)
	GetSupportedTypes() []string
	HasType(templateType string) bool
	HasSchema(schema string) bool
	CreateTemplateBySchema(reader io.Reader, renderBundle BundleRenderer) (Template, io.Reader, error)
	CreateTemplateByType(templateType string, renderBundle BundleRenderer) (Template, error)
	GetSupportedSchemas() []string
	HelpText() string
}

func NewRegistry

func NewRegistry() Registry

NewRegistry creates a new registry and registers all built-in template factories.

type Template

type Template = api.Template

Re-export api types for backward compatibility

type UnknownSchemaError

type UnknownSchemaError struct {
	Schema string
}

UnknownSchemaError is returned when a schema is not recognized

func (*UnknownSchemaError) Error

func (e *UnknownSchemaError) Error() string

type UnknownTypeError added in v1.64.0

type UnknownTypeError struct {
	Type string
}

UnknownTypeError is returned when a template type is not recognized

func (*UnknownTypeError) Error added in v1.64.0

func (e *UnknownTypeError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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