Documentation
¶
Index ¶
- Constants
- func GenerateId() string
- func GenerateRoles(n int) ([]string, map[string]internal.PolicyRole)
- type PolicyFixture
- func (p *PolicyFixture) BenchmarkCompilation(nRoles int) func(b *testing.B)
- func (p *PolicyFixture) BenchmarkCompilationEvaluation(nRoles int) func(b *testing.B)
- func (p *PolicyFixture) BenchmarkCompilationEvaluationPrepared(nRoles int) func(b *testing.B)
- func (p *PolicyFixture) BenchmarkCompilationPrepared(nRoles int) func(b *testing.B)
- func (p *PolicyFixture) BenchmarkEvaluation(nRoles int) func(b *testing.B)
- func (p *PolicyFixture) BenchmarkEvaluationPrepared(nRoles int) func(b *testing.B)
- func (p *PolicyFixture) TestPolicy(prepared bool) func(t *testing.T)
- func (p *PolicyFixture) TestPolicyCompilationEvaluation(prepared bool) func(t *testing.T)
Constants ¶
View Source
const ( RegoCompileFilename string = "../policy/compilation" RegoEvaluationFilename string = "../policy/evaluation" RegoCompilationEvaluationFilename string = "../policy/compilation_evaluation" )
Variables ¶
This section is empty.
Functions ¶
func GenerateId ¶
func GenerateId() string
GenerateId is a testing function that simplifies creating a unique string (makes testing easier)
func GenerateRoles ¶
func GenerateRoles(n int) ([]string, map[string]internal.PolicyRole)
GenerateRoles can be used to create a map of n unique roles
Types ¶
type PolicyFixture ¶
func NewPolicyFixture ¶
func NewPolicyFixture(parameters ...any) *PolicyFixture
func (*PolicyFixture) BenchmarkCompilation ¶
func (p *PolicyFixture) BenchmarkCompilation(nRoles int) func(b *testing.B)
func (*PolicyFixture) BenchmarkCompilationEvaluation ¶
func (p *PolicyFixture) BenchmarkCompilationEvaluation(nRoles int) func(b *testing.B)
func (*PolicyFixture) BenchmarkCompilationEvaluationPrepared ¶
func (p *PolicyFixture) BenchmarkCompilationEvaluationPrepared(nRoles int) func(b *testing.B)
func (*PolicyFixture) BenchmarkCompilationPrepared ¶
func (p *PolicyFixture) BenchmarkCompilationPrepared(nRoles int) func(b *testing.B)
func (*PolicyFixture) BenchmarkEvaluation ¶
func (p *PolicyFixture) BenchmarkEvaluation(nRoles int) func(b *testing.B)
func (*PolicyFixture) BenchmarkEvaluationPrepared ¶
func (p *PolicyFixture) BenchmarkEvaluationPrepared(nRoles int) func(b *testing.B)
func (*PolicyFixture) TestPolicy ¶
func (p *PolicyFixture) TestPolicy(prepared bool) func(t *testing.T)
func (*PolicyFixture) TestPolicyCompilationEvaluation ¶
func (p *PolicyFixture) TestPolicyCompilationEvaluation(prepared bool) func(t *testing.T)
Click to show internal directories.
Click to hide internal directories.