template

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeTemplateManager

type FakeTemplateManager struct {
	// contains filtered or unexported fields
}

FakeTemplateManager defines a fake for test

func NewFakeTemplateManager

func NewFakeTemplateManager() *FakeTemplateManager

NewFakeTemplateManager create a fake manager for test

func (FakeTemplateManager) IsTrait

func (m FakeTemplateManager) IsTrait(key string) bool

func (FakeTemplateManager) LoadTemplate

func (m FakeTemplateManager) LoadTemplate(key string) string

type Manager

type Manager interface {
	IsTrait(key string) bool
	LoadTemplate(key string) (tmpl string)
}

Manager defines a manager for template

func Load

func Load(namespace string, c common.Args) (Manager, error)

Load will load all installed capabilities and create a manager

type Template

type Template struct {
	Captype types.CapType
	Raw     string
}

Template defines a raw template struct

Jump to

Keyboard shortcuts

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