diff --git a/pkg/README.md b/pkg/README.md new file mode 100644 index 00000000..796c8095 --- /dev/null +++ b/pkg/README.md @@ -0,0 +1,3 @@ +# Standalone packages + +The `pkg` directory (the current directory) contains a set of standalone packages that can be imported and used by external applications. The packages are specifically meant for the development of the Mainflux based back-end applications and implement common tasks needed by the programmatic operation of Mainflux platform. diff --git a/pkg/auth/README.md b/pkg/auth/README.md new file mode 100644 index 00000000..7b8337d0 --- /dev/null +++ b/pkg/auth/README.md @@ -0,0 +1,7 @@ +# Auth client + +Auth client package is used to identify a thing and authorize a thing's access to a channel. + +To identify a thing, you need a valid **thing key**. You retrieve thing's identity in the form of a **thing ID**. The latter is used in CRUD operations on things and their connections. + +To authorize a thing's access to a channel, you need a valid **thing ID** and a valid **channel ID**. If a thing is not connected to a channel, the auth client responds with an error. Otherwise, a *nil* value is returned, signaling the successful authorization. diff --git a/pkg/errors/README.md b/pkg/errors/README.md new file mode 100644 index 00000000..fc5ba548 --- /dev/null +++ b/pkg/errors/README.md @@ -0,0 +1,5 @@ +# Errors + +`errors` package serve to build an arbitrary long error chain in order to capture errors returned from nested service calls. + +`errors` package contains the custom Go `error` interface implementation, `Error`. You use the `Error` interface to **wrap** two errors in a containing error as well as to test recursively if a given error **contains** some other error. diff --git a/pkg/messaging/README.md b/pkg/messaging/README.md new file mode 100644 index 00000000..086eff97 --- /dev/null +++ b/pkg/messaging/README.md @@ -0,0 +1,9 @@ +# Messaging + +`messaging` package defines `Publisher`, `Subscriber` and an aggregate `Pubsub` interface. + +`Subscriber` interface defines methods used to subscribe to a message broker such as MQTT or NATS. + +`Publisher` interface defines methods used to publish messages to a message broker such as MQTT or NATS. + +`Pubsub` interface is composed of `Publisher` and `Subscriber` interface and can be used to send messages to as well as to receive messages from a message broker. diff --git a/pkg/sdk/README.md b/pkg/sdk/README.md new file mode 100644 index 00000000..baa17f43 --- /dev/null +++ b/pkg/sdk/README.md @@ -0,0 +1,5 @@ +# Mainflux SDK kits + +This directory contains drivers for Mainflux HTTP API. Drivers facilitate system administration - CRUD operations on things, channels and their connections, i.e. provision of Mainflux entities. They can be used also for messaging. + +Drivers are written in different languages in order to enable the faster application development in the respective language. diff --git a/pkg/transformers/README.md b/pkg/transformers/README.md index 2ec6150b..f30ac5bc 100644 --- a/pkg/transformers/README.md +++ b/pkg/transformers/README.md @@ -1,8 +1,9 @@ # Message Transformers -Transformers services consume events published by adapters and transform them to any other message format. -They be imported as a standalone package and used for message transformation on the consumer side. +A transformer service consumes events published by Mainflux adapters (such as MQTT and HTTP adapters) and transforms them to an arbitrary message format. A transformer can be imported as a standalone package and used for message transformation on the consumer side. + Mainflux [SenML transformer](transformer) is an example of Transformer service for SenML messages. + Mainflux [writers](writers) are using a standalone SenML transformer to preprocess messages before storing them. [transformers]: https://github.com/mainflux/mainflux/tree/master/transformers/senml diff --git a/pkg/ulid/README.md b/pkg/ulid/README.md new file mode 100644 index 00000000..208b3111 --- /dev/null +++ b/pkg/ulid/README.md @@ -0,0 +1,3 @@ +# ULID identity provider + +ULID identity provider generates a universally unique lexicographically sortable, string encoded identifier, a 128-bit number, unique for all practical purposes. diff --git a/pkg/uuid/README.md b/pkg/uuid/README.md new file mode 100644 index 00000000..e19a38f2 --- /dev/null +++ b/pkg/uuid/README.md @@ -0,0 +1,3 @@ +# UUID identity provider + +The UUID identity provider generates a random, universally unique identifier (UUID), unique for all practical purposes.