Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
Tool knows how to run JQ queries. Don't create instances of this directly, use the NewTool function instead.
func (*Tool) Query ¶
Query the given query on the given input data and stores the result into the given output variable. An error will be returned if the query can't be parsed or if the data doesn't fit into the output variable.
func (*Tool) QueryBytes ¶
QueryBytes is similar to Query, but it expects as input an array of bytes containing the JSON text.
type ToolBuilder ¶
type ToolBuilder struct {
// contains filtered or unexported fields
}
ToolBuilder contains the data needed to build a tool that knows how to run JQ queries. Don't create instances of this directly, use the NewTool function instead.
func NewTool ¶
func NewTool() *ToolBuilder
NewTool creates a builder that can then be used to create a JQ tool.
func (*ToolBuilder) Build ¶
func (b *ToolBuilder) Build() (result *Tool, err error)
Build uses the information stored in the builder to create a new JQ tool.
func (*ToolBuilder) SetLogger ¶
func (b *ToolBuilder) SetLogger(value logr.Logger) *ToolBuilder
SetLogger sets the logger that the JQ tool will use to write the log. This is mandatory.