Crate redact_data[][src]

Expand description

redact-data

The redact-data crate contains all of the interfaces, data structures, and abstractions necessary to work with a unit of data in the redact world. It also contains implementations of the storage interface for storing and retrieving redact data with a variety of sources.

File directory:

  • data.rs: data definitions and conversions
  • storage.rs: trait for a data type that stores Data
  • storage/error.rs: error types for the storage abstractions
  • storage/mongodb.rs: storage implentation for mongodb
  • storage/redact.rs: storage implementation for a redact-store server

Structs

Data

Data stores a unit of data in the redact system. A chunk of data is a DataValue (contained within), which can be a bool, u64, i64, f64, or string. Each data is associated with a DataPath which is just a json-style path, and can optionally be encrypted by a variety of keys as specified by the key names in encryptedby.

DataCollection

DataCollection is returned when a find or search returns multiple Data objects

DataPath

DataPath represents a json-style path for the location of a Data object. The path should always be formatted as .my.json.path.; note the beginning and ending periods. DataPath will automatically handle path validation when created or deserialized, just provide any valid json-path on creation.

MongoDataStorer

Stores an instance of a mongodb-backed data storer

RedactDataStorer

Enums

DataValue

DataValue contains the actual raw value of a piece of Data. A DataValue should always be a leaf value, not an array or object.

StorageError

Error type that converts to a warp::Rejection

Traits

DataStorer

The operations a storer of Data structs must be able to fulfill.