casbin

Module function_map

Source

Structs§

Enums§

Functions§

  • key_get returns the matched part
    For example, “/foo/bar/foo” matches “/foo/*”
    “bar/foo” will be returned.
  • key_get2 returns value matched pattern
    For example, “/resource1” matches “/:resource”
    if the pathVar == “resource”, then “resource1” will be returned.
  • key_get3 returns value matched pattern
    For example, “project/proj_project1_admin/” matches “project/proj_{project}_admin/”
    if the pathVar == “project”, then “project1” will be returned.
  • key_match determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain *
    For example, “/foo/bar” matches “/foo/*”
  • key_match2 determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain a *
    For example, “/foo/bar” matches “/foo/*”, “/resource1” matches “/:resource”
  • key_match3 determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain a *
    For example, “/foo/bar” matches “/foo/*”, “/resource1” matches “/{resource}”
  • KeyMatch4 determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain a *.
    Besides what KeyMatch3 does, KeyMatch4 can also match repeated patterns:
  • KeyMatch5 determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain a *
    For example,