js.syncbase: Rename struct SyncgroupPrefix to a more generic 'TableRow'
MultiPart: 4/8
Change-Id: Id56d53e5d7d2bcc105a8c65956f6bb01260a6987
diff --git a/src/gen-vdl/v.io/v23/security/index.js b/src/gen-vdl/v.io/v23/security/index.js
index 0ccd36f..1268fed 100644
--- a/src/gen-vdl/v.io/v23/security/index.js
+++ b/src/gen-vdl/v.io/v23/security/index.js
@@ -376,6 +376,23 @@
]);
+module.exports.PublicKeyNotAllowedError = makeError('v.io/v23/security.PublicKeyNotAllowed', actions.NO_RETRY, {
+ 'en': '{1:}{2:} peer has public key {3}, not the authorized public key {4}',
+}, [
+ vdl.types.STRING,
+ vdl.types.STRING,
+]);
+
+
+module.exports.EndpointAuthorizationFailedError = makeError('v.io/v23/security.EndpointAuthorizationFailed', actions.NO_RETRY, {
+ 'en': '{1:}{2:} blessings in endpoint {3} not matched by blessings presented: {4} (rejected {5})',
+}, [
+ vdl.types.STRING,
+ _type3,
+ _type8,
+]);
+
+
// Services:
diff --git a/src/gen-vdl/v.io/v23/services/syncbase/nosql/index.js b/src/gen-vdl/v.io/v23/services/syncbase/nosql/index.js
index c413b8d..e69a4de 100644
--- a/src/gen-vdl/v.io/v23/services/syncbase/nosql/index.js
+++ b/src/gen-vdl/v.io/v23/services/syncbase/nosql/index.js
@@ -52,8 +52,8 @@
var _typeSchemaMetadata = new vdl.Type();
var _typeStoreChange = new vdl.Type();
var _typeSyncgroupMemberInfo = new vdl.Type();
-var _typeSyncgroupPrefix = new vdl.Type();
var _typeSyncgroupSpec = new vdl.Type();
+var _typeTableRow = new vdl.Type();
var _typeValue = new vdl.Type();
var _typeValueSelection = new vdl.Type();
_type1.kind = vdl.kind.LIST;
@@ -64,7 +64,7 @@
_type10.elem = _typePrefixPermissions;
_type2.kind = vdl.kind.LIST;
_type2.name = "";
-_type2.elem = _typeSyncgroupPrefix;
+_type2.elem = _typeTableRow;
_type3.kind = vdl.kind.MAP;
_type3.name = "";
_type3.elem = _typeSyncgroupMemberInfo;
@@ -80,7 +80,7 @@
_type6.elem = _typeValue;
_type7.kind = vdl.kind.LIST;
_type7.name = "";
-_type7.elem = vdl.types.UINT16;
+_type7.elem = vdl.types.UINT64;
_type8.kind = vdl.kind.OPTIONAL;
_type8.name = "";
_type8.elem = _typeSchemaMetadata;
@@ -89,7 +89,7 @@
_type9.elem = vdl.types.ANY;
_typeBatchInfo.kind = vdl.kind.STRUCT;
_typeBatchInfo.name = "v.io/v23/services/syncbase/nosql.BatchInfo";
-_typeBatchInfo.fields = [{name: "Id", type: vdl.types.UINT16}, {name: "Hint", type: vdl.types.STRING}, {name: "Source", type: _typeBatchSource}];
+_typeBatchInfo.fields = [{name: "Id", type: vdl.types.UINT64}, {name: "Hint", type: vdl.types.STRING}, {name: "Source", type: _typeBatchSource}];
_typeBatchOptions.kind = vdl.kind.STRUCT;
_typeBatchOptions.name = "v.io/v23/services/syncbase/nosql.BatchOptions";
_typeBatchOptions.fields = [{name: "Hint", type: vdl.types.STRING}, {name: "ReadOnly", type: vdl.types.BOOL}];
@@ -149,12 +149,12 @@
_typeSyncgroupMemberInfo.kind = vdl.kind.STRUCT;
_typeSyncgroupMemberInfo.name = "v.io/v23/services/syncbase/nosql.SyncgroupMemberInfo";
_typeSyncgroupMemberInfo.fields = [{name: "SyncPriority", type: vdl.types.BYTE}];
-_typeSyncgroupPrefix.kind = vdl.kind.STRUCT;
-_typeSyncgroupPrefix.name = "v.io/v23/services/syncbase/nosql.SyncgroupPrefix";
-_typeSyncgroupPrefix.fields = [{name: "TableName", type: vdl.types.STRING}, {name: "RowPrefix", type: vdl.types.STRING}];
_typeSyncgroupSpec.kind = vdl.kind.STRUCT;
_typeSyncgroupSpec.name = "v.io/v23/services/syncbase/nosql.SyncgroupSpec";
_typeSyncgroupSpec.fields = [{name: "Description", type: vdl.types.STRING}, {name: "Perms", type: new access.Permissions()._type}, {name: "Prefixes", type: _type2}, {name: "MountTables", type: _type1}, {name: "IsPrivate", type: vdl.types.BOOL}];
+_typeTableRow.kind = vdl.kind.STRUCT;
+_typeTableRow.name = "v.io/v23/services/syncbase/nosql.TableRow";
+_typeTableRow.fields = [{name: "TableName", type: vdl.types.STRING}, {name: "Row", type: vdl.types.STRING}];
_typeValue.kind = vdl.kind.STRUCT;
_typeValue.name = "v.io/v23/services/syncbase/nosql.Value";
_typeValue.fields = [{name: "Bytes", type: _type4}, {name: "WriteTs", type: vdl.types.INT64}];
@@ -192,8 +192,8 @@
_typeSchemaMetadata.freeze();
_typeStoreChange.freeze();
_typeSyncgroupMemberInfo.freeze();
-_typeSyncgroupPrefix.freeze();
_typeSyncgroupSpec.freeze();
+_typeTableRow.freeze();
_typeValue.freeze();
_typeValueSelection.freeze();
module.exports.BatchInfo = (vdl.registry.lookupOrCreateConstructor(_typeBatchInfo));
@@ -229,8 +229,8 @@
module.exports.SchemaMetadata = (vdl.registry.lookupOrCreateConstructor(_typeSchemaMetadata));
module.exports.StoreChange = (vdl.registry.lookupOrCreateConstructor(_typeStoreChange));
module.exports.SyncgroupMemberInfo = (vdl.registry.lookupOrCreateConstructor(_typeSyncgroupMemberInfo));
-module.exports.SyncgroupPrefix = (vdl.registry.lookupOrCreateConstructor(_typeSyncgroupPrefix));
module.exports.SyncgroupSpec = (vdl.registry.lookupOrCreateConstructor(_typeSyncgroupSpec));
+module.exports.TableRow = (vdl.registry.lookupOrCreateConstructor(_typeTableRow));
module.exports.Value = (vdl.registry.lookupOrCreateConstructor(_typeValue));
module.exports.ValueSelection = {
LOCAL: canonicalize.reduce(new (vdl.registry.lookupOrCreateConstructor(_typeValueSelection))('Local', true), _typeValueSelection),
@@ -414,14 +414,14 @@
SyncgroupManager.prototype._serviceDescription = {
name: 'SyncgroupManager',
pkgPath: 'v.io/v23/services/syncbase/nosql',
- doc: "// SyncgroupManager is the interface for Syncgroup operations.\n// TODO(hpucha): Add blessings to create/join and add a refresh method.",
+ doc: "// SyncgroupManager is the interface for syncgroup operations.\n// TODO(hpucha): Add blessings to create/join and add a refresh method.",
embeds: [],
methods: [
{
name: 'GetSyncgroupNames',
- doc: "// GetSyncgroupNames returns the global names of all Syncgroups attached to\n// this database.",
+ doc: "// GetSyncgroupNames returns the global names of all syncgroups attached to\n// this database.",
inArgs: [],
outArgs: [{
name: '',
@@ -437,7 +437,7 @@
{
name: 'CreateSyncgroup',
- doc: "// CreateSyncgroup creates a new Syncgroup with the given spec.\n//\n// Requires: Client must have at least Read access on the Database; prefix ACL\n// must exist at each Syncgroup prefix; Client must have at least Read access\n// on each of these prefix ACLs.",
+ doc: "// CreateSyncgroup creates a new syncgroup with the given spec.\n//\n// Requires: Client must have at least Read access on the Database; prefix ACL\n// must exist at each syncgroup prefix; Client must have at least Read access\n// on each of these prefix ACLs.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -463,7 +463,7 @@
{
name: 'JoinSyncgroup',
- doc: "// JoinSyncgroup joins the Syncgroup.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// Syncgroup ACL.",
+ doc: "// JoinSyncgroup joins the syncgroup.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -489,7 +489,7 @@
{
name: 'LeaveSyncgroup',
- doc: "// LeaveSyncgroup leaves the Syncgroup. Previously synced data will continue\n// to be available.\n//\n// Requires: Client must have at least Read access on the Database.",
+ doc: "// LeaveSyncgroup leaves the syncgroup. Previously synced data will continue\n// to be available.\n//\n// Requires: Client must have at least Read access on the Database.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -505,7 +505,7 @@
{
name: 'DestroySyncgroup',
- doc: "// DestroySyncgroup destroys the Syncgroup. Previously synced data will\n// continue to be available to all members.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the Syncgroup ACL.",
+ doc: "// DestroySyncgroup destroys the syncgroup. Previously synced data will\n// continue to be available to all members.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -521,7 +521,7 @@
{
name: 'EjectFromSyncgroup',
- doc: "// EjectFromSyncgroup ejects a member from the Syncgroup. The ejected member\n// will not be able to sync further, but will retain any data it has already\n// synced.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the Syncgroup ACL.",
+ doc: "// EjectFromSyncgroup ejects a member from the syncgroup. The ejected member\n// will not be able to sync further, but will retain any data it has already\n// synced.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -542,7 +542,7 @@
{
name: 'GetSyncgroupSpec',
- doc: "// GetSyncgroupSpec gets the Syncgroup spec. version allows for atomic\n// read-modify-write of the spec - see comment for SetSyncgroupSpec.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// Syncgroup ACL.",
+ doc: "// GetSyncgroupSpec gets the syncgroup spec. version allows for atomic\n// read-modify-write of the spec - see comment for SetSyncgroupSpec.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -568,7 +568,7 @@
{
name: 'SetSyncgroupSpec',
- doc: "// SetSyncgroupSpec sets the Syncgroup spec. version may be either empty or\n// the value from a previous Get. If not empty, Set will only succeed if the\n// current version matches the specified one.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the Syncgroup ACL.",
+ doc: "// SetSyncgroupSpec sets the syncgroup spec. version may be either empty or\n// the value from a previous Get. If not empty, Set will only succeed if the\n// current version matches the specified one.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -594,7 +594,7 @@
{
name: 'GetSyncgroupMembers',
- doc: "// GetSyncgroupMembers gets the info objects for members of the Syncgroup.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// Syncgroup ACL.",
+ doc: "// GetSyncgroupMembers gets the info objects for members of the syncgroup.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -1172,7 +1172,7 @@
{
name: 'SyncgroupManager',
pkgPath: 'v.io/v23/services/syncbase/nosql',
- doc: "// SyncgroupManager is the interface for Syncgroup operations.\n// TODO(hpucha): Add blessings to create/join and add a refresh method."
+ doc: "// SyncgroupManager is the interface for syncgroup operations.\n// TODO(hpucha): Add blessings to create/join and add a refresh method."
},
{
name: 'BlobManager',
@@ -1430,7 +1430,7 @@
{
name: 'GetSyncgroupNames',
- doc: "// GetSyncgroupNames returns the global names of all Syncgroups attached to\n// this database.",
+ doc: "// GetSyncgroupNames returns the global names of all syncgroups attached to\n// this database.",
inArgs: [],
outArgs: [{
name: '',
@@ -1446,7 +1446,7 @@
{
name: 'CreateSyncgroup',
- doc: "// CreateSyncgroup creates a new Syncgroup with the given spec.\n//\n// Requires: Client must have at least Read access on the Database; prefix ACL\n// must exist at each Syncgroup prefix; Client must have at least Read access\n// on each of these prefix ACLs.",
+ doc: "// CreateSyncgroup creates a new syncgroup with the given spec.\n//\n// Requires: Client must have at least Read access on the Database; prefix ACL\n// must exist at each syncgroup prefix; Client must have at least Read access\n// on each of these prefix ACLs.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -1472,7 +1472,7 @@
{
name: 'JoinSyncgroup',
- doc: "// JoinSyncgroup joins the Syncgroup.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// Syncgroup ACL.",
+ doc: "// JoinSyncgroup joins the syncgroup.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -1498,7 +1498,7 @@
{
name: 'LeaveSyncgroup',
- doc: "// LeaveSyncgroup leaves the Syncgroup. Previously synced data will continue\n// to be available.\n//\n// Requires: Client must have at least Read access on the Database.",
+ doc: "// LeaveSyncgroup leaves the syncgroup. Previously synced data will continue\n// to be available.\n//\n// Requires: Client must have at least Read access on the Database.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -1514,7 +1514,7 @@
{
name: 'DestroySyncgroup',
- doc: "// DestroySyncgroup destroys the Syncgroup. Previously synced data will\n// continue to be available to all members.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the Syncgroup ACL.",
+ doc: "// DestroySyncgroup destroys the syncgroup. Previously synced data will\n// continue to be available to all members.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -1530,7 +1530,7 @@
{
name: 'EjectFromSyncgroup',
- doc: "// EjectFromSyncgroup ejects a member from the Syncgroup. The ejected member\n// will not be able to sync further, but will retain any data it has already\n// synced.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the Syncgroup ACL.",
+ doc: "// EjectFromSyncgroup ejects a member from the syncgroup. The ejected member\n// will not be able to sync further, but will retain any data it has already\n// synced.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -1551,7 +1551,7 @@
{
name: 'GetSyncgroupSpec',
- doc: "// GetSyncgroupSpec gets the Syncgroup spec. version allows for atomic\n// read-modify-write of the spec - see comment for SetSyncgroupSpec.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// Syncgroup ACL.",
+ doc: "// GetSyncgroupSpec gets the syncgroup spec. version allows for atomic\n// read-modify-write of the spec - see comment for SetSyncgroupSpec.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -1577,7 +1577,7 @@
{
name: 'SetSyncgroupSpec',
- doc: "// SetSyncgroupSpec sets the Syncgroup spec. version may be either empty or\n// the value from a previous Get. If not empty, Set will only succeed if the\n// current version matches the specified one.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the Syncgroup ACL.",
+ doc: "// SetSyncgroupSpec sets the syncgroup spec. version may be either empty or\n// the value from a previous Get. If not empty, Set will only succeed if the\n// current version matches the specified one.\n//\n// Requires: Client must have at least Read access on the Database, and must\n// have Admin access on the syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
@@ -1603,7 +1603,7 @@
{
name: 'GetSyncgroupMembers',
- doc: "// GetSyncgroupMembers gets the info objects for members of the Syncgroup.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// Syncgroup ACL.",
+ doc: "// GetSyncgroupMembers gets the info objects for members of the syncgroup.\n//\n// Requires: Client must have at least Read access on the Database and on the\n// syncgroup ACL.",
inArgs: [{
name: 'sgName',
doc: "",
diff --git a/src/nosql/index.js b/src/nosql/index.js
index 597a67a..e532201 100644
--- a/src/nosql/index.js
+++ b/src/nosql/index.js
@@ -25,7 +25,7 @@
Schema: Schema,
SchemaMetadata: vdl.SchemaMetadata,
SyncgroupMemberInfo: vdl.SyncgroupMemberInfo,
- SyncgroupPrefix: vdl.SyncgroupPrefix,
+ TableRow: vdl.TableRow,
SyncgroupSpec: vdl.SyncgroupSpec,
WatchChange: watch.WatchChange
};
diff --git a/test/integration/test-syncgroup.js b/test/integration/test-syncgroup.js
index c1e570f..2b4635f 100644
--- a/test/integration/test-syncgroup.js
+++ b/test/integration/test-syncgroup.js
@@ -62,7 +62,7 @@
test('syncgroup.create with valid spec', function(t) {
var perms = {};
var prefixes = [
- new nosql.SyncgroupPrefix({tableName: 't1', rowPrefix: 'foo'})
+ new nosql.TableRow({tableName: 't1', row: 'foo'})
];
setupDatabase(t, function(err, o) {
@@ -95,10 +95,10 @@
test('creating a nested syncgroup', function(t) {
var perms = {};
var prefixes = [
- new nosql.SyncgroupPrefix({tableName: 't1', rowPrefix: 'foo'})
+ new nosql.TableRow({tableName: 't1', row: 'foo'})
];
var prefixes2 = [
- new nosql.SyncgroupPrefix({tableName: 't1', rowPrefix: 'foobar'})
+ new nosql.TableRow({tableName: 't1', row: 'foobar'})
];
setupSyncgroup(t, perms, prefixes, function(err, o) {
@@ -132,10 +132,10 @@
test('creating a syncgroup that already exists', function(t) {
var perms = {};
var prefixes = [
- new nosql.SyncgroupPrefix({tableName: 't1', rowPrefix: 'foo'})
+ new nosql.TableRow({tableName: 't1', row: 'foo'})
];
var prefixes2 = [
- new nosql.SyncgroupPrefix({tableName: 'another', rowPrefix: 'prefix'})
+ new nosql.TableRow({tableName: 'another', row: 'prefix'})
];
setupSyncgroup(t, perms, prefixes, function(err, o) {
@@ -170,7 +170,7 @@
}]
]);
var prefixes = [
- new nosql.SyncgroupPrefix({tableName: 't1', rowPrefix: 'foo'})
+ new nosql.TableRow({tableName: 't1', row: 'foo'})
];
setupSyncgroup(t, perms, prefixes, function(err, o) {
@@ -192,7 +192,7 @@
}]
]);
var prefixes = [
- new nosql.SyncgroupPrefix({tableName: 't1', rowPrefix: 'foo'})
+ new nosql.TableRow({tableName: 't1', row: 'foo'})
];
setupSyncgroup(t, perms, prefixes, function(err, o) {
@@ -240,7 +240,7 @@
async.forEach(fullNames, function(fullName, cb) {
var spec = new nosql.SyncgroupSpec({
description: 'syncgroup named ' + fullName,
- prefixes: [new nosql.SyncgroupPrefix({tableName: '', rowPrefix: ''})]
+ prefixes: [new nosql.TableRow({tableName: '', row: ''})]
});
db.syncgroup(fullName).create(ctx, spec, myInfo, cb);
@@ -273,7 +273,7 @@
test('syncgroup.get/setSpec', function(t) {
var perms = {};
var prefixes = [
- new nosql.SyncgroupPrefix({tableName: 'biz', rowPrefix: 'bazz'})
+ new nosql.TableRow({tableName: 'biz', row: 'bazz'})
];
var firstVersion;