use

package
v0.0.0-...-173f61c Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package use contains types and methods to deal with block use

Index

Constants

View Source
const (
	// BlockUse identifier of block use.
	BlockUse = "use"
	// ArgRef argument of block use.
	ArgRef = "ref"
	// ArgDesc argument of block use.
	ArgDesc = "_desc"
	// ArgWhen argument of block use.
	ArgWhen = "when"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Use

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

Use defined struct.

func Decode

func Decode(block *hcl.Block) (*Use, errors.Error)

Decode converts a hcl block into a defined type Use.

func (*Use) AddArgument

func (use *Use) AddArgument(name string, attr hcl.Expression)

AddArgument add an argument to the existing values in attribute arguments.

func (*Use) Arguments

func (use *Use) Arguments() map[string]hcl.Expression

Arguments return the list of arguments.

func (*Use) Desc

func (use *Use) Desc() hcl.Expression

Desc return the attribute desc.

func (*Use) SetDesc

func (use *Use) SetDesc(desc hcl.Expression)

SetDesc set the value for attribute desc of type Use.

func (*Use) SetVarRef

func (use *Use) SetVarRef(varRef string)

SetVarRef set the value for the type Use.

func (*Use) SetWhen

func (use *Use) SetWhen(when hcl.Expression)

SetWhen set the value for attribute when of type Use.

func (*Use) VarRef

func (use *Use) VarRef() string

VarRef return the value of the attribute.

func (*Use) When

func (use *Use) When() hcl.Expression

When return the attribute when.

Jump to

Keyboard shortcuts

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