Work on JSDoc comments

This commit is contained in:
crandmck 2014-04-07 16:18:51 -07:00
parent dc3011c800
commit bb6567c439
1 changed files with 24 additions and 14 deletions

View File

@ -9,7 +9,7 @@ module.exports = StorageService;
* Storage service constructor. Properties of options object depend on the storage service provider.
*
*
* @options {Object} options The options to create a provider; see below;
* @options {Object} options The options to create a provider; see below.
* @prop {Object} connector <!-- What is this? -->
* @prop {String} provider Use 'filesystem' for local file system. Other supported values are: 'amazon', 'rackspace', 'azure', and 'openstack'.
* @prop {String} root With 'filesystem' provider, the path to the root of storage directory.
@ -46,7 +46,9 @@ function map(obj) {
/**
* List all storage service containers.
* @param {Function} callback Callback function; parameters: err - error message, containers - object holding all containers.
* @callback {Function} callback Callback function. See below.
* @param err {String} Error message
* @param containers {Object} object holding all containers.
*/
StorageService.prototype.getContainers = function (cb) {
@ -64,12 +66,18 @@ StorageService.prototype.getContainers = function (cb) {
/**
* Create a new storage service container. Other option properties depend on the provider.
*
* @options {Object} options The options to create a provider; see below;
* @options {Object} options The options to create a provider; see below.
* @prop {Object} connector <!-- WHAT IS THIS? -->
* @prop {String} provider Storage service provider. Use 'filesystem' for local file system. Other supported values are: 'amazon', 'rackspace', 'azure', and 'openstack'.
* @prop {String} root With 'filesystem' provider, the path to the root of storage directory.
* @prop {String}
* @param {Function} callback Callback function.
* @prop {String} provider Storage service provider. Must be one of:
* <ul><li>'filesystem' - local file system.</li>
* <li>'amazon'</li>
* <li>'rackspace'</li>
* <li>'azure'</li>
* <li>'openstack'</li>
* </ul>
*
* Other supported values depend on the provider. See the [documentation](http://docs.strongloop.com/display/DOC/Storage+service) for more information.
* @callback {Function} callback Callback function.
*/
StorageService.prototype.createContainer = function (options, cb) {
@ -86,7 +94,7 @@ StorageService.prototype.createContainer = function (options, cb) {
/**
* Destroy an existing storage service container.
* @param {Object} container Container object.
* @param {Function} callback Callback function.
* @callback {Function} callback Callback function.
*/
StorageService.prototype.destroyContainer = function (container, cb) {
return this.client.destroyContainer(container, cb);
@ -95,7 +103,7 @@ StorageService.prototype.destroyContainer = function (container, cb) {
/**
* Look up a container by name.
* @param {Object} container Container object.
* @param {Function} callback Callback function.
* @callback {Function} callback Callback function.
*/
StorageService.prototype.getContainer = function (container, cb) {
return this.client.getContainer(container, function (err, container) {
@ -106,9 +114,10 @@ StorageService.prototype.getContainer = function (container, cb) {
/**
* Get the stream for uploading
* @param {Object} container Container object.
* @param {String} file IS THIS A FILE?
* @param {String} file <!-- IS THIS PATH TO A FILE OR FILE OBJ? -->
* @options options See below.
* @param callback Callback function
* @prop TBD
* @callback callback Callback function
*/
StorageService.prototype.uploadStream = function (container, file, options, cb) {
if (!cb && typeof options === 'function') {
@ -130,7 +139,8 @@ StorageService.prototype.uploadStream = function (container, file, options, cb)
* Get the stream for downloading.
* @param {Object} container Container object.
* @param {String} file Path to file.
* @options {Object} options See below. <!-- What are the options -->
* @options {Object} options See below.
* @prop TBD <!-- What are the options? -->
* @param {Function} callback Callback function
*/
StorageService.prototype.downloadStream = function (container, file, options, cb) {
@ -152,8 +162,8 @@ StorageService.prototype.downloadStream = function (container, file, options, cb
/**
* List all files within the given container.
* @param {Object} container Container object.
* @param {Function} download
* @param {Function} callback Callback function
* @param {Function} download <!-- What is this? -->
* @callback {Function} callback Callback function
*/
StorageService.prototype.getFiles = function (container, download, cb) {
return this.client.getFiles(container, download, function (err, files) {