-
Notifications
You must be signed in to change notification settings - Fork 10
/
model_state.go
25 lines (24 loc) · 1.42 KB
/
model_state.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
* Unified Policy Engine I/O Formats
*
* Documentation for the input and output formats used in Unified Policy Engine
*
* API version: 1.0.0
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package models
// The state format contains the state of all resources from some input. This format is intended to be used as both an input and output for the unified policy engine. It is also intended to support the visualizer and other downstream artifacts.
type State struct {
Format string `json:"format"`
FormatVersion string `json:"format_version"`
// The type of input that this state was generated from. This value factors into which rules are run for this input.
InputType string `json:"input_type"`
// The type of environment that this state was generated from. This value factors into which rules are run for this input.
EnvironmentProvider string `json:"environment_provider"`
// This object is intended to hold any input type-specific or environment-specific fields, e.g. account_id or filepath.
Meta map[string]interface{} `json:"meta,omitempty"`
// Resources is a map of resource type to a map of a unique resource key to a resource object.
Resources map[string]map[string]ResourceState `json:"resources"`
// Describes the origin of the input, e.g. filepath + branch for IaC files, or account/region for cloud resources
Scope map[string]interface{} `json:"scope,omitempty"`
}