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

template

package
v0.1.58 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fence

type Fence struct {
	Lang        string                 `yaml:"lang" json:"lang"`
	Required    bool                   `yaml:"required,omitempty" json:"required,omitempty"`
	Repeatable  bool                   `yaml:"repeatable,omitempty" json:"repeatable,omitempty"`
	Order       int                    `yaml:"order,omitempty" json:"order,omitempty"`
	Description string                 `yaml:"description,omitempty" json:"description,omitempty"`
	Schema      map[string]interface{} `yaml:"schema,omitempty" json:"schema,omitempty"`
}

type FenceExample

type FenceExample struct {
	Lang string      `yaml:"lang" json:"lang"`
	Body interface{} `yaml:"body" json:"body"`
}

type Template

type Template struct {
	// ResourceURI is host-supplied admitted routing metadata, not authored authority.
	ResourceURI     string                     `json:"-" yaml:"-"`
	ID              string                     `yaml:"id" json:"id"`
	Name            string                     `yaml:"name" json:"name"`
	Description     string                     `yaml:"description,omitempty" json:"description,omitempty"`
	Format          string                     `yaml:"format,omitempty" json:"format,omitempty"`
	AppliesTo       []string                   `yaml:"appliesTo,omitempty" json:"appliesTo,omitempty"`
	Platforms       []string                   `yaml:"platforms,omitempty" json:"platforms,omitempty"`
	FormFactors     []string                   `yaml:"formFactors,omitempty" json:"formFactors,omitempty"`
	Surfaces        []string                   `yaml:"surfaces,omitempty" json:"surfaces,omitempty"`
	Instructions    string                     `yaml:"instructions,omitempty" json:"instructions,omitempty"`
	Fences          []Fence                    `yaml:"fences,omitempty" json:"fences,omitempty"`
	Schema          map[string]interface{}     `yaml:"schema,omitempty" json:"schema,omitempty"`
	Examples        []TemplateExample          `yaml:"examples,omitempty" json:"examples,omitempty"`
	LookupOverlays  []*overlay.Overlay         `yaml:"lookupOverlays,omitempty" json:"lookupOverlays,omitempty"`
	LookupLibraries []overlay.LibraryReference `yaml:"lookupLibraries,omitempty" json:"lookupLibraries,omitempty"`
}

func (*Template) Validate

func (t *Template) Validate() error

func (*Template) ValidateForParent added in v0.1.57

func (t *Template) ValidateForParent(immutableParent bool) error

ValidateForParent additionally requires stamped library refs when this template is itself loaded from an immutable parent revision.

type TemplateExample

type TemplateExample struct {
	Title  string         `yaml:"title,omitempty" json:"title,omitempty"`
	Fences []FenceExample `yaml:"fences,omitempty" json:"fences,omitempty"`
}

Jump to

Keyboard shortcuts

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