stixex v0.1.1 StixEx.TypeRegistry View Source
Maintains a map from string-type name to module, since STIX itself won't tell us if something is an observable or not, it's hard to automatically do it.
Link to this section Summary
Functions
Get a type based on its name
Link to this section Functions
Link to this function
get(type_name) View Source
Get a type based on its name
iex> StixEx.TypeRegistry.get("software")
{:ok, StixEx.Object.Observable.Software}
iex> StixEx.TypeRegistry.get("my-type")
{:error, {:does_not_exist, "my-type"}}