Skip to content

Commit

Permalink
Mark some more methods as private API
Browse files Browse the repository at this point in the history
  • Loading branch information
lsegal committed Nov 26, 2012
1 parent a563105 commit 92c766f
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,32 @@
* language governing permissions and limitations under the License.
*/

/**
* The main AWS namespace
*/
var AWS = {};
module.exports = AWS;
require('./util');

AWS.util.update(AWS, {

/**
* @constant
*/
VERSION: '0.1',

/**
* @api private
*/
RequestSigner: AWS.util.inherit({
constructor: function RequestSigner(request) {
this.request = request;
}
}),

/**
* @api private
*/
XML: {}

});
Expand Down
3 changes: 3 additions & 0 deletions lib/json_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
var AWS = require('./core');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.JSONService = inherit(AWS.Service, {

constructor: function JSONService(config) {
Expand Down
18 changes: 18 additions & 0 deletions lib/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,43 @@ AWS.AWSRequest = inherit({
return this;
},

/**
* @api private
*/
notifyData: function notifyData(data) {
this.awsResponse.data = data;
this.notify('data', this.callbacks.data);
},

/**
* @api private
*/
notifyDone: function notifyDone(data) {
this.awsResponse.data = data;
this.notify('done', this.callbacks.done.concat(this.callbacks.always));
},

/**
* @api private
*/
notifyFail: function notifyFail(error) {
this.awsResponse.error = error;
this.notify('fail', this.callbacks.fail.concat(this.callbacks.always));
},

/**
* @api private
*/
notify: function notify(state, callbacks) {
AWS.util.arrayEach.call(this, callbacks, function iterator(cb) {
this.call(cb[0], cb[1]);
});
this.state = state;
},

/**
* @api private
*/
call: function call(callback, options) {
var binding = this.awsResponse;
if (options && options.bind) {
Expand All @@ -122,6 +137,9 @@ AWS.AWSRequest = inherit({
callback.call(binding, this.awsResponse);
},

/**
* @api private
*/
addConfigCallback: function addConfigCallback(cbMethod, configName) {
if (!this.awsResponse.service) return;

Expand Down
12 changes: 12 additions & 0 deletions lib/query_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ var AWS = require('./core');
require('./xml/parser.js');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.QueryService = inherit(AWS.Service, {

constructor: function QueryService(config) {
Expand Down Expand Up @@ -70,6 +73,9 @@ AWS.QueryService = inherit(AWS.Service, {

});

/**
* @api private
*/
AWS.QueryParamList = inherit({

constructor: function QueryParamList() {
Expand All @@ -96,6 +102,9 @@ AWS.QueryParamList = inherit({

});

/**
* @api private
*/
AWS.QueryParam = inherit({

constructor: function QueryParam(name, value) {
Expand All @@ -115,6 +124,9 @@ AWS.QueryParam = inherit({

});

/**
* @api private
*/
AWS.QueryParamSerializer = inherit({

constructor: function QueryParamSerializer(rules, memberedLists) {
Expand Down
3 changes: 3 additions & 0 deletions lib/rest_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
var AWS = require('./core');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.RESTService = inherit(AWS.Service, {

constructor: function RESTService(config) {
Expand Down
3 changes: 3 additions & 0 deletions lib/rest_xml_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ require('./xml/builder');
require('./xml/parser');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.RESTXMLService = inherit(AWS.RESTService, {

constructor: function RESTXMLService(config) {
Expand Down
3 changes: 3 additions & 0 deletions lib/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
var AWS = require('./core');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.Service = inherit({

constructor: function Service(config) {
Expand Down
3 changes: 3 additions & 0 deletions lib/sigv2.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
var AWS = require('./core');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.SigV2 = inherit(AWS.RequestSigner, {

constructor: function SigV2(request) {
Expand Down
3 changes: 3 additions & 0 deletions lib/sigv3.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
var AWS = require('./core');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.SigV3 = inherit(AWS.RequestSigner, {

constructor: function SigV3(request) {
Expand Down
3 changes: 3 additions & 0 deletions lib/sigv4.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
var AWS = require('./core');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.SigV4 = inherit(AWS.RequestSigner, {

constructor: function SigV4(request, serviceName) {
Expand Down
3 changes: 3 additions & 0 deletions lib/sigvs3.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
var AWS = require('./core');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.SigVS3 = inherit(AWS.RequestSigner, {

constructor: function SigVS3(request) {
Expand Down
6 changes: 6 additions & 0 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ AWS.util = {

},

/** @!ignore */

/* Abort constant */
abort: {},

each: function each(object, iterFunction) {
Expand Down Expand Up @@ -141,6 +144,9 @@ AWS.util = {
return true;
},

/**
* @api private
*/
inherit: function inherit(klass, features) {
var newObject = null;
if (features === undefined) {
Expand Down
3 changes: 3 additions & 0 deletions lib/xml/builder_libxmljs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ var AWS = require('../core');
var libxml = require('libxmljs');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.XML.Builder = inherit({

constructor: function XMLBuilder(root, rules, options) {
Expand Down
3 changes: 3 additions & 0 deletions lib/xml/builder_xmlbuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ var AWS = require('../core');
var builder = require('xmlbuilder');
var inherit = AWS.util.inherit;

/**
* @api private
*/
AWS.XML.Builder = inherit({

constructor: function XMLBuilder(root, rules, options) {
Expand Down
3 changes: 3 additions & 0 deletions lib/xml/parser_xml2js.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ var AWS = require('../core');
var inherit = AWS.util.inherit;
var xml2js = require('xml2js');

/**
* @api private
*/
AWS.XML.Parser = inherit({

constructor: function XMLParser(rules) {
Expand Down

0 comments on commit 92c766f

Please sign in to comment.