record

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "record"
)

Variables

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthRecord        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRecord          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRecord = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func GetRecordKey added in v1.1.0

func GetRecordKey(recordID []byte) []byte

GetRecordKey returns record key bytes

func RegisterInterfaces added in v1.1.0

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterQueryServer added in v1.1.0

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type Content

type Content struct {
	Digest     string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
	DigestAlgo string `protobuf:"bytes,2,opt,name=digest_algo,json=digestAlgo,proto3" json:"digest_algo,omitempty" yaml:"digest_algo"`
	URI        string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"`
	Meta       string `protobuf:"bytes,4,opt,name=meta,proto3" json:"meta,omitempty"`
}

Content defines the detailed information for a record.

func (*Content) Descriptor

func (*Content) Descriptor() ([]byte, []int)

func (*Content) Equal

func (this *Content) Equal(that interface{}) bool

func (*Content) Marshal

func (m *Content) Marshal() (dAtA []byte, err error)

func (*Content) MarshalTo

func (m *Content) MarshalTo(dAtA []byte) (int, error)

func (*Content) MarshalToSizedBuffer

func (m *Content) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Content) ProtoMessage

func (*Content) ProtoMessage()

func (*Content) Reset

func (m *Content) Reset()

func (*Content) Size

func (m *Content) Size() (n int)

func (*Content) String

func (m *Content) String() string

func (*Content) Unmarshal

func (m *Content) Unmarshal(dAtA []byte) error

func (*Content) XXX_DiscardUnknown

func (m *Content) XXX_DiscardUnknown()

func (*Content) XXX_Marshal

func (m *Content) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Content) XXX_Merge

func (m *Content) XXX_Merge(src proto.Message)

func (*Content) XXX_Size

func (m *Content) XXX_Size() int

func (*Content) XXX_Unmarshal

func (m *Content) XXX_Unmarshal(b []byte) error

type CreateRecordRequest

type CreateRecordRequest struct {
	Contents []Content
}

type Data added in v1.1.0

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

type MsgCreateRecord

type MsgCreateRecord struct {
	Contents []Content                                          `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents"`
	Creator  github_com_bianjieai_irita_sdk_go_types.AccAddress `` /* 127-byte string literal not displayed */
}

MsgCreateValidator defines an SDK message for creating a new validator.

func (*MsgCreateRecord) Descriptor

func (*MsgCreateRecord) Descriptor() ([]byte, []int)

func (*MsgCreateRecord) Equal

func (this *MsgCreateRecord) Equal(that interface{}) bool

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) Marshal

func (m *MsgCreateRecord) Marshal() (dAtA []byte, err error)

func (*MsgCreateRecord) MarshalTo

func (m *MsgCreateRecord) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateRecord) MarshalToSizedBuffer

func (m *MsgCreateRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateRecord) ProtoMessage

func (*MsgCreateRecord) ProtoMessage()

func (*MsgCreateRecord) Reset

func (m *MsgCreateRecord) Reset()

func (MsgCreateRecord) Route

func (msg MsgCreateRecord) Route() string

Route implements Msg.

func (*MsgCreateRecord) Size

func (m *MsgCreateRecord) Size() (n int)

func (*MsgCreateRecord) String

func (m *MsgCreateRecord) String() string

func (MsgCreateRecord) Type

func (msg MsgCreateRecord) Type() string

Type implements Msg.

func (*MsgCreateRecord) Unmarshal

func (m *MsgCreateRecord) Unmarshal(dAtA []byte) error

func (MsgCreateRecord) ValidateBasic

func (msg MsgCreateRecord) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgCreateRecord) XXX_DiscardUnknown

func (m *MsgCreateRecord) XXX_DiscardUnknown()

func (*MsgCreateRecord) XXX_Marshal

func (m *MsgCreateRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateRecord) XXX_Merge

func (m *MsgCreateRecord) XXX_Merge(src proto.Message)

func (*MsgCreateRecord) XXX_Size

func (m *MsgCreateRecord) XXX_Size() int

func (*MsgCreateRecord) XXX_Unmarshal

func (m *MsgCreateRecord) XXX_Unmarshal(b []byte) error

type QueryClient added in v1.1.0

