Documentation ¶
Index ¶
- Constants
- func FilterRead(data interface{}, valueOf reflect.Value, scopesAllowed []string)
- func IsOperationAllowed(data interface{}, fieldName string, operation string, scopesAllowed []string) bool
- func MatchScopes(scopeA, scopeB string) bool
- func ScopeInAllowed(scope string, allowedScopes []string) bool
Constants ¶
View Source
const ( //READ is used to address read operation READ = "read" //WRITE is is used to address write operation WRITE = "write" )
Variables ¶
This section is empty.
Functions ¶
func FilterRead ¶
FilterRead is used to filter output to onlly output what client can see based on scopes
func IsOperationAllowed ¶
func IsOperationAllowed( data interface{}, fieldName string, operation string, scopesAllowed []string) bool
IsOperationAllowed checks if the operation a a field of a struct is allowed
func MatchScopes ¶
MatchScopes matches two scopes using Wildcard Scope Matching Strategy (asymetric)
func ScopeInAllowed ¶
ScopeInAllowed is used to check if scope is allowed based on allowed scopes list
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.