Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!
Open sidebar
contracts
standard
Commits
3d2bdaa9
Commit
3d2bdaa9
authored
2 years ago
by
taifu yuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update desc for CMEVI
--story=0
parent
49091bb1
master
develop
v1.0.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
30 deletions
+31
-30
draft/CM-CS-221221-Evidence.md
draft/CM-CS-221221-Evidence.md
+31
-30
No files found.
draft/CM-CS-221221-Evidence.md
View file @
3d2bdaa9
...
...
@@ -31,38 +31,38 @@
**结构体**
```
go
// Metadata 可选信息建议字段
type
Metadata
struct
{
// HashType 哈希的类型,文字、文件、视频、音频等
HashType
string
`json: hashType`
// HashAlgorithm 哈希算法,sha256、sm3等
HashAlgorithm
string
`json: hashAlgorithm`
// Username 存证人,用于标注存证的身份
Username
string
`json: username`
// Timestamp 可信存证时间
Timestamp
string
`json: timestamp`
// ProveTimestamp 可信存证时间证明
ProveTimestamp
string
`json: proveTimestamp`
// 其他自定义扩展字段
...
// Metadata 可选信息建议字段
,若包含以下相关信息存证,请采用以下字段
type
Metadata
struct
{
// HashType 哈希的类型,文字、文件、视频、音频等
HashType
string
`json: hashType`
// HashAlgorithm 哈希算法,sha256、sm3等
HashAlgorithm
string
`json: hashAlgorithm`
// Username 存证人,用于标注存证的身份
Username
string
`json: username`
// Timestamp 可信存证时间
Timestamp
string
`json: timestamp`
// ProveTimestamp 可信存证时间证明
ProveTimestamp
string
`json: proveTimestamp`
// 其他自定义扩展字段
//
...
}
// ResultData 查询返回建议的信息
type
ResultData
struct
{
// Id evidence入参流水号
Id
string
`json:id`
// Hash evidence入参哈希值
Hash
string
`json:hash`
// Blockheight 存证时区块高度
Blockheight
uint
`json:blockheight`
// TxId 存证时交易ID
TxId
string
`json:txId`
// Timestamp 存证时区块时间
Timestamp
`json:timestamp`
// Metadata evidence入参Metadata信息
Metadata
Metadata
`json:metadata`
// 其他自定义扩展字段
...
type
ResultData
struct
{
// Id evidence入参流水号
Id
string
`json:id`
// Hash evidence入参哈希值
Hash
string
`json:hash`
// Blockheight 存证时区块高度
Blockheight
uint
`json:blockheight`
// TxId 存证时交易ID
TxId
string
`json:txId`
// Timestamp 存证时区块时间
Timestamp
string
`json:timestamp`
// Metadata evidence入参Metadata信息
Metadata
Metadata
`json:metadata`
// 其他自定义扩展字段
//
...
}
```
...
...
@@ -112,7 +112,7 @@ findByHash(hash string) (ResultData, error)
// @param id 必填,流水号
// @return string 上链时传入的evidence信息
// @return error 返回错误信息
findBy
Hash
(
id
string
)
(
ResultData
,
error
)
findBy
Id
(
id
string
)
(
ResultData
,
error
)
```
### 可拓展方法介绍
...
...
@@ -125,6 +125,7 @@ findByHash(id string) (ResultData, error)
**结构体**
```
go
// Evidence 存证结构体
type
Evidence
struct
{
// Id 业务流水号
Id
string
`json: id`
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment