|
@@ -0,0 +1,53 @@
|
|
|
|
+# service-configuration package
|
|
|
|
+
|
|
|
|
+## Files documented
|
|
|
|
+
|
|
|
|
+* `service_configuration_common.js`: defines the collection publish and a `ServiceConfiguration.ConfigError` error class.
|
|
|
|
+* `service_configuration_server.hs`: ensures the index on the service collection.
|
|
|
|
+
|
|
|
|
+## Architecture
|
|
|
|
+
|
|
|
|
+This package just provides access to a configuration collection in `ServiceConfiguration.configurations`. Packages using the configuration are expected to use Mongo queries on that collection, find-ing using `{ service: service_name }`.
|
|
|
|
+
|
|
|
|
+All properties of that collection are published client-side, except `secret` which is only available server-side.
|
|
|
|
+
|
|
|
|
+## Collections
|
|
|
|
+
|
|
|
|
+* `meteor_accounts_loginServiceConfiguration`
|
|
|
|
+ * Index: `{ "service": 1 }, { unique: true }`
|
|
|
|
+
|
|
|
|
+The service-configuration package persists configuration in the `meteor_accounts_loginServiceConfiguration` collection in MongoDB. As each service should have exactly one configuration, Meteor automatically creates a MongoDB index with a unique constraint on the `meteor_accounts_loginServiceConfiguration` collection.
|
|
|
|
+
|
|
|
|
+## Constants
|
|
|
|
+
|
|
|
|
+None
|
|
|
|
+
|
|
|
|
+## Classes
|
|
|
|
+
|
|
|
|
+None
|
|
|
|
+
|
|
|
|
+## Functions
|
|
|
|
+
|
|
|
|
+None
|
|
|
|
+
|
|
|
|
+## Dependencies / Exports (`package.js` _et al._)
|
|
|
|
+### Exports
|
|
|
|
+
|
|
|
|
+| Symbol | Client | Server | Test |
|
|
|
|
+|----------------------|:------:|:------:|:----:|
|
|
|
|
+| ServiceConfiguration | O | O | O |
|
|
|
|
+
|
|
|
|
+Silently used (without a declared dependency) in `accounts-base`.
|
|
|
|
+
|
|
|
|
+### Dependencies
|
|
|
|
+
|
|
|
|
+* uses `accounts-base`
|
|
|
|
+* uses `mongo`
|
|
|
|
+
|
|
|
|
+## Package-local variables
|
|
|
|
+
|
|
|
|
+* None
|
|
|
|
+
|
|
|
|
+## Side-effects
|
|
|
|
+
|
|
|
|
+* Ensures the index on the service configuration collection upon launch.
|