![]() | Hoarder |
Encapsulates all possible configuration values for the Hoarder suite. The static LoadAsync(String) method can be used to deserialize an instance from a JSON file accessible at a specified Uri (which may be a http:// address or a local file:// address). The JSON file must have exactly the same schema as the fields in this class. A sample JSON file is provided in this project.
Five of the configuration values are secrets known only to the person testing or hosting the Hoarder suite. The secret values are deserialized from the JSON file if it defines them, then an overriding value for each secret is taken from an Environment variable if one exists. Environment variables can be used to provide the secrets for the suite when it is hosted in a trusted environment such as a local PC or web hosting.
[SerializableAttribute] public sealed class HoarderConfiguration : ICloneable
The HoarderConfiguration type exposes the following members.
Name | Description | |
---|---|---|
![]() | HoarderConfiguration | Initializes a new instance of the HoarderConfiguration class |
Name | Description | |
---|---|---|
![]() | BackupConnect | SECRET -- Connection string to an Azure Storage Account where Hoarder stores backup data. |
![]() | BackupContainerName | Name of the Azure Container that contains backup files. |
![]() | BlobPathSeparator | Path separator for pseido-folders in Azure blob containers. |
![]() | DatabaseCollectionId | The Cosmos database collection Id as defined in the Azure portal. |
![]() | DatabaseEndpoint | The Uri endpoint of the Cosmos database containing the collections database. |
![]() | DatabaseId | The Cosmos database Id as defined in the Azure portal. |
![]() | DbKey | SECRET -- The key to access the Azure Cosmos Database containing the Hoarder collections database records. |
![]() | HomeOwners | SECRET -- Comma joined list of Nancy Steet home owners. |
![]() | KeyRoles | An optional array of strings in the format "key,role,role,..." that assign role(s) to a request header authorisation key. |
![]() | PartitionKey | The Partition Key for the collection database. Because the collection only contains several thousand documents and multi-partition high-performance queries are not needed, the PK is set to the constant value "P1". |
![]() | PhotosContainerName | Name of the Azure Container that contains original full-size photo image blobs. |
![]() | PhotosContainerUri | Public Uri of the original full-size photo blobs Azure Container. |
![]() | PicExtensions | A set of file-system file extensions (with leading dot) that the app recognises as containing parsable images. |
![]() | PicMetaExtensions | A set of Azure blob file extensions (with leading dot) that the app recognises as containing parsable images. |
![]() | StorageConnect | SECRET -- Connection string to an Azure Storage Account where Hoarder stores picture blobs and other general non-backup data. |
![]() | ThumbnailExtension | The extension (with leading dot) to be used on thumbnail files and blobs. Every thumbnail currently has a '.jpg' extension because they are the easier to create with the .NET media and image classes. |
![]() | ThumbnailQuality | JPEG image encoder quality for thumbnail images. |
![]() | ThumbnailsContainerName | Name of the Azure Container that contains thumnail photo image blobs. |
![]() | ThumbnailsContainerUri | Public Uri of the thumbnail photo blobs Azure Container. |
![]() | ThumbnailSize | The default thumbnail image width and height constraint size square. Images are proportionally resized to fit inside the width and height size constraints. |
![]() | TruthPhotosFolder | The file-system folder containing 'master' images (aka the source of 'truth' images). |
![]() | TruthThumbnailsFolder | The file-system folder containing thumnail images. |
![]() | WebPictureColumnCount | Number of columns in tables of images inserted into web pages. |
![]() | WebRootFolder | The file-system root folder of the website containing pages that contain special delimiters that accept data exported from the collections database. |
Name | Description | |
---|---|---|
![]() | Clone | Creates a shallow clone of the configuration (which is sufficient). |
![]() | GetRolesForKey | Gets the role names that are assigned to an API Key. |
![]() ![]() | LoadAsync | Deserializes the Hoarder configuration values from a JSON document at a specified local or remote Uri. Some 'secret' values in the config document may be overriden by environment variables with the same name as the properties, which is useful in testing. Top-level apps using the Hoarder web service will typically call this method very early in app lifetime so the configuration values are loaded. |