-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #367 from wancloud-cosmos/yunkun
R4R: Design changed : Query record meta data from abci db
- Loading branch information
Showing
6 changed files
with
96 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package gov | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/irisnet/irishub/client/context" | ||
"github.com/irisnet/irishub/modules/record" | ||
) | ||
|
||
type RecordOutput struct { | ||
Filename string `json:"Filename"` // Filename of the File | ||
Filepath string `json:"Filepath"` // full path of the File | ||
Description string `json:"Description"` // Description of the File | ||
SubmitTime int64 `json:"SubmitTime"` // File submit unix timestamp | ||
OwnerAddress sdk.AccAddress `json:"OwnerAddress"` // Address of the owner | ||
DataHash string `json:"DataHash"` // ipfs hash of file | ||
DataSize int64 `json:"DataSize"` // File Size in bytes | ||
//PinedNode string `json:"PinedNode"` //pined node of ipfs | ||
} | ||
|
||
func ConvertRecordToRecordOutput(cliCtx context.CLIContext, r record.MsgSubmitFile) (RecordOutput, error) { | ||
|
||
// TODO : Currently we only copy values from record msg, we can call related methods later | ||
recordOutput := RecordOutput{ | ||
Filename: r.Filename, | ||
Filepath: r.Filepath, | ||
Description: r.Description, | ||
SubmitTime: r.SubmitTime, | ||
OwnerAddress: r.OwnerAddress, | ||
DataHash: r.DataHash, | ||
DataSize: r.DataSize, | ||
} | ||
|
||
return recordOutput, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters