mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-26 13:48:53 +08:00
Add READMEs to pkg packages (#1352)
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
This commit is contained in:
parent
241ccf8fb4
commit
8b2ae46324
3
pkg/README.md
Normal file
3
pkg/README.md
Normal file
@ -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.
|
7
pkg/auth/README.md
Normal file
7
pkg/auth/README.md
Normal file
@ -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.
|
5
pkg/errors/README.md
Normal file
5
pkg/errors/README.md
Normal file
@ -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.
|
9
pkg/messaging/README.md
Normal file
9
pkg/messaging/README.md
Normal file
@ -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.
|
5
pkg/sdk/README.md
Normal file
5
pkg/sdk/README.md
Normal file
@ -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.
|
@ -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
|
||||
|
3
pkg/ulid/README.md
Normal file
3
pkg/ulid/README.md
Normal file
@ -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.
|
3
pkg/uuid/README.md
Normal file
3
pkg/uuid/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# UUID identity provider
|
||||
|
||||
The UUID identity provider generates a random, universally unique identifier (UUID), unique for all practical purposes.
|
Loading…
x
Reference in New Issue
Block a user