client/docs/cloud/private.md

6.4 KiB

Private

隐私数据服务

/cloud.Private/CreatePrivateData

创建隐私数据

Request

{
    cloud_id: "0", // type<uint64>
    cloud_identity: "", // type<string>
    data_type: "", // type<string>, 数据类型: password, card, document, etc.
    title: "", // type<string>, 标题
    description: "", // type<string>, 描述
    data: "", // type<string>, 加密存储的实际数据
    is_encrypted: false, // type<bool>, 是否已加密
    tags: "", // type<string>, 标签
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Private/GetPrivateData

获取隐私数据详情

Request

{
    id: "0", // type<int64>, 唯一ID
    identity: "", // type<string>, 唯一码
}

Reply

{
    id: "0", // type<uint64>
    identity: "", // type<string>
    data_type: "", // type<string>, 数据类型: password, card, document, etc.
    title: "", // type<string>, 标题
    description: "", // type<string>, 描述
    data: "", // type<string>, 加密存储的实际数据
    is_encrypted: false, // type<bool>, 是否已加密
    tags: "", // type<string>, 标签
    created_at: "", // type<string>
    updated_at: "", // type<string>
}

/cloud.Private/UpdatePrivateData

更新隐私数据

Request

{
    id: "0", // type<uint64>
    identity: "", // type<string>
    data_type: "", // type<string>, 数据类型: password, card, document, etc.
    title: "", // type<string>, 标题
    description: "", // type<string>, 描述
    data: "", // type<string>, 加密存储的实际数据
    is_encrypted: false, // type<bool>, 是否已加密
    tags: "", // type<string>, 标签
    created_at: "", // type<string>
    updated_at: "", // type<string>
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Private/DeletePrivateData

删除隐私数据

Request

{
    id: "0", // type<int64>, 唯一ID
    identity: "", // type<string>, 唯一码
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Private/ListPrivateData

获取隐私数据列表

Request

{
    page_no: "0", // type<int64>, 页数
    page_size: "0", // type<int64>, 每页记录数
    params: {
        "": ""
    }, // map<string,string>, 条件参数,key=val,eg key:category_id=?,vlaue=11 
}

Reply

{
    data: [{
        id: "0", // type<uint64>
        identity: "", // type<string>
        data_type: "", // type<string>, 数据类型: password, card, document, etc.
        title: "", // type<string>, 标题
        description: "", // type<string>, 描述
        data: "", // type<string>, 加密存储的实际数据
        is_encrypted: false, // type<bool>, 是否已加密
        tags: "", // type<string>, 标签
        created_at: "", // type<string>
        updated_at: "", // type<string>
    }], // list<CloudPrivateItem>
    total: "0", // type<int64>
}

/cloud.Private/GetPrivateDataByType

按类型获取隐私数据

Request

{
    page_no: "0", // type<int64>, 页数
    page_size: "0", // type<int64>, 每页记录数
    params: {
        "": ""
    }, // map<string,string>, 条件参数,key=val,eg key:category_id=?,vlaue=11 
}

Reply

{
    data: [{
        id: "0", // type<uint64>
        identity: "", // type<string>
        data_type: "", // type<string>, 数据类型: password, card, document, etc.
        title: "", // type<string>, 标题
        description: "", // type<string>, 描述
        data: "", // type<string>, 加密存储的实际数据
        is_encrypted: false, // type<bool>, 是否已加密
        tags: "", // type<string>, 标签
        created_at: "", // type<string>
        updated_at: "", // type<string>
    }], // list<CloudPrivateItem>
    total: "0", // type<int64>
}

/cloud.Private/SearchPrivateData

搜索隐私数据

Request

{
    page_no: "0", // type<int64>, 页数
    page_size: "0", // type<int64>, 每页记录数
    params: {
        "": ""
    }, // map<string,string>, 条件参数,key=val,eg key:category_id=?,vlaue=11 
}

Reply

{
    data: [{
        id: "0", // type<uint64>
        identity: "", // type<string>
        data_type: "", // type<string>, 数据类型: password, card, document, etc.
        title: "", // type<string>, 标题
        description: "", // type<string>, 描述
        data: "", // type<string>, 加密存储的实际数据
        is_encrypted: false, // type<bool>, 是否已加密
        tags: "", // type<string>, 标签
        created_at: "", // type<string>
        updated_at: "", // type<string>
    }], // list<CloudPrivateItem>
    total: "0", // type<int64>
}

/cloud.Private/EncryptData

加密数据

Request

{
    data: "", // type<string>, 数据
    key: "", // type<string>, 密钥KEY
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Private/DecryptData

解密数据

Request

{
    data: "", // type<string>, 数据
    key: "", // type<string>, 密钥KEY
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}