Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goshimmer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iota-imt
goshimmer
Commits
bfdb8af5
Unverified
Commit
bfdb8af5
authored
4 years ago
by
Levente Pap
Browse files
Options
Downloads
Patches
Plain Diff
WebAPI handles strong/weak parents
parent
987c6802
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/webapi/message/findById.go
+11
-12
11 additions, 12 deletions
plugins/webapi/message/findById.go
with
11 additions
and
12 deletions
plugins/webapi/message/findById.go
+
11
−
12
View file @
bfdb8af5
...
@@ -46,10 +46,9 @@ func findByIDHandler(c echo.Context) error {
...
@@ -46,10 +46,9 @@ func findByIDHandler(c echo.Context) error {
Solid
:
msgMetadata
.
IsSolid
(),
Solid
:
msgMetadata
.
IsSolid
(),
SolidificationTime
:
msgMetadata
.
SolidificationTime
()
.
Unix
(),
SolidificationTime
:
msgMetadata
.
SolidificationTime
()
.
Unix
(),
},
},
ID
:
msg
.
ID
()
.
String
(),
ID
:
msg
.
ID
()
.
String
(),
//TODO: adjust
StrongParents
:
msg
.
StrongParents
()
.
ToStrings
(),
//Parent1ID: msg.Parent1ID().String(),
WeakParents
:
msg
.
WeakParents
()
.
ToStrings
(),
//Parent2ID: msg.Parent2ID().String(),
IssuerPublicKey
:
msg
.
IssuerPublicKey
()
.
String
(),
IssuerPublicKey
:
msg
.
IssuerPublicKey
()
.
String
(),
IssuingTime
:
msg
.
IssuingTime
()
.
Unix
(),
IssuingTime
:
msg
.
IssuingTime
()
.
Unix
(),
SequenceNumber
:
msg
.
SequenceNumber
(),
SequenceNumber
:
msg
.
SequenceNumber
(),
...
@@ -79,14 +78,14 @@ type FindByIDRequest struct {
...
@@ -79,14 +78,14 @@ type FindByIDRequest struct {
// Message contains information about a given message.
// Message contains information about a given message.
type
Message
struct
{
type
Message
struct
{
Metadata
`json:"metadata,omitempty"`
Metadata
`json:"metadata,omitempty"`
ID
string
`json:"ID,omitempty"`
ID
string
`json:"ID,omitempty"`
Parent1ID
string
`json:"
p
arent
1Id
,omitempty"`
StrongParents
[]
string
`json:"
strongP
arent
s
,omitempty"`
Parent
2ID
string
`json:"
p
arent
2Id
,omitempty"`
Weak
Parent
s
[]
string
`json:"
weakP
arent
s
,omitempty"`
IssuerPublicKey
string
`json:"issuerPublicKey,omitempty"`
IssuerPublicKey
string
`json:"issuerPublicKey,omitempty"`
IssuingTime
int64
`json:"issuingTime,omitempty"`
IssuingTime
int64
`json:"issuingTime,omitempty"`
SequenceNumber
uint64
`json:"sequenceNumber,omitempty"`
SequenceNumber
uint64
`json:"sequenceNumber,omitempty"`
Payload
[]
byte
`json:"payload,omitempty"`
Payload
[]
byte
`json:"payload,omitempty"`
Signature
string
`json:"signature,omitempty"`
Signature
string
`json:"signature,omitempty"`
}
}
// Metadata contains metadata information of a message.
// Metadata contains metadata information of a message.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment