Role 角色
1. 结构声明
- TS Declaration
- JSON Schema
class Role extends BaseNode {
name: string = '';
uuid: uuid = createUUID();
description: string;
createdTime?: string;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"uuid": {
"$ref": "#/definitions/uuid"
},
"description": {
"type": "string"
},
"createdTime": {
"type": "string"
}
},
"required": [
"name",
"uuid",
"description"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "Role",
"name": "DEV-AdminRole",
"uuid": "e21f5120e0334cd9ac8e0181df831bfe",
"description": "可视化编辑器上添加的角色"
}
concept: Role
name: DEV-AdminRole
uuid: e21f5120e0334cd9ac8e0181df831bfe
description: 可视化编辑器上添加的角色
对应的代码如下:
- 文本化 NASL
@(
uuid = "e21f5120e0334cd9ac8e0181df831bfe",
description = "可视化编辑器上添加的角色",
)
role \`DEV-AdminRole\`