Module oauth2_priv_set

Erlang OAuth 2.0 implementation.

Description

Erlang OAuth 2.0 implementation

Data Types

priv_set()

priv_set() = [priv_tree()]

priv_tree()

priv_tree() = {node, Name::binary(), Children::[priv_tree()]} | '*'

Invariant: The list of trees is sorted increasingly by the name of the root node.

Function Index

is_member/2Returns true if Path is present in Set, i.e, if the privilege denoted by Path is contained within Set.
is_subset/2Return true if Set1 is a subset of Set2, i.e., if every privilege held by Set1 is also held by Set2.
new/1Constructs a new priv_set from a single path or a list of paths.
union/2Returns the union of Set1 and Set2, i.e., a set such that any path present in either Set1 or Set2 is also present in the result.

Function Details

is_member/2

is_member(Path::binary(), Set::priv_set()) -> boolean()

Returns true if Path is present in Set, i.e, if the privilege denoted by Path is contained within Set.

is_subset/2

is_subset(Set1::priv_set(), T2::priv_set()) -> boolean()

Return true if Set1 is a subset of Set2, i.e., if every privilege held by Set1 is also held by Set2.

new/1

new(Paths::binary() | [binary()]) -> priv_set()

Constructs a new priv_set from a single path or a list of paths. A path denotes a single privilege.

union/2

union(T1::priv_set(), T2::priv_set()) -> priv_set()

Returns the union of Set1 and Set2, i.e., a set such that any path present in either Set1 or Set2 is also present in the result.


Generated by EDoc