Documentation ¶
Index ¶
- func Array2DEquals(a [][]string, b [][]string) bool
- func ArrayEquals(a []string, b []string) bool
- func ArrayRemoveDuplicates(s *[]string)
- func ArrayToString(s []string) string
- func EscapeAssertion(s string) string
- func FixAttribute(s string) string
- func KeyMatch(key1 string, key2 string) bool
- func KeyMatchFunc(args ...interface{}) (interface{}, error)
- func RegexMatch(key1 string, key2 string) bool
- func RegexMatchFunc(args ...interface{}) (interface{}, error)
- func SetEquals(a []string, b []string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Array2DEquals ¶
Array2DEquals determines whether two 2-dimensional string arrays are identical.
func ArrayEquals ¶
ArrayEquals determines whether two string arrays are identical.
func ArrayRemoveDuplicates ¶
func ArrayRemoveDuplicates(s *[]string)
ArrayRemoveDuplicates removes any duplicated elements in a string array.
func ArrayToString ¶
ArrayToString gets a printable string for a string array.
func EscapeAssertion ¶
EscapeAssertion escapes the dots in the assertion, because the expression evaluation doesn't support such variable names.
func FixAttribute ¶
FixAttribute translates the ABAC attributes into functions.
func KeyMatch ¶
KeyMatch determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain a *. For example, /foo/bar matches /foo/*
func KeyMatchFunc ¶
func KeyMatchFunc(args ...interface{}) (interface{}, error)
KeyMatchFunc is the wrapper for KeyMatch.
func RegexMatch ¶ added in v0.0.4
RegexMatch determines whether key1 matches the pattern of key2 in regular expression.
func RegexMatchFunc ¶ added in v0.0.4
func RegexMatchFunc(args ...interface{}) (interface{}, error)
RegexMatchFunc is the wrapper for RegexMatch.
Types ¶
This section is empty.