Documentation ¶
Index ¶
- func CaveatedFoundSubject(subjectID string, expr *core.CaveatExpression) *v1.FoundSubject
- func CaveatedWildcard(expr *core.CaveatExpression, exclusions ...*v1.FoundSubject) *v1.FoundSubject
- func CheckEquivalentSets(expected []*v1.FoundSubject, found []*v1.FoundSubject) error
- func CheckEquivalentSubjects(expected *v1.FoundSubject, found *v1.FoundSubject) error
- func FormatSubject(sub *v1.FoundSubject) string
- func FormatSubjects(subs []*v1.FoundSubject) string
- func FoundSubject(subjectID string) *v1.FoundSubject
- func RequireEquivalentSets(t *testing.T, expected []*v1.FoundSubject, found []*v1.FoundSubject)
- func RequireExpectedSubject(t *testing.T, expected *v1.FoundSubject, produced **v1.FoundSubject)
- func Wildcard(exclusions ...string) *v1.FoundSubject
- func WrapFoundSubject(sub *v1.FoundSubject) **v1.FoundSubject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaveatedFoundSubject ¶
func CaveatedFoundSubject(subjectID string, expr *core.CaveatExpression) *v1.FoundSubject
CaveatedFoundSubject returns a FoundSubject with the given ID and caveat expression.
func CaveatedWildcard ¶
func CaveatedWildcard(expr *core.CaveatExpression, exclusions ...*v1.FoundSubject) *v1.FoundSubject
CaveatedWildcard returns a wildcard FoundSubject with the given caveat expression and exclusions.
func CheckEquivalentSets ¶
func CheckEquivalentSets(expected []*v1.FoundSubject, found []*v1.FoundSubject) error
CheckEquivalentSets checks if the sets of subjects are equivalent and returns an error if they are not.
func CheckEquivalentSubjects ¶
func CheckEquivalentSubjects(expected *v1.FoundSubject, found *v1.FoundSubject) error
CheckEquivalentSubjects checks if the given subjects are equivalent and returns an error if they are not.
func FormatSubject ¶
func FormatSubject(sub *v1.FoundSubject) string
FormatSubject formats the given subject (which can be nil) into a human-readable string.
func FormatSubjects ¶
func FormatSubjects(subs []*v1.FoundSubject) string
FormatSubjects formats the given slice of subjects in a human-readable string.
func FoundSubject ¶
func FoundSubject(subjectID string) *v1.FoundSubject
FoundSubject returns a FoundSubject with the given ID.
func RequireEquivalentSets ¶
func RequireEquivalentSets(t *testing.T, expected []*v1.FoundSubject, found []*v1.FoundSubject)
RequireEquivalentSets requires that the given sets of subjects are equivalent.
func RequireExpectedSubject ¶
func RequireExpectedSubject(t *testing.T, expected *v1.FoundSubject, produced **v1.FoundSubject)
RequireExpectedSubject requires that the given expected and produced subjects match.
func Wildcard ¶
func Wildcard(exclusions ...string) *v1.FoundSubject
Wildcard returns a FoundSubject with the given subject IDs as concrete exclusions.
func WrapFoundSubject ¶
func WrapFoundSubject(sub *v1.FoundSubject) **v1.FoundSubject
WrapFoundSubject wraps the given subject into a pointer to it, unless nil, in which case this method returns nil.
Types ¶
This section is empty.