ds v1.1.1 DS.Parser View Source

Parser module, which looks for cached value. If is not found, parses user agent by UAInspector (https://github.com/elixytics/ua_inspector)

Link to this section Summary

Functions

Parses user agent

Link to this section Types

Link to this type

found()

View Source
found() :: {:ok, DS.t()}
Link to this type

map_with_result()

View Source
map_with_result() :: %{
  ds: DS.t(),
  result: %UAInspector.Result{
    client: term(),
    device: term(),
    os: term(),
    user_agent: term()
  }
}
Link to this type

not_found()

View Source
not_found() :: {:error, DS.ua()}

Link to this section Functions

Link to this function

check_cache(ua)

View Source
check_cache(DS.ua()) :: found() | not_found()
Link to this function

parse(ua)

View Source
parse(DS.ua()) :: DS.t() | nil

Parses user agent