Documentation
¶
Overview ¶
Package pprint contains the root elements required by the plugin
Index ¶
- Constants
- type Decoder
- type Print
- func (p *Print) Execute(ctx context.FeatureContext) errors.Error
- func (p *Print) Format(ctx *hcl.EvalContext) (string, errors.Error)
- func (p *Print) Msg(ctx *hcl.EvalContext) (string, errors.Error)
- func (p *Print) MustShowTimestamp(ctx *hcl.EvalContext) (bool, errors.Error)
- func (p *Print) Prefix(ctx *hcl.EvalContext) (string, errors.Error)
- func (p *Print) SetFormat(expr hcl.Expression)
- func (p *Print) SetMessage(expr hcl.Expression)
- func (p *Print) SetPrefix(expr hcl.Expression)
- func (p *Print) SetTimestamp(expr hcl.Expression)
- func (p *Print) SetTimestampFormat(expr hcl.Expression)
- func (p *Print) TimestampFormat(ctx *hcl.EvalContext) (string, errors.Error)
Constants ¶
const ( // BlockPrint plugin block identifier. BlockPrint = "print" // AttributePrefix name of the argument used in the block print. AttributePrefix = "prefix" // AttributeMsg name of the argument used in the block print. AttributeMsg = "msg" // AttributeTimestamp name of the argument used in the block print. AttributeTimestamp = "showTimestamp" // AttributeTimestampFormat name of the argument used in the block print. AttributeTimestampFormat = "timestampFormat" // AttributeFormat name of the argument used in the block print. AttributeFormat = "format" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct{}
Decoder struct used to implement required interfaces.
func (*Decoder) BlockHeaderSchema ¶
func (dec *Decoder) BlockHeaderSchema() hcl.BlockHeaderSchema
BlockHeaderSchema return the header schema for the plugin.
type Print ¶
Print plugin structure used to marshal the block definition.
func (*Print) Execute ¶
func (p *Print) Execute(ctx context.FeatureContext) errors.Error
Execute functin in charge of executing the plugin.
func (*Print) Format ¶
Format returns the format in which the format in which the message must be printed out.
func (*Print) MustShowTimestamp ¶
MustShowTimestamp returns if timestamp must be shown after evaluating the expression.
func (*Print) SetFormat ¶
func (p *Print) SetFormat(expr hcl.Expression)
SetFormat used to populate the attribute format in the struct.
func (*Print) SetMessage ¶
func (p *Print) SetMessage(expr hcl.Expression)
SetMessage used to populate the attribute msg in the struct.
func (*Print) SetPrefix ¶
func (p *Print) SetPrefix(expr hcl.Expression)
SetPrefix used to populate the attribute prefix in the struct.
func (*Print) SetTimestamp ¶
func (p *Print) SetTimestamp(expr hcl.Expression)
SetTimestamp used to populate the attribute timestamp in the struct.
func (*Print) SetTimestampFormat ¶
func (p *Print) SetTimestampFormat(expr hcl.Expression)
SetTimestampFormat used to populate the attribute timestampFormat in the struct.