attribute() = binary() | atom()
custom_attributes() = #{binary() := any()}
key() = binary() | null
private_attribute_names() = [binary()]
user() = #{key := key(), secondary => binary(), ip => binary(), country => binary(), email => binary(), first_name => binary(), last_name => binary(), avatar => binary(), name => binary(), anonymous => boolean(), custom => custom_attributes(), private_attribute_names => private_attribute_names()}
event_format/1 | Formats a user for use in an event. |
get/2 | Get an attribute value of a user. |
new/1 | |
new_from_map/1 | |
scrub/2 | Scrub private attributes from user. |
set/3 | Set an attribute value for a user. |
set_private_attribute_names/2 | Sets a list of private attribute names for a user. |
Formats a user for use in an event.
Returns the user with first_name and last_name attributes changed to firstName and lastName so that LaunchDarkly can properly record user data.get(Attribute::attribute(), User::user()) -> term()
Get an attribute value of a user
Lookup includes custom attributes. Returnsnull
if attribute doesn't exist.
new_from_map(Map::map()) -> user()
scrub(User::user(), GlobalPrivateAttributes::ldclient_config:private_attributes()) -> {user(), private_attribute_names()}
Scrub private attributes from user
Returns the scrubbed user and the list of attributes that were actually scrubbed.set(Attribute::attribute(), Value::any(), User::user()) -> user()
Set an attribute value for a user
Sets given attribute to given value and returns the new user. This function can handle both built-in and custom user attributes.set_private_attribute_names(AttributeNames::[attribute()], User::user()) -> user()
Sets a list of private attribute names for a user
Any attributes that are on this list will not be sent to and indexed by LaunchDarkly. However, they are still available for flag evaluations performed by the SDK locally. This handles both built-in and custom attributes. The built-inkey
attribute cannot be made private - it will
always be sent.
Generated by EDoc