mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-06-12 20:48:09 +00:00
Split private gateways under tenant in uplink / downlink.
This makes it possible to share uplink data with other tenants, but do not allow other tenants to use these gateways for downlinks.
This commit is contained in:
20
api/js/api/tenant_pb.d.ts
vendored
20
api/js/api/tenant_pb.d.ts
vendored
@ -25,8 +25,11 @@ export class Tenant extends jspb.Message {
|
||||
getMaxDeviceCount(): number;
|
||||
setMaxDeviceCount(value: number): void;
|
||||
|
||||
getPrivateGateways(): boolean;
|
||||
setPrivateGateways(value: boolean): void;
|
||||
getPrivateGatewaysUp(): boolean;
|
||||
setPrivateGatewaysUp(value: boolean): void;
|
||||
|
||||
getPrivateGatewaysDown(): boolean;
|
||||
setPrivateGatewaysDown(value: boolean): void;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Tenant.AsObject;
|
||||
@ -46,7 +49,8 @@ export namespace Tenant {
|
||||
canHaveGateways: boolean,
|
||||
maxGatewayCount: number,
|
||||
maxDeviceCount: number,
|
||||
privateGateways: boolean,
|
||||
privateGatewaysUp: boolean,
|
||||
privateGatewaysDown: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,8 +74,11 @@ export class TenantListItem extends jspb.Message {
|
||||
getCanHaveGateways(): boolean;
|
||||
setCanHaveGateways(value: boolean): void;
|
||||
|
||||
getPrivateGateways(): boolean;
|
||||
setPrivateGateways(value: boolean): void;
|
||||
getPrivateGatewaysUp(): boolean;
|
||||
setPrivateGatewaysUp(value: boolean): void;
|
||||
|
||||
getPrivateGatewaysDown(): boolean;
|
||||
setPrivateGatewaysDown(value: boolean): void;
|
||||
|
||||
getMaxGatewayCount(): number;
|
||||
setMaxGatewayCount(value: number): void;
|
||||
@ -96,7 +103,8 @@ export namespace TenantListItem {
|
||||
updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
||||
name: string,
|
||||
canHaveGateways: boolean,
|
||||
privateGateways: boolean,
|
||||
privateGatewaysUp: boolean,
|
||||
privateGatewaysDown: boolean,
|
||||
maxGatewayCount: number,
|
||||
maxDeviceCount: number,
|
||||
}
|
||||
|
84
api/js/api/tenant_pb.js
vendored
84
api/js/api/tenant_pb.js
vendored
@ -474,7 +474,8 @@ proto.api.Tenant.toObject = function(includeInstance, msg) {
|
||||
canHaveGateways: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
|
||||
maxGatewayCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
||||
maxDeviceCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
||||
privateGateways: jspb.Message.getBooleanFieldWithDefault(msg, 7, false)
|
||||
privateGatewaysUp: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
|
||||
privateGatewaysDown: jspb.Message.getBooleanFieldWithDefault(msg, 8, false)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@ -537,7 +538,11 @@ proto.api.Tenant.deserializeBinaryFromReader = function(msg, reader) {
|
||||
break;
|
||||
case 7:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setPrivateGateways(value);
|
||||
msg.setPrivateGatewaysUp(value);
|
||||
break;
|
||||
case 8:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setPrivateGatewaysDown(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
@ -610,13 +615,20 @@ proto.api.Tenant.serializeBinaryToWriter = function(message, writer) {
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getPrivateGateways();
|
||||
f = message.getPrivateGatewaysUp();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
7,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getPrivateGatewaysDown();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
8,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -729,10 +741,10 @@ proto.api.Tenant.prototype.setMaxDeviceCount = function(value) {
|
||||
|
||||
|
||||
/**
|
||||
* optional bool private_gateways = 7;
|
||||
* optional bool private_gateways_up = 7;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.api.Tenant.prototype.getPrivateGateways = function() {
|
||||
proto.api.Tenant.prototype.getPrivateGatewaysUp = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
|
||||
};
|
||||
|
||||
@ -741,11 +753,29 @@ proto.api.Tenant.prototype.getPrivateGateways = function() {
|
||||
* @param {boolean} value
|
||||
* @return {!proto.api.Tenant} returns this
|
||||
*/
|
||||
proto.api.Tenant.prototype.setPrivateGateways = function(value) {
|
||||
proto.api.Tenant.prototype.setPrivateGatewaysUp = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 7, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bool private_gateways_down = 8;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.api.Tenant.prototype.getPrivateGatewaysDown = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
* @return {!proto.api.Tenant} returns this
|
||||
*/
|
||||
proto.api.Tenant.prototype.setPrivateGatewaysDown = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 8, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -783,7 +813,8 @@ proto.api.TenantListItem.toObject = function(includeInstance, msg) {
|
||||
updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
||||
name: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
||||
canHaveGateways: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
|
||||
privateGateways: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
|
||||
privateGatewaysUp: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
|
||||
privateGatewaysDown: jspb.Message.getBooleanFieldWithDefault(msg, 9, false),
|
||||
maxGatewayCount: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
||||
maxDeviceCount: jspb.Message.getFieldWithDefault(msg, 8, 0)
|
||||
};
|
||||
@ -846,7 +877,11 @@ proto.api.TenantListItem.deserializeBinaryFromReader = function(msg, reader) {
|
||||
break;
|
||||
case 6:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setPrivateGateways(value);
|
||||
msg.setPrivateGatewaysUp(value);
|
||||
break;
|
||||
case 9:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setPrivateGatewaysDown(value);
|
||||
break;
|
||||
case 7:
|
||||
var value = /** @type {number} */ (reader.readUint32());
|
||||
@ -922,13 +957,20 @@ proto.api.TenantListItem.serializeBinaryToWriter = function(message, writer) {
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getPrivateGateways();
|
||||
f = message.getPrivateGatewaysUp();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
6,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getPrivateGatewaysDown();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
9,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getMaxGatewayCount();
|
||||
if (f !== 0) {
|
||||
writer.writeUint32(
|
||||
@ -1075,10 +1117,10 @@ proto.api.TenantListItem.prototype.setCanHaveGateways = function(value) {
|
||||
|
||||
|
||||
/**
|
||||
* optional bool private_gateways = 6;
|
||||
* optional bool private_gateways_up = 6;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.api.TenantListItem.prototype.getPrivateGateways = function() {
|
||||
proto.api.TenantListItem.prototype.getPrivateGatewaysUp = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
|
||||
};
|
||||
|
||||
@ -1087,11 +1129,29 @@ proto.api.TenantListItem.prototype.getPrivateGateways = function() {
|
||||
* @param {boolean} value
|
||||
* @return {!proto.api.TenantListItem} returns this
|
||||
*/
|
||||
proto.api.TenantListItem.prototype.setPrivateGateways = function(value) {
|
||||
proto.api.TenantListItem.prototype.setPrivateGatewaysUp = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 6, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bool private_gateways_down = 9;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.api.TenantListItem.prototype.getPrivateGatewaysDown = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
* @return {!proto.api.TenantListItem} returns this
|
||||
*/
|
||||
proto.api.TenantListItem.prototype.setPrivateGatewaysDown = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 9, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional uint32 max_gateway_count = 7;
|
||||
* @return {number}
|
||||
|
Reference in New Issue
Block a user