blob: a929339144df78ceb9e019a3bb49de7534c5cbcf [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file was auto-generated by the vanadium vdl tool.
var vdl = require('vanadium').vdl;
var makeError = require('vanadium').verror.makeError;
var actions = require('vanadium').verror.actions;
var canonicalize = require('vanadium').vdl.canonicalize;
var security = require('./..');
module.exports = {};
// Types:
var _type1 = new vdl.Type();
var _type2 = new vdl.Type();
var _type3 = new vdl.Type();
var _typeAccessList = new vdl.Type();
var _typePermissions = new vdl.Type();
var _typeTag = new vdl.Type();
_type1.kind = vdl.kind.LIST;
_type1.name = "";
_type1.elem = new security.BlessingPattern()._type;
_type2.kind = vdl.kind.LIST;
_type2.name = "";
_type2.elem = vdl.types.STRING;
_type3.kind = vdl.kind.LIST;
_type3.name = "";
_type3.elem = new security.RejectedBlessing()._type;
_typeAccessList.kind = vdl.kind.STRUCT;
_typeAccessList.name = "v.io/v23/security/access.AccessList";
_typeAccessList.fields = [{name: "In", type: _type1}, {name: "NotIn", type: _type2}];
_typePermissions.kind = vdl.kind.MAP;
_typePermissions.name = "v.io/v23/security/access.Permissions";
_typePermissions.elem = _typeAccessList;
_typePermissions.key = vdl.types.STRING;
_typeTag.kind = vdl.kind.STRING;
_typeTag.name = "v.io/v23/security/access.Tag";
_type1.freeze();
_type2.freeze();
_type3.freeze();
_typeAccessList.freeze();
_typePermissions.freeze();
_typeTag.freeze();
module.exports.AccessList = (vdl.registry.lookupOrCreateConstructor(_typeAccessList));
module.exports.Permissions = (vdl.registry.lookupOrCreateConstructor(_typePermissions));
module.exports.Tag = (vdl.registry.lookupOrCreateConstructor(_typeTag));
// Consts:
module.exports.Admin = canonicalize.reduce(new (vdl.registry.lookupOrCreateConstructor(_typeTag))("Admin", true), _typeTag);
module.exports.Debug = canonicalize.reduce(new (vdl.registry.lookupOrCreateConstructor(_typeTag))("Debug", true), _typeTag);
module.exports.Read = canonicalize.reduce(new (vdl.registry.lookupOrCreateConstructor(_typeTag))("Read", true), _typeTag);
module.exports.Write = canonicalize.reduce(new (vdl.registry.lookupOrCreateConstructor(_typeTag))("Write", true), _typeTag);
module.exports.Resolve = canonicalize.reduce(new (vdl.registry.lookupOrCreateConstructor(_typeTag))("Resolve", true), _typeTag);
// Errors:
module.exports.TooBigError = makeError('v.io/v23/security/access.TooBig', actions.NO_RETRY, {
'en': '{1:}{2:} AccessList is too big',
}, [
]);
module.exports.NoPermissionsError = makeError('v.io/v23/security/access.NoPermissions', actions.NO_RETRY, {
'en': '{1:}{2:} {3} does not have {5} access (rejected blessings: {4})',
}, [
_type2,
_type3,
vdl.types.STRING,
]);
module.exports.AccessListMatchError = makeError('v.io/v23/security/access.AccessListMatch', actions.NO_RETRY, {
'en': '{1:}{2:} {3} does not match the access list (rejected blessings: {4})',
}, [
_type2,
_type3,
]);
module.exports.UnenforceablePatternsError = makeError('v.io/v23/security/access.UnenforceablePatterns', actions.NO_RETRY, {
'en': '{1:}{2:} AccessList contains the following invalid or unrecognized patterns in the In list: {3}',
}, [
_type1,
]);
module.exports.InvalidOpenAccessListError = makeError('v.io/v23/security/access.InvalidOpenAccessList', actions.NO_RETRY, {
'en': '{1:}{2:} AccessList with the pattern ... in its In list must have no other patterns in the In or NotIn lists',
}, [
]);
// Services: