Documentation ¶
Index ¶
- Variables
- func AttemptOverrideFileWith(this, other *ast.File, sentinelVersion string) diagnostics.Diagnostics
- func IsStdLibName(value string) bool
- func New(sentinelVersion string) (sentinel_config.Parser, error)
- func OverrideFileWith(this, other *ast.File, sentinelVersion string) diagnostics.Diagnostics
- func ParseFile(sentinelVersion, filename string, src []byte) (*ast.File, diagnostics.Diagnostics, error)
- func ValidateFile(file *ast.File, sentinelVersion string) diagnostics.Diagnostics
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigCommonBodySchema = &hcl.BodySchema{ Blocks: []hcl.BlockHeaderSchema{ { Type: "sentinel", }, { Type: "policy", LabelNames: []string{"name"}, }, { Type: "module", LabelNames: []string{"name"}, }, { Type: "mock", LabelNames: []string{"name"}, }, { Type: "global", LabelNames: []string{"name"}, }, { Type: "param", LabelNames: []string{"name"}, }, { Type: "test", }, }, }
View Source
var EmptyBodySchema = &hcl.BodySchema{}
View Source
var GlobalBlockSchema = &hcl.BodySchema{ Attributes: []hcl.AttributeSchema{ { Name: "value", Required: false, }, }, }
View Source
var MockBlockSchema = &hcl.BodySchema{ Attributes: []hcl.AttributeSchema{ { Name: "data", Required: false, }, }, Blocks: []hcl.BlockHeaderSchema{ { Type: "module", }, }, }
View Source
var MockModuleBlockSchema = &hcl.BodySchema{ Attributes: []hcl.AttributeSchema{ { Name: "source", Required: false, }, }, }
View Source
var ParamBlockSchema = &hcl.BodySchema{ Attributes: []hcl.AttributeSchema{ { Name: "value", Required: false, }, }, }
View Source
var PolicyBlockSchema = &hcl.BodySchema{ Attributes: []hcl.AttributeSchema{ { Name: "source", Required: false, }, { Name: "enforcement_level", Required: false, }, { Name: "params", Required: false, }, }, }
View Source
var SentinelBlockSchema = &hcl.BodySchema{ Attributes: []hcl.AttributeSchema{ { Name: "features", Required: false, }, }, }
View Source
var TestBlockSchema = &hcl.BodySchema{ Attributes: []hcl.AttributeSchema{ { Name: "rules", Required: false, }, }, }
View Source
var V1ImportBodySchema = &hcl.BodySchema{
Blocks: []hcl.BlockHeaderSchema{v1ImportBlockHeaderSchema},
}
Functions ¶
func AttemptOverrideFileWith ¶
func AttemptOverrideFileWith(this, other *ast.File, sentinelVersion string) diagnostics.Diagnostics
func IsStdLibName ¶
func OverrideFileWith ¶
func OverrideFileWith(this, other *ast.File, sentinelVersion string) diagnostics.Diagnostics
func ParseFile ¶
func ParseFile( sentinelVersion, filename string, src []byte, ) (*ast.File, diagnostics.Diagnostics, error)
func ValidateFile ¶
func ValidateFile(file *ast.File, sentinelVersion string) diagnostics.Diagnostics
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.