query

package
v0.0.0-...-02c76fb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Preparer

type Preparer struct {
	Interpreter string            `hcl:"interpreter"`
	Query       string            `hcl:"query" nonempty:"true"`
	CheckFlags  []string          `hcl:"check_flags"`
	ExecFlags   []string          `hcl:"exec_flags"`
	Timeout     *time.Duration    `hcl:"timeout"`
	Dir         string            `hcl:"dir"`
	Env         map[string]string `hcl:"env"`
}

Preparer handles querying

func (*Preparer) Prepare

func (p *Preparer) Prepare(ctx context.Context, render resource.Renderer) (resource.Task, error)

Prepare creates a new query type

type Query

type Query struct {
	*shell.Shell `re-export-as:"task"`
}

Query represents an environmental query

func (*Query) Apply

Apply is a nop for queries. Because HasChanges always returns false this should never be executed.

func (*Query) HasChanges

func (q *Query) HasChanges() bool

HasChanges returns true if changes are required as determined by the the most recent run of check.

func (*Query) Messages

func (q *Query) Messages() (messages []string)

Messages returns a summary of the first execution of check and/or apply. Subsequent runs are surpressed.

Jump to

Keyboard shortcuts

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