提交 61ecf6cb 编写于 作者: 麦壳饼's avatar 麦壳饼

加入中文注释

上级 0aa1c04f
......@@ -24,6 +24,9 @@ using Silkier.AspNetCore;
namespace IoTSharp.Controllers
{
/// <summary>
/// 用户管理
/// </summary>
[ApiController]
[Authorize]
[Route("api/[controller]/[action]")]
......@@ -50,6 +53,10 @@ namespace IoTSharp.Controllers
_context = context;
_settings = options.Value;
}
/// <summary>
/// 获取当前登录用户信息
/// </summary>
/// <returns></returns>
[HttpGet, Authorize(Roles = nameof(UserRole.NormalUser))]
public async Task<ActionResult<ApiResult<UserInfoDto>>> MyInfo()
{
......@@ -69,7 +76,11 @@ namespace IoTSharp.Controllers
};
return new ApiResult<UserInfoDto>(ApiCode.Success, "OK", uidto);
}
/// <summary>
/// 登录用户
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpPost]
[ProducesResponseType(StatusCodes.Status200OK)]
......@@ -130,7 +141,10 @@ namespace IoTSharp.Controllers
return this.ExceptionRequest(ex);
}
}
/// <summary>
/// 退出账号
/// </summary>
/// <returns></returns>
[AllowAnonymous]
[HttpPost]
[ProducesResponseType(StatusCodes.Status200OK)]
......@@ -149,12 +163,12 @@ namespace IoTSharp.Controllers
}
}
/// <summary>
/// Register a user
/// 注册用户
/// </summary>
/// <param name="model"></param>
/// <returns ></returns>
/// <returns >返回登录结果</returns>
[AllowAnonymous]
[HttpPost]
public async Task<ActionResult<LoginResult>> Register([FromBody] RegisterDto model)
......@@ -197,7 +211,11 @@ namespace IoTSharp.Controllers
}
return actionResult;
}
/// <summary>
/// 返回客户所属用户列表
/// </summary>
/// <param name="customerId"></param>
/// <returns></returns>
[HttpGet("{customerId}")]
public async Task<ActionResult<List<UserItemDto>>> All(Guid customerId)
{
......
......@@ -12,6 +12,9 @@ using IoTSharp.Dtos;
namespace IoTSharp.Controllers
{
/// <summary>
/// 全局设备认证KEY管理
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class AuthorizedKeysController : ControllerBase
......@@ -33,14 +36,21 @@ namespace IoTSharp.Controllers
}
// GET: api/AuthorizedKeys
/// <summary>
/// 获取当前已登录用户所属客户的全局认证KEY
/// </summary>
/// <returns></returns>
[HttpGet]
public async Task<ActionResult<IEnumerable<AuthorizedKey>>> GetAuthorizedKeys()
{
return await _context.AuthorizedKeys.JustCustomer(_customerId).ToListAsync();
}
// GET: api/AuthorizedKeys/5
/// <summary>
/// 根据ID获取KEY
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet("{id}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
......
......@@ -11,6 +11,9 @@ using System.Threading.Tasks;
namespace IoTSharp.Controllers
{
/// <summary>
/// 客户管理
/// </summary>
[Route("api/[controller]")]
[Authorize]
[ApiController]
......@@ -22,8 +25,11 @@ namespace IoTSharp.Controllers
{
_context = context;
}
// GET: api/Tenants
/// <summary>
/// 获取指定租户下的所有客户
/// </summary>
/// <param name="tenantId">租户</param>
/// <returns></returns>
[HttpGet("Tenant/{tenantId}")]
[Authorize(Roles = nameof(UserRole.NormalUser))]
[ProducesResponseType(StatusCodes.Status200OK)]
......@@ -42,7 +48,11 @@ namespace IoTSharp.Controllers
}
}
// GET: api/Customers/5
/// <summary>
/// 返回指定id的客户
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[Authorize(Roles = nameof(UserRole.NormalUser))]
[HttpGet("{id}")]
[ProducesResponseType(StatusCodes.Status200OK)]
......@@ -60,7 +70,12 @@ namespace IoTSharp.Controllers
return customer;
}
// PUT: api/Customers/5
/// <summary>
/// 修改指定租户为 指定的信息
/// </summary>
/// <param name="id"></param>
/// <param name="customer"></param>
/// <returns></returns>
[Authorize(Roles = nameof(UserRole.CustomerAdmin))]
[HttpPut("{id}")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
......@@ -94,7 +109,11 @@ namespace IoTSharp.Controllers
return NoContent();
}
// POST: api/Customers
/// <summary>
/// 为当前客户所在的租户新增客户
/// </summary>
/// <param name="customer"></param>
/// <returns></returns>
[Authorize(Roles = nameof(UserRole.CustomerAdmin))]
[HttpPost]
public async Task<ActionResult<Customer>> PostCustomer(CustomerDto customer)
......@@ -115,7 +134,11 @@ namespace IoTSharp.Controllers
await _context.SaveChangesAsync();
return await GetCustomer(customer.Id);
}
/// <summary>
/// 删除指定的客户ID
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
// DELETE: api/Customers/5
[Authorize(Roles = nameof(UserRole.TenantAdmin))]
[HttpDelete("{id}")]
......
......@@ -22,6 +22,9 @@ using IoTSharp.Storage;
namespace IoTSharp.Controllers
{
/// <summary>
/// 设备管理
/// </summary>
[Route("api/[controller]")]
[Authorize]
[ApiController]
......@@ -46,7 +49,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Get all of the customer's devices.
/// 获取指定客户的设备列表
/// </summary>
/// <param name="customerId"></param>
/// <returns></returns>
......@@ -71,7 +74,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Get a device's credentials
/// 获取指定设备的认证方式信息
/// </summary>
/// <param name="deviceId"></param>
/// <returns></returns>
......@@ -92,7 +95,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Request attribute values from the server
///获取指定设备的最新属性
/// </summary>
/// <param name="deviceId"></param>
/// <returns></returns>
......@@ -112,7 +115,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Request telemetry values from the server
///获取指定设备的最新遥测数据
/// </summary>
/// <param name="deviceId"></param>
/// <returns></returns>
......@@ -131,10 +134,10 @@ namespace IoTSharp.Controllers
return await _storage.GetTelemetryLatest(deviceId);
}
/// <summary>
/// Request telemetry values from the server
/// 获取指定设备的指定key 的遥测数据
/// </summary>
/// <param name="deviceId">Which device do you read?</param>
/// <param name="keys">Specify key name list , use , or space or ; to split </param>
/// <param name="keys">指定键值列表, 使用分号或者逗号分割 。 </param>
/// <returns></returns>
[Authorize(Roles = nameof(UserRole.NormalUser))]
[HttpGet("{deviceId}/TelemetryLatest/{keys}")]
......@@ -154,7 +157,7 @@ namespace IoTSharp.Controllers
}
}
/// <summary>
/// Request telemetry values from the server
/// 获取指定设备指定keys的最新属性
/// </summary>
/// <param name="deviceId">Which device do you read?</param>
/// <param name="keys">Specify key name list , use , or space or ; to split </param>
......@@ -179,11 +182,11 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Request telemetry values from the server
/// 获取指定设备和指定时间, 指定key的数据
/// </summary>
/// <param name="deviceId">Which device do you read?</param>
/// <param name="keys">Specify key name list , use , or space or ; to split </param>
/// <param name="begin">For example: 2019-06-06 12:24</param>
/// <param name="begin">开始以时间, 比如 2019-06-06 12:24</param>
/// <returns></returns>
[Authorize(Roles = nameof(UserRole.NormalUser))]
[HttpGet("{deviceId}/TelemetryLatest/{keyName}/{begin}")]
......@@ -204,7 +207,7 @@ namespace IoTSharp.Controllers
}
}
/// <summary>
/// Request telemetry values from the server
/// 返回指定设备的的遥测数据, 按照keyname 和指定时间范围获取,如果keyname 为 all , 则返回全部key 的数据
/// </summary>
/// <param name="deviceId">Which device do you read?</param>
/// <param name="keys">Specify key name list , use , or space or ; to split </param>
......@@ -234,7 +237,7 @@ namespace IoTSharp.Controllers
/// <summary>
/// Get a device's detail
/// 获取设备详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
......@@ -257,7 +260,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Modify a device
/// 修改设备
/// </summary>
/// <param name="id"></param>
/// <param name="device"></param>
......@@ -311,7 +314,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Create a new device
/// 创建设备, 客户ID和租户ID均为当前登录用户所属
/// </summary>
/// <param name="device"></param>
/// <returns></returns>
......@@ -338,7 +341,11 @@ namespace IoTSharp.Controllers
return await GetDevice(devvalue.Id);
}
// DELETE: api/Devices/5
/// <summary>
/// 删除设备
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[Authorize(Roles = nameof(UserRole.CustomerAdmin))]
[HttpDelete("{id}")]
[ProducesResponseType(StatusCodes.Status200OK)]
......@@ -364,7 +371,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Device rpc
/// 远程控制指定设备, 此方法通过给远程设备发送mqtt消息进行控制,设备在收到信息后回复结果,此方法才算调用结束
/// </summary>
/// <param name="access_token"></param>
/// <param name="method"></param>
......@@ -410,7 +417,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Upload device telemetry to the server.
/// HTTP方式上传遥测数据
/// </summary>
/// <param name="access_token">Device 's access token</param>
/// <param name="telemetrys"></param>
......@@ -436,7 +443,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Get service-side device attributes from the server.
/// 获取服务测的设备熟悉
/// </summary>
/// <param name="access_token">Device 's access token </param>
///<param name="dataSide">Specifying data side.</param>
......@@ -473,7 +480,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Upload client-side device attributes to the server.
/// 上传客户侧属性数据
/// </summary>
/// <param name="access_token">Device 's access token </param>
/// <param name="attributes">attributes</param>
......
......@@ -22,6 +22,9 @@ using Silkier.AspNetCore;
namespace IoTSharp.Controllers
{
/// <summary>
/// 安装
/// </summary>
[ApiController]
[Route("api/[controller]/[action]")]
public class InstallerController : ControllerBase
......@@ -46,7 +49,10 @@ namespace IoTSharp.Controllers
_context = context;
_dBInitializer = dBInitializer;
}
/// <summary>
/// 检查IoTSharp实例信息
/// </summary>
/// <returns></returns>
[AllowAnonymous]
[HttpGet]
[ProducesResponseType(StatusCodes.Status200OK)]
......@@ -96,31 +102,53 @@ namespace IoTSharp.Controllers
public class InstanceDto
{
/// <summary>
/// 系统版本
/// </summary>
public string Version { get; internal set; }
/// <summary>
/// 是否被安装
/// </summary>
public bool Installed { get; internal set; }
}
public class InstallDto
{
/// <summary>
/// 系统管理员用户名
/// </summary>
[Required]
[EmailAddress]
public string Email { get; set; }
/// <summary>
/// 客户名称
/// </summary>
[Required]
public string CustomerName { get; set; }
/// <summary>
/// 系统管理员密码
/// </summary>
[Required]
[StringLength(100, ErrorMessage = "PASSWORD_MIN_LENGTH", MinimumLength = 6)]
public string Password { get; set; }
/// <summary>
/// 租户姓名
/// </summary>
public string TenantName { get; set; }
/// <summary>
/// 租户邮箱
/// </summary>
[EmailAddress]
public string TenantEMail { get; set; }
/// <summary>
/// 客户邮箱
/// </summary>
[EmailAddress]
public string CustomerEMail { get; set; }
/// <summary>
/// 电话号码
/// </summary>
[Phone]
public string PhoneNumber { get; set; }
}
......
......@@ -16,6 +16,9 @@ using Microsoft.EntityFrameworkCore.ChangeTracking;
namespace IoTSharp.Controllers
{
/// <summary>
/// 租户管理
/// </summary>
[Route("api/[controller]")]
[Authorize]
[ApiController]
......@@ -39,7 +42,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Only for SystemAdmin
/// 系统管理员用来获取全部租户列表
/// </summary>
/// <returns></returns>
[Authorize(Roles = nameof(UserRole.SystemAdmin))]
......@@ -60,7 +63,7 @@ namespace IoTSharp.Controllers
}
/// <summary>
/// Normal user can use
/// 普通用户用于活的自身的租户信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
......@@ -78,9 +81,13 @@ namespace IoTSharp.Controllers
}
return tenant;
}
/// <summary>
/// 修改指定的租户信息, 仅限租户管理员
/// </summary>
/// <param name="id"></param>
/// <param name="tenant"></param>
/// <returns></returns>
[Authorize(Roles = nameof(UserRole.TenantAdmin))]
// PUT: api/Tenants/5
[HttpPut("{id}")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
......@@ -117,7 +124,11 @@ namespace IoTSharp.Controllers
return NoContent();
}
/// <summary>
/// 新增租户, 仅限系统管理员
/// </summary>
/// <param name="tenant"></param>
/// <returns></returns>
[Authorize(Roles = nameof(UserRole.SystemAdmin))]
// POST: api/Tenants
[HttpPost]
......@@ -138,7 +149,11 @@ namespace IoTSharp.Controllers
return BadRequest(new ApiResult<Tenant>(ApiCode.Exception, ex.Message, tenant));
}
}
/// <summary>
/// 删除租户,仅限系统用户
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[Authorize(Roles = nameof(UserRole.SystemAdmin))]
// DELETE: api/Tenants/5
[HttpDelete("{id}")]
......
......@@ -8,9 +8,14 @@ namespace IoTSharp.Data
{
public class DeviceIdentity
{
/// <summary>
/// 认证方式ID
/// </summary>
[Key]
public Guid Id { get; set; }
/// <summary>
/// 认证方式类型
/// </summary>
[Required]
[EnumDataType(typeof(IdentityType))]
public IdentityType IdentityType { get; set; }
......
......@@ -9,38 +9,78 @@ namespace IoTSharp.Dtos
{
public class TokenEntity
{
/// <summary>
/// token
/// </summary>
public string access_token { get; set; }
/// <summary>
/// 过期时间
/// </summary>
public int expires_in { get; set; }
}
public class LoginResult
{
/// <summary>
/// 登录结果
/// </summary>
public ApiCode Code { get; set; }
/// <summary>
/// 用户名
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 登录结果
/// </summary>
public Microsoft.AspNetCore.Identity.SignInResult SignIn { get; set; }
/// <summary>
/// 是否成功
/// </summary>
public bool Succeeded { get; set; }
/// <summary>
/// Token
/// </summary>
public TokenEntity Token { get; set; }
/// <summary>
/// 用户所具备权限
/// </summary>
public IList<string> Roles { get; set; }
}
public class LoginDto
{
/// <summary>
/// 密码
/// </summary>
[Required]
public string Password { get; set; }
/// <summary>
/// 用户名
/// </summary>
[Required]
public string UserName { get; set; }
}
public class RegisterDto
{
/// <summary>
/// 邮箱地址, 也是用户名
/// </summary>
[Required]
public string Email { get; set; }
/// <summary>
/// 电话号码
/// </summary>
[Required]
public string PhoneNumber { get; set; }
/// <summary>
/// 用户隶属客户ID
/// </summary>
[Required]
public Guid CustomerId { get; set; }
/// <summary>
/// 用户名密码
/// </summary>
[Required]
[StringLength(100, ErrorMessage = "PASSWORD_MIN_LENGTH", MinimumLength = 6)]
public string Password { get; set; }
......
......@@ -88,6 +88,10 @@
<None Remove=".gitignore" />
<None Remove="healthchecksdb" />
<None Remove="healthchecksdb-shm" />
<None Remove="IoTSharp.xml" />
<Content Include="IoTSharp.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="..\docs\images\200x200.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
......
......@@ -53,52 +53,147 @@
<param name="_context"></param>
<param name="device"></param>
</member>
<member name="T:IoTSharp.Controllers.AccountController">
<summary>
用户管理
</summary>
</member>
<member name="M:IoTSharp.Controllers.AccountController.MyInfo">
<summary>
获取当前登录用户信息
</summary>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.AccountController.Login(IoTSharp.Dtos.LoginDto)">
<summary>
登录用户
</summary>
<param name="model"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.AccountController.Logout">
<summary>
退出账号
</summary>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.AccountController.Register(IoTSharp.Dtos.RegisterDto)">
<summary>
Register a user
注册用户
</summary>
<param name="model"></param>
<returns ></returns>
<returns >返回登录结果</returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetDevices(System.Guid)">
<member name="M:IoTSharp.Controllers.AccountController.All(System.Guid)">
<summary>
Get all of the customer's devices.
返回客户所属用户列表
</summary>
<param name="customerId"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetIdentity(System.Guid)">
<member name="T:IoTSharp.Controllers.AuthorizedKeysController">
<summary>
Get a device's credentials
全局设备认证KEY管理
</summary>
</member>
<member name="M:IoTSharp.Controllers.AuthorizedKeysController.GetAuthorizedKeys">
<summary>
获取当前已登录用户所属客户的全局认证KEY
</summary>
<param name="deviceId"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetAttributeLatest(System.Guid)">
<member name="M:IoTSharp.Controllers.AuthorizedKeysController.GetAuthorizedKey(System.Guid)">
<summary>
Request attribute values from the server
根据ID获取KEY
</summary>
<param name="deviceId"></param>
<param name="id"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetTelemetryLatest(System.Guid)">
<member name="T:IoTSharp.Controllers.CustomersController">
<summary>
客户管理
</summary>
</member>
<member name="M:IoTSharp.Controllers.CustomersController.GetCustomers(System.Guid)">
<summary>
获取指定租户下的所有客户
</summary>
<param name="tenantId">租户</param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.CustomersController.GetCustomer(System.Guid)">
<summary>
返回指定id的客户
</summary>
<param name="id"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.CustomersController.PutCustomer(System.Guid,IoTSharp.Dtos.CustomerDto)">
<summary>
Request telemetry values from the server
修改指定租户为 指定的信息
</summary>
<param name="id"></param>
<param name="customer"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.CustomersController.PostCustomer(IoTSharp.Dtos.CustomerDto)">
<summary>
为当前客户所在的租户新增客户
</summary>
<param name="customer"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.CustomersController.DeleteCustomer(System.Guid)">
<summary>
删除指定的客户ID
</summary>
<param name="id"></param>
<returns></returns>
</member>
<member name="T:IoTSharp.Controllers.DevicesController">
<summary>
设备管理
</summary>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetDevices(System.Guid)">
<summary>
获取指定客户的设备列表
</summary>
<param name="customerId"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetIdentity(System.Guid)">
<summary>
获取指定设备的认证方式信息
</summary>
<param name="deviceId"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetAttributeLatest(System.Guid)">
<summary>
获取指定设备的最新属性
</summary>
<param name="deviceId"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetTelemetryLatest(System.Guid)">
<summary>
获取指定设备的最新遥测数据
</summary>
<param name="deviceId"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetTelemetryLatest(System.Guid,System.String)">
<summary>
Request telemetry values from the server
获取指定设备的指定key 的遥测数据
</summary>
<param name="deviceId">Which device do you read?</param>
<param name="keys">Specify key name list , use , or space or ; to split </param>
<param name="keys">指定键值列表, 使用分号或者逗号分割 。 </param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetAttributeLatest(System.Guid,System.String)">
<summary>
Request telemetry values from the server
获取指定设备指定keys的最新属性
</summary>
<param name="deviceId">Which device do you read?</param>
<param name="keys">Specify key name list , use , or space or ; to split </param>
......@@ -106,16 +201,16 @@
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetTelemetryData(System.Guid,System.String,System.DateTime)">
<summary>
Request telemetry values from the server
获取指定设备和指定时间, 指定key的数据
</summary>
<param name="deviceId">Which device do you read?</param>
<param name="keys">Specify key name list , use , or space or ; to split </param>
<param name="begin">For example: 2019-06-06 12:24</param>
<param name="begin">开始以时间, 比如 2019-06-06 12:24</param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetTelemetryData(System.Guid,System.String,System.DateTime,System.DateTime)">
<summary>
Request telemetry values from the server
返回指定设备的的遥测数据, 按照keyname 和指定时间范围获取,如果keyname 为 all , 则返回全部key 的数据
</summary>
<param name="deviceId">Which device do you read?</param>
<param name="keys">Specify key name list , use , or space or ; to split </param>
......@@ -125,14 +220,14 @@
</member>
<member name="M:IoTSharp.Controllers.DevicesController.GetDevice(System.Guid)">
<summary>
Get a device's detail
获取设备详情
</summary>
<param name="id"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.PutDevice(System.Guid,IoTSharp.Dtos.DevicePutDto)">
<summary>
Modify a device
修改设备
</summary>
<param name="id"></param>
<param name="device"></param>
......@@ -140,14 +235,21 @@
</member>
<member name="M:IoTSharp.Controllers.DevicesController.PostDevice(IoTSharp.Dtos.DevicePostDto)">
<summary>
Create a new device
创建设备, 客户ID和租户ID均为当前登录用户所属
</summary>
<param name="device"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.DeleteDevice(System.Guid)">
<summary>
删除设备
</summary>
<param name="id"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.DevicesController.Rpc(System.String,System.String,System.Int32,System.Object)">
<summary>
Device rpc
远程控制指定设备, 此方法通过给远程设备发送mqtt消息进行控制,设备在收到信息后回复结果,此方法才算调用结束
</summary>
<param name="access_token"></param>
<param name="method"></param>
......@@ -157,7 +259,7 @@
</member>
<member name="M:IoTSharp.Controllers.DevicesController.Telemetry(System.String,System.Collections.Generic.Dictionary{System.String,System.Object})">
<summary>
Upload device telemetry to the server.
HTTP方式上传遥测数据
</summary>
<param name="access_token">Device 's access token</param>
<param name="telemetrys"></param>
......@@ -165,7 +267,7 @@
</member>
<member name="M:IoTSharp.Controllers.DevicesController.Attributes(System.String,IoTSharp.Data.DataSide,System.String)">
<summary>
Get service-side device attributes from the server.
获取服务测的设备熟悉
</summary>
<param name="access_token">Device 's access token </param>
<param name="dataSide">Specifying data side.</param>
......@@ -174,25 +276,118 @@
</member>
<member name="M:IoTSharp.Controllers.DevicesController.Attributes(System.String,System.Collections.Generic.Dictionary{System.String,System.Object})">
<summary>
Upload client-side device attributes to the server.
上传客户侧属性数据
</summary>
<param name="access_token">Device 's access token </param>
<param name="attributes">attributes</param>
<returns></returns>
</member>
<member name="T:IoTSharp.Controllers.InstallerController">
<summary>
安装
</summary>
</member>
<member name="M:IoTSharp.Controllers.InstallerController.Instance">
<summary>
检查IoTSharp实例信息
</summary>
<returns></returns>
</member>
<member name="P:IoTSharp.Controllers.InstallerController.InstanceDto.Version">
<summary>
系统版本
</summary>
</member>
<member name="P:IoTSharp.Controllers.InstallerController.InstanceDto.Installed">
<summary>
是否被安装
</summary>
</member>
<member name="P:IoTSharp.Controllers.InstallerController.InstallDto.Email">
<summary>
系统管理员用户名
</summary>
</member>
<member name="P:IoTSharp.Controllers.InstallerController.InstallDto.CustomerName">
<summary>
客户名称
</summary>
</member>
<member name="P:IoTSharp.Controllers.InstallerController.InstallDto.Password">
<summary>
系统管理员密码
</summary>
</member>
<member name="P:IoTSharp.Controllers.InstallerController.InstallDto.TenantName">
<summary>
租户姓名
</summary>
</member>
<member name="P:IoTSharp.Controllers.InstallerController.InstallDto.TenantEMail">
<summary>
租户邮箱
</summary>
</member>
<member name="P:IoTSharp.Controllers.InstallerController.InstallDto.CustomerEMail">
<summary>
客户邮箱
</summary>
</member>
<member name="P:IoTSharp.Controllers.InstallerController.InstallDto.PhoneNumber">
<summary>
电话号码
</summary>
</member>
<member name="T:IoTSharp.Controllers.TenantsController">
<summary>
租户管理
</summary>
</member>
<member name="M:IoTSharp.Controllers.TenantsController.GetTenant">
<summary>
Only for SystemAdmin
系统管理员用来获取全部租户列表
</summary>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.TenantsController.GetTenant(System.Guid)">
<summary>
Normal user can use
普通用户用于活的自身的租户信息
</summary>
<param name="id"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.TenantsController.PutTenant(System.Guid,IoTSharp.Data.Tenant)">
<summary>
修改指定的租户信息, 仅限租户管理员
</summary>
<param name="id"></param>
<param name="tenant"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.TenantsController.PostTenant(IoTSharp.Data.Tenant)">
<summary>
新增租户, 仅限系统管理员
</summary>
<param name="tenant"></param>
<returns></returns>
</member>
<member name="M:IoTSharp.Controllers.TenantsController.DeleteTenant(System.Guid)">
<summary>
删除租户,仅限系统用户
</summary>
<param name="id"></param>
<returns></returns>
</member>
<member name="P:IoTSharp.Data.DeviceIdentity.Id">
<summary>
认证方式ID
</summary>
</member>
<member name="P:IoTSharp.Data.DeviceIdentity.IdentityType">
<summary>
认证方式类型
</summary>
</member>
<member name="P:IoTSharp.Data.DeviceIdentity.IdentityId">
<summary>
When <see cref="P:IoTSharp.Data.DeviceIdentity.IdentityType"/> Is <see cref="F:IoTSharp.Data.IdentityType.AccessToken"/> ,this is a Token.
......@@ -207,6 +402,76 @@
When <see cref="P:IoTSharp.Data.DeviceIdentity.IdentityType"/> Is <see cref="F:IoTSharp.Data.IdentityType.X509Certificate"/> ,this is X509 Certificate' PEM.
</summary>
</member>
<member name="P:IoTSharp.Dtos.TokenEntity.access_token">
<summary>
token
</summary>
</member>
<member name="P:IoTSharp.Dtos.TokenEntity.expires_in">
<summary>
过期时间
</summary>
</member>
<member name="P:IoTSharp.Dtos.LoginResult.Code">
<summary>
登录结果
</summary>
</member>
<member name="P:IoTSharp.Dtos.LoginResult.UserName">
<summary>
用户名
</summary>
</member>
<member name="P:IoTSharp.Dtos.LoginResult.SignIn">
<summary>
登录结果
</summary>
</member>
<member name="P:IoTSharp.Dtos.LoginResult.Succeeded">
<summary>
是否成功
</summary>
</member>
<member name="P:IoTSharp.Dtos.LoginResult.Token">
<summary>
Token
</summary>
</member>
<member name="P:IoTSharp.Dtos.LoginResult.Roles">
<summary>
用户所具备权限
</summary>
</member>
<member name="P:IoTSharp.Dtos.LoginDto.Password">
<summary>
密码
</summary>
</member>
<member name="P:IoTSharp.Dtos.LoginDto.UserName">
<summary>
用户名
</summary>
</member>
<member name="P:IoTSharp.Dtos.RegisterDto.Email">
<summary>
邮箱地址, 也是用户名
</summary>
</member>
<member name="P:IoTSharp.Dtos.RegisterDto.PhoneNumber">
<summary>
电话号码
</summary>
</member>
<member name="P:IoTSharp.Dtos.RegisterDto.CustomerId">
<summary>
用户隶属客户ID
</summary>
</member>
<member name="P:IoTSharp.Dtos.RegisterDto.Password">
<summary>
用户名密码
</summary>
</member>
<member name="T:IoTSharp.Properties.Resources">
<summary>
一个强类型的资源类,用于查找本地化的字符串等。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册