Astarte.Core.Mapping.EndpointsAutomaton (astarte_core v1.3.0)

Copy Markdown View Source

Summary

Functions

builds the automaton for given mappings, returns :ok followed by the automaton tuple if build succeeded, otherwise :error and the reason.

returns true if nfa is valid for given mappings

returns a list of likely invalid endpoints for a certain list of mappings.

returns :ok and an endpoint for a given path using a previously built automata ({transitions, accepting_states}). if path is not complete one or more endpoints will be guessed and :guessed followed by a list of endpoints is returned.

Functions

build(mappings)

builds the automaton for given mappings, returns :ok followed by the automaton tuple if build succeeded, otherwise :error and the reason.

is_valid?(nfa, mappings)

returns true if nfa is valid for given mappings

lint(mappings)

returns a list of likely invalid endpoints for a certain list of mappings.

parse_endpoint(mapping, arg)

resolve_path(path, arg)

returns :ok and an endpoint for a given path using a previously built automata ({transitions, accepting_states}). if path is not complete one or more endpoints will be guessed and :guessed followed by a list of endpoints is returned.