Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterQueryRequest ¶
type FilterQueryRequest struct {
// QueryItem represents a single parsed log message relating to a found resource returned by the `terraform query -json` command.
QueryItem tfjson.ListResourceFoundData
}
FilterQueryRequest is a request to a filter function.
type FilterQueryResponse ¶
type FilterQueryResponse struct {
// Include indicates whether the QueryItem should be included in CheckQueryRequest.Query
Include bool
// Error is used to report the failure of filtering and is combined with other QueryFilter errors
// to be reported as a test failure.
Error error
}
FilterQueryResponse is a response to a filter function.
type QueryFilter ¶
type QueryFilter interface {
Filter(context.Context, FilterQueryRequest, *FilterQueryResponse)
}
QueryFilter defines an interface for implementing declarative filtering logic to apply to query results before the results are passed to a query check request.
func ByDisplayName ¶
func ByDisplayName(displayNameCheck knownvalue.Check) QueryFilter
ByDisplayNameExact returns a query filter that only includes query items that match the specified display name.
func ByResourceIdentity ¶
func ByResourceIdentity(identity map[string]knownvalue.Check) QueryFilter
ByResourceIdentity returns a query filter that only includes query items that match the given resource identity.
Errors thrown by the given known value checks are only used to filter out non-matching query items and are otherwise ignored.
Click to show internal directories.
Click to hide internal directories.