WeaviateEx.RBAC.GroupAssignment (WeaviateEx v0.7.4)
View SourceGroup assignment with type information.
Represents a group assigned to a role, including the group type which indicates the source of the group (currently only OIDC groups are supported).
Group Types
:oidc- Group from OpenID Connect identity provider
Examples
{:ok, assignments} = RBAC.get_group_assignments(client, "viewer")
for assignment <- assignments do
IO.puts("#{assignment.group_id} (type: #{assignment.group_type})")
end
Summary
Functions
Parse group assignment from API response.
Convert group type atom to API string.
Creates a new GroupAssignment struct.
Parse group type string to atom.
Convert group assignment to API format.
Types
@type group_type() :: :oidc
@type t() :: %WeaviateEx.RBAC.GroupAssignment{ group_id: String.t(), group_type: group_type() }
Functions
Parse group assignment from API response.
Examples
assignment = GroupAssignment.from_api(%{"groupId" => "eng", "groupType" => "oidc"})
# => %GroupAssignment{group_id: "eng", group_type: :oidc}
@spec group_type_to_string(group_type()) :: String.t()
Convert group type atom to API string.
@spec new(String.t(), group_type()) :: t()
Creates a new GroupAssignment struct.
Examples
assignment = GroupAssignment.new("engineering", :oidc)
@spec parse_group_type(String.t()) :: group_type()
Parse group type string to atom.
Convert group assignment to API format.