features

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

View Source
const (
	FuncDeclarationsMinimumVerions   = "v0.20.0"
	IsDefinedFunctionsMinimumVerions = "v0.21.0"
)

Sentinel Language feature versions

View Source
const (
	BadStdlibImportNameMinimumVersion      = "v0.19.0"
	ConfigurationOverrideMinimumVersion    = "v0.19.0"
	OptionalEnforcementLevelMinimumVersion = "v0.18.11"
	ParamsInPolicyMinimumVersion           = "v0.21.0"
	SentinelBlockMinimumVersion            = "v0.22.0"
	V2ImportBlockMinimumVersion            = "v0.19.0"
)

Sentinel Configuration Language feature versions

View Source
const (
	LatestSentinelVersion = "latest"
)

Variables

View Source
var SentinelVersions = []string{
	"v0.26.3",
	"v0.26.2",
	"v0.26.1",
	"v0.26.0",
	"v0.25.1",
	"v0.25.0",
	"v0.24.4",
	"v0.24.3",
	"v0.24.2",
	"v0.24.1",
	"v0.24.0",
	"v0.23.1",
	"v0.23.0",
	"v0.22.1",
	"v0.22.0",
	"v0.21.1",
	"v0.21.0",
	"v0.20.0",
	"v0.19.5",
	"v0.19.4",
	"v0.19.3",
	"v0.19.2",
	"v0.19.1",
	"v0.19.0",
	"v0.18.13",
	"v0.18.12",
	"v0.18.11",
	"v0.18.10",
	"v0.18.9",
	"v0.18.8",
	"v0.18.7",
	"v0.18.6",
	"v0.18.5",
	"v0.18.4",
	"v0.18.3",
	"v0.18.2",
	"v0.18.1",
	"v0.18.0",
	"v0.17.4",
	"v0.17.3",
	"v0.17.2",
	"v0.17.1",
	"v0.17.0",
	"v0.16.1",
	"v0.16.0",
	"v0.15.6",
	"v0.15.5",
	"v0.15.4",
	"v0.15.3",
	"v0.15.2",
	"v0.15.1",
	"v0.15.0",
	"v0.14.4",
	"v0.14.3",
	"v0.14.2",
	"v0.14.1",
	"v0.14.0",
	"v0.13.1",
	"v0.13.0",
	"v0.12.0",
	"v0.11.0",
	"v0.10.4",
	"v0.10.3",
	"v0.10.2",
	"v0.10.1",
	"v0.10.0",
	"v0.9.2",
	"v0.9.1",
	"v0.9.0",
	"v0.8.1",
	"v0.8.0",
	"v0.7.0",
	"v0.6.0",
	"v0.5.1",
	"v0.5.0",
	"v0.4.0",
	"v0.3.1",
	"v0.3.0",
	"v0.2.0",
	"v0.1.0",
}

Functions

func SupportedVersion

func SupportedVersion(sentinelVersion, minimumVersion string) bool

Whether the Sentinel version is the same or later than another version, typically the version when a feature was introduced.

func UnsupportedVersion

func UnsupportedVersion(sentinelVersion, minimumVersion string) bool

Whether the Sentinel version is earlier than another version, typically the version when a feature was introduced.

func ValidateSentinelVersion

func ValidateSentinelVersion(sentinelVersion string) (bool, string)

Validates a Semver string is valid, and resolves to an existing Sentinel version

Types

type SentinelFeatures

type SentinelFeatures struct {
	// Language features
	FuncDeclarations   bool
	IsDefinedFunctions bool
	// Configuration file features
	BadStdlibImportName      bool
	ConfigurationOverride    bool
	OptionalEnforcementLevel bool
	ParamsInPolicy           bool
	SentinelBlock            bool
	V2ImportBlock            bool
}

func SupportedFeatures

func SupportedFeatures(sentinelversion string) SentinelFeatures

Jump to

Keyboard shortcuts

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