template package - github.com/AliceO2Group/Control/configuration/template - Go Packages

Package template provides template processing functionality for configuration files, including custom field handling and template execution.

This section is empty.

type BuildObjectStackFunc func(stage Stage) map[string]interface{}
type ConfigurationService interface {
	GetComponentConfiguration(query *componentcfg.Query) (payload string, err error)
	GetComponentConfigurationWithLastIndex(query *componentcfg.Query) (payload string, lastIndex uint64, err error)
	GetAndProcessComponentConfiguration(query *componentcfg.Query, varStack map[string]string) (payload string, err error)
	ResolveComponentQuery(query *componentcfg.Query) (resolved *componentcfg.Query, err error)

	GetDetectorForHost(hostname string) (string, error)
	GetDetectorsForHosts(hosts []string) ([]string, error)
	GetCRUCardsForHost(hostname string) ([]string, error)
	GetEndpointsForCRUCard(hostname, cardSerial string) ([]string, error)

	GetRuntimeEntry(component string, key string) (string, error)
	SetRuntimeEntry(component string, key string, value string) error
}
type ConsulTemplateLoader struct {
	
}

Implements pongo2.TemplateLoader to fetch included templates from Consul paths

func NewConsulTemplateLoader(confSvc ConfigurationService, basePath string) *ConsulTemplateLoader
func WrapGeneric(getterF GetterFunc, setterF SetterFunc) Field

WrapMapItems creates a slice of Fields from a map of string key-value pairs. It wraps each map item in a GenericWrapper, allowing for dynamic access and modification of the original map's values through the Fields interface.

Parameters:

  • items: A map[string]string to be wrapped

Returns:

  • Fields: A slice of Field interfaces, each corresponding to a map item
func WrapSliceItems(items []string) Fields

WrapSliceItems creates a slice of Fields from a slice of strings. It wraps each string item in a GenericWrapper, allowing for dynamic access and modification of the original slice's elements through the Fields interface.

Parameters:

  • items: A []string to be wrapped

Returns:

  • Fields: A slice of Field interfaces, each corresponding to a slice item
type GenericWrapper struct {
	Getter GetterFunc
	Setter SetterFunc
}
type MultiVarConfigAccessFuncs map[string]GetMultiVarConfigFunc
type PointerWrapper struct {
	
}
type RoleDisabledError struct {
	RolePath string
}
type Sequence map[Stage]Fields
type SetterFunc func(value string)
const (
	
	STAGE0 Stage = iota 
	STAGE1              
	STAGE2              
	STAGE3              
	STAGE4              
	STAGE5              

)