mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-01 13:48:56 +08:00

* Use normalizer as stream source Renamed 'writer' service to 'normalizer' and dropped Cassandra facilities from it. Extracted the common dependencies to 'mainflux' package for easier sharing. Fixed the API docs and unified environment variables. Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Use docker build arguments to specify build Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Remove cassandra libraries Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Update go-kit version to 0.6.0 Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Fix manager configuration Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Refactor docker-compose Merged individual compose files and dropped external links. Remove CoAP container since it is not referenced from NginX config at the moment. Update port mapping in compose and nginx.conf. Dropped bin scripts. Updated service documentation. Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Drop content-type check Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Implement users data access layer in PostgreSQL Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Bump version to 0.1.0 Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Use go-kit logger everywhere (except CoAP) Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Improve factory methods naming Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Implement clients data access layer on PostgreSQL Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Make tests stateless All tests are refactored to use map-based table-driven tests. No cross-tests dependencies is present anymore. Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Remove gitignore Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Fix nginx proxying Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Mark client-user FK explicit Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Update API documentation Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Update channel model Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Add channel PostgreSQL repository tests Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Implement PostgreSQL channels DAO Replaced update queries with raw SQL. Explicitly defined M2M table due to difficulties of ensuring the referential integrity through GORM. Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Expose connection endpoints Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Fix swagger docs and remove DB logging Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Fix nested query remarks Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Add unique indices Signed-off-by: Dejan Mijic <dejan@mainflux.com>
57 lines
2.2 KiB
Go
57 lines
2.2 KiB
Go
// Copyright 2017 Docker, Inc.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
// Package digest provides a generalized type to opaquely represent message
|
|
// digests and their operations within the registry. The Digest type is
|
|
// designed to serve as a flexible identifier in a content-addressable system.
|
|
// More importantly, it provides tools and wrappers to work with
|
|
// hash.Hash-based digests with little effort.
|
|
//
|
|
// Basics
|
|
//
|
|
// The format of a digest is simply a string with two parts, dubbed the
|
|
// "algorithm" and the "digest", separated by a colon:
|
|
//
|
|
// <algorithm>:<digest>
|
|
//
|
|
// An example of a sha256 digest representation follows:
|
|
//
|
|
// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc
|
|
//
|
|
// In this case, the string "sha256" is the algorithm and the hex bytes are
|
|
// the "digest".
|
|
//
|
|
// Because the Digest type is simply a string, once a valid Digest is
|
|
// obtained, comparisons are cheap, quick and simple to express with the
|
|
// standard equality operator.
|
|
//
|
|
// Verification
|
|
//
|
|
// The main benefit of using the Digest type is simple verification against a
|
|
// given digest. The Verifier interface, modeled after the stdlib hash.Hash
|
|
// interface, provides a common write sink for digest verification. After
|
|
// writing is complete, calling the Verifier.Verified method will indicate
|
|
// whether or not the stream of bytes matches the target digest.
|
|
//
|
|
// Missing Features
|
|
//
|
|
// In addition to the above, we intend to add the following features to this
|
|
// package:
|
|
//
|
|
// 1. A Digester type that supports write sink digest calculation.
|
|
//
|
|
// 2. Suspend and resume of ongoing digest calculations to support efficient digest verification in the registry.
|
|
//
|
|
package digest
|