record

package
v0.0.0-...-581f9f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "record"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	Digest     string `json:"digest"`
	DigestAlgo string `json:"digest_algo"`
	URI        string `json:"uri"`
	Meta       string `json:"meta"`
}

Content represents a sub-record

type MsgCreateRecord

type MsgCreateRecord struct {
	Contents []Content
	Creator  sdk.AccAddress // the creator of the record
}

MsgCreateRecord - struct for create a record

func (MsgCreateRecord) GetSignBytes

func (msg MsgCreateRecord) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgCreateRecord) GetSigners

func (msg MsgCreateRecord) GetSigners() []sdk.AccAddress

GetSigners implements Msg.

func (MsgCreateRecord) Route

func (msg MsgCreateRecord) Route() string

Route implements Msg.

func (MsgCreateRecord) Type

func (msg MsgCreateRecord) Type() string

Type implements Msg.

func (MsgCreateRecord) ValidateBasic

func (msg MsgCreateRecord) ValidateBasic() error

ValidateBasic implements Msg.

type Record

type Record interface {
	CreateRecord(request RecordCreateRequest, baseTx sdk.BaseTx) (string, sdk.Error)
	QueryRecord(recordID string) (RecordInfo, sdk.Error)
}

expose Record module api for user

func NewClient

func NewClient(bc sdk.BaseClient) Record

type RecordCreateRequest

type RecordCreateRequest struct {
	Contents []Content
}

type RecordInfo

type RecordInfo struct {
	TxHash   string    `json:"tx_hash" yaml:"tx_hash"`
	Contents []Content `json:"contents" yaml:"contents"`
	Creator  string    `json:"creator" yaml:"creator"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL