reference

package
v2.16.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ReferenceParameterType = "reference"

ReferenceParameterType specifies the type of the parameter used in config files

Variables

View Source
var ReferenceParameterSerde = parameter.ParameterSerDe{
	Serializer:   writeReferenceParameter,
	Deserializer: parseReferenceParameter,
}

Functions

This section is empty.

Types

type ReferenceParameter

type ReferenceParameter struct {
	parameter.ParameterReference
}

ReferenceParameter is a parameter which evaluates to the value of the referenced parameter.

func New

func New(project string, configType string, config string, property string) *ReferenceParameter

func NewWithCoordinate

func NewWithCoordinate(coordinate coordinate.Coordinate, property string) *ReferenceParameter

func (*ReferenceParameter) Equal added in v2.15.0

func (*ReferenceParameter) GetReferences

func (p *ReferenceParameter) GetReferences() []parameter.ParameterReference

func (*ReferenceParameter) GetType

func (p *ReferenceParameter) GetType() string

func (*ReferenceParameter) ResolveValue

func (p *ReferenceParameter) ResolveValue(context parameter.ResolveContext) (interface{}, error)

ResolveValue tries to find the reference in the already resolved entities. if the referenced entity cannot be found (maybe it is missing, or has not been resolved yet), an error is returned.

type UnresolvedReferenceError

type UnresolvedReferenceError struct {
	// define some shared error information
	parameter.ParameterResolveValueError

	// parameter which has not been resolved yet
	parameter.ParameterReference
}

UnresolvedReferenceError is indicating that the referenced parameter cannot be found and hence no value for the parameter been resolved.

func (UnresolvedReferenceError) Error

func (e UnresolvedReferenceError) Error() string

Jump to

Keyboard shortcuts

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