type QueryClient interface {
	// Record queries the record by the given record ID
	Record(ctx context.Context, in *QueryRecordRequest, opts ...grpc.CallOption) (*QueryRecordResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient added in v1.1.0

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryRecordReq added in v1.1.0

type QueryRecordReq struct {
	RecordID string `json:"record_id"`
	Prove    bool   `json:"prove"`
	Height   int64  `json:"height"`
}

type QueryRecordRequest added in v1.1.0

type QueryRecordRequest struct {
	RecordId []byte `protobuf:"bytes,1,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty"`
}

QueryRecordRequest is the request type for the Query/Record RPC method

func (*QueryRecordRequest) Descriptor added in v1.1.0

func (*QueryRecordRequest) Descriptor() ([]byte, []int)

func (*QueryRecordRequest) GetRecordId added in v1.1.0

func (m *QueryRecordRequest) GetRecordId() []byte

func (*QueryRecordRequest) Marshal added in v1.1.0

func (m *QueryRecordRequest) Marshal() (dAtA []byte, err error)

func (*QueryRecordRequest) MarshalTo added in v1.1.0

func (m *QueryRecordRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryRecordRequest) MarshalToSizedBuffer added in v1.1.0

func (m *QueryRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRecordRequest) ProtoMessage added in v1.1.0

func (*QueryRecordRequest) ProtoMessage()

func (*QueryRecordRequest) Reset added in v1.1.0

func (m *QueryRecordRequest) Reset()

func (*QueryRecordRequest) Size added in v1.1.0

func (m *QueryRecordRequest) Size() (n int)

func (*QueryRecordRequest) String added in v1.1.0

func (m *QueryRecordRequest) String() string

func (*QueryRecordRequest) Unmarshal added in v1.1.0

func (m *QueryRecordRequest) Unmarshal(dAtA []byte) error

func (*QueryRecordRequest) XXX_DiscardUnknown added in v1.1.0

func (m *QueryRecordRequest) XXX_DiscardUnknown()

func (*QueryRecordRequest) XXX_Marshal added in v1.1.0

func (m *QueryRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRecordRequest) XXX_Merge added in v1.1.0

func (m *QueryRecordRequest) XXX_Merge(src proto.Message)

func (*QueryRecordRequest) XXX_Size added in v1.1.0

func (m *QueryRecordRequest) XXX_Size() int

func (*QueryRecordRequest) XXX_Unmarshal added in v1.1.0

func (m *QueryRecordRequest) XXX_Unmarshal(b []byte) error

type QueryRecordResp added in v1.1.0

type QueryRecordResp struct {
	Record Data           `json:"record"`
	Proof  sdk.ProofValue `json:"proof"`
	Height int64          `json:"height"`
}

type QueryRecordResponse

type QueryRecordResponse struct {
	Record *Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
}

QueryRecordResponse is the response type for the Query/Record RPC method

func (*QueryRecordResponse) Descriptor added in v1.1.0

func (*QueryRecordResponse) Descriptor() ([]byte, []int)

func (*QueryRecordResponse) GetRecord added in v1.1.0

func (m *QueryRecordResponse) GetRecord() *Record

func (*QueryRecordResponse) Marshal added in v1.1.0

func (m *QueryRecordResponse) Marshal() (dAtA []byte, err error)

func (*QueryRecordResponse) MarshalTo added in v1.1.0

func (m *QueryRecordResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryRecordResponse) MarshalToSizedBuffer added in v1.1.0

func (m *QueryRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRecordResponse) ProtoMessage added in v1.1.0

func (*QueryRecordResponse) ProtoMessage()

func (*QueryRecordResponse) Reset added in v1.1.0

func (m *QueryRecordResponse) Reset()

func (*QueryRecordResponse) Size added in v1.1.0

func (m *QueryRecordResponse) Size() (n int)

func (*QueryRecordResponse) String added in v1.1.0

func (m *QueryRecordResponse) String() string

func (*QueryRecordResponse) Unmarshal added in v1.1.0

func (m *QueryRecordResponse) Unmarshal(dAtA []byte) error

func (*QueryRecordResponse) XXX_DiscardUnknown added in v1.1.0

func (m *QueryRecordResponse) XXX_DiscardUnknown()

func (*QueryRecordResponse) XXX_Marshal added in v1.1.0

func (m *QueryRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRecordResponse) XXX_Merge added in v1.1.0

func (m *QueryRecordResponse) XXX_Merge(src proto.Message)

func (*QueryRecordResponse) XXX_Size added in v1.1.0

func (m *QueryRecordResponse) XXX_Size() int

func (*QueryRecordResponse) XXX_Unmarshal added in v1.1.0

func (m *QueryRecordResponse) XXX_Unmarshal(b []byte) error

type QueryServer added in v1.1.0

type QueryServer interface {
	// Record queries the record by the given record ID
	Record(context.Context, *QueryRecordRequest) (*QueryRecordResponse, error)
}

QueryServer is the server API for Query service.

type Record

type Record struct {
	TxHash   github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 156-byte string literal not displayed */
	Contents []Content                                            `protobuf:"bytes,2,rep,name=contents,proto3" json:"contents"`
	Creator  github_com_bianjieai_irita_sdk_go_types.AccAddress   `` /* 127-byte string literal not displayed */
}

func (Record) Convert

func (this Record) Convert() interface{}

func (*Record) Descriptor

func (*Record) Descriptor() ([]byte, []int)

func (*Record) Equal

func (this *Record) Equal(that interface{}) bool

func (*Record) Marshal

func (m *Record) Marshal() (dAtA []byte, err error)

func (*Record) MarshalTo

func (m *Record) MarshalTo(dAtA []byte) (int, error)

func (*Record) MarshalToSizedBuffer

func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) Reset

func (m *Record) Reset()

func (*Record) Size

func (m *Record) Size() (n int)

func (*Record) String

func (m *Record) String() string

func (*Record) Unmarshal

func (m *Record) Unmarshal(dAtA []byte) error

func (*Record) XXX_DiscardUnknown

func (m *Record) XXX_DiscardUnknown()

func (*Record) XXX_Marshal

func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Record) XXX_Merge

func (m *Record) XXX_Merge(src proto.Message)

func (*Record) XXX_Size

func (m *Record) XXX_Size() int

func (*Record) XXX_Unmarshal

func (m *Record) XXX_Unmarshal(b []byte) error

type RecordI

type RecordI interface {
	sdk.Module

	CreateRecord(request CreateRecordRequest, baseTx sdk.BaseTx) (string, sdk.Error)
	QueryRecord(request QueryRecordReq) (QueryRecordResp, sdk.Error)
}

expose Record module api for user

func NewClient

func NewClient(bc sdk.BaseClient, cdc codec.Marshaler) RecordI

type UnimplementedQueryServer added in v1.1.0

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Record added in v1.1.0

Jump to

Keyboard shortcuts

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