forked from hyperledger-archives/aries-framework-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
73 lines (63 loc) · 1.5 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package vdr
import (
"encoding/json"
vdrcommand "github.com/Universal-Health-Chain/aries-framework-go/pkg/controller/command/vdr"
didstore "github.com/Universal-Health-Chain/aries-framework-go/pkg/store/did"
)
// saveDIDReq model
//
// This is used to save the did with did document.
//
// swagger:parameters saveDIDReq
type saveDIDReq struct { // nolint: unused,deadcode
// Params for saving the did document (pass the did document as json raw message)
//
// in: body
Params vdrcommand.DIDArgs
}
// getDIDReq model
//
// This is used to retrieve the did document.
//
// swagger:parameters getDIDReq
type getDIDReq struct { // nolint: unused,deadcode
// DID ID - pass the did
//
// in: path
// required: true
ID string `json:"id"`
}
// resolveDIDReq model
//
// This is used to retrieve the did document.
//
// swagger:parameters resolveDIDReq
type resolveDIDReq struct { // nolint: unused,deadcode
// DID ID - pass the did
//
// in: path
// required: true
ID string `json:"id"`
}
// documentRes model
//
// This is used for returning query connection result for single record search
//
// swagger:response documentRes
type documentRes struct {
// in: body
DID json.RawMessage `json:"did,omitempty"`
}
// didRecordResult model
//
// This is used to return did records.
//
// swagger:response didRecordResult
type didRecordResult struct {
// in: body
Result []*didstore.Record `json:"result,omitempty"`
}