[![ Version](](

# SmartCity.Data

This module defines the structure of data messages that are sent across all SmartCity microservices. The `SmartCity.Data` struct includes metadata and timing information about the process from which the message was generated.  

Timing information is defined by the `SmartCity.Data.Timing` struct.   

For more details about the structure of data messages, see []( 

## Basic Usage
iex>{dataset_id: "a_guid", payload: "the_data", _metadata: %{org: "scos", name: "example"}, operational: %{timing: [%{app: "app name", label: "function name", start_time: "2019-05-06T19:51:41+00:00", end_time: "2019-05-06T19:51:51+00:00"}]}})
{:ok, %SmartCity.Data{
    dataset_id: "a_guid",
    payload: "the_data",
    _metadata: %{org: "scos", name: "example"},
    operational: %{
        timing: [%SmartCity.Data.Timing{ 
            app: "app name",
            end_time: "2019-05-06T19:51:51+00:00", 
            label: "function name", 
            start_time: "2019-05-06T19:51:41+00:00"

## Installation

def deps do
    {:smart_city_data, "~> 2.1.8"}

## Contributing

Make your changes and run `docker build .`. This is exactly what our CI will do. The build process runs these commands:

mix deps.get
mix test
mix format --check-formatted
mix credo

## License

Released under [Apache 2 license](