UNPKG

casbin

Version:

An authorization library that supports access control models like ACL, RBAC, ABAC in Node.JS

27 lines (26 loc) 1.25 kB
import * as rbac from '../rbac'; declare function keyMatchFunc(...args: any[]): boolean; declare function keyGetFunc(...args: any[]): string; declare function keyMatch2Func(...args: any[]): boolean; declare function keyGet2Func(...args: any[]): string; declare function keyMatch3Func(...args: any[]): boolean; declare function keyMatch4Func(...args: any[]): boolean; declare function keyMatch5Func(...args: any[]): boolean; declare function regexMatchFunc(...args: any[]): boolean; declare function ipMatchFunc(...args: any[]): boolean; /** * Returns true if the specified `string` matches the given glob `pattern`. * * @param string String to match * @param pattern Glob pattern to use for matching. * @returns Returns true if the string matches the glob pattern. * * @example * ```javascript * globMatch("abc.conf", "*.conf") => true * ``` */ declare function globMatch(string: string, pattern: string): boolean; declare function generateGFunction(rm: rbac.RoleManager): any; declare function generateSyncedGFunction(rm: rbac.RoleManager): any; export { keyMatchFunc, keyGetFunc, keyMatch2Func, keyGet2Func, keyMatch3Func, regexMatchFunc, ipMatchFunc, generateSyncedGFunction, generateGFunction, keyMatch4Func, keyMatch5Func, globMatch, };