Documentation ¶
Index ¶
- Constants
- Variables
- func GetRecordKey(recordID []byte) []byte
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type Client
- type Content
- func (*Content) Descriptor() ([]byte, []int)
- func (this *Content) Equal(that interface{}) bool
- func (m *Content) Marshal() (dAtA []byte, err error)
- func (m *Content) MarshalTo(dAtA []byte) (int, error)
- func (m *Content) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Content) ProtoMessage()
- func (m *Content) Reset()
- func (m *Content) Size() (n int)
- func (m *Content) String() string
- func (m *Content) Unmarshal(dAtA []byte) error
- func (m *Content) XXX_DiscardUnknown()
- func (m *Content) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Content) XXX_Merge(src proto.Message)
- func (m *Content) XXX_Size() int
- func (m *Content) XXX_Unmarshal(b []byte) error
- type CreateRecordRequest
- type Data
- type MsgCreateRecord
- func (*MsgCreateRecord) Descriptor() ([]byte, []int)
- func (this *MsgCreateRecord) Equal(that interface{}) bool
- func (msg MsgCreateRecord) GetSignBytes() []byte
- func (msg MsgCreateRecord) GetSigners() []sdk.AccAddress
- func (m *MsgCreateRecord) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateRecord) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateRecord) ProtoMessage()
- func (m *MsgCreateRecord) Reset()
- func (msg MsgCreateRecord) Route() string
- func (m *MsgCreateRecord) Size() (n int)
- func (m *MsgCreateRecord) String() string
- func (msg MsgCreateRecord) Type() string
- func (m *MsgCreateRecord) Unmarshal(dAtA []byte) error
- func (msg MsgCreateRecord) ValidateBasic() error
- func (m *MsgCreateRecord) XXX_DiscardUnknown()
- func (m *MsgCreateRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateRecord) XXX_Merge(src proto.Message)
- func (m *MsgCreateRecord) XXX_Size() int
- func (m *MsgCreateRecord) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryRecordReq
- type QueryRecordRequest
- func (*QueryRecordRequest) Descriptor() ([]byte, []int)
- func (m *QueryRecordRequest) GetRecordId() []byte
- func (m *QueryRecordRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryRecordRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRecordRequest) ProtoMessage()
- func (m *QueryRecordRequest) Reset()
- func (m *QueryRecordRequest) Size() (n int)
- func (m *QueryRecordRequest) String() string
- func (m *QueryRecordRequest) Unmarshal(dAtA []byte) error
- func (m *QueryRecordRequest) XXX_DiscardUnknown()
- func (m *QueryRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRecordRequest) XXX_Merge(src proto.Message)
- func (m *QueryRecordRequest) XXX_Size() int
- func (m *QueryRecordRequest) XXX_Unmarshal(b []byte) error
- type QueryRecordResp
- type QueryRecordResponse
- func (*QueryRecordResponse) Descriptor() ([]byte, []int)
- func (m *QueryRecordResponse) GetRecord() *Record
- func (m *QueryRecordResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryRecordResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRecordResponse) ProtoMessage()
- func (m *QueryRecordResponse) Reset()
- func (m *QueryRecordResponse) Size() (n int)
- func (m *QueryRecordResponse) String() string
- func (m *QueryRecordResponse) Unmarshal(dAtA []byte) error
- func (m *QueryRecordResponse) XXX_DiscardUnknown()
- func (m *QueryRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRecordResponse) XXX_Merge(src proto.Message)
- func (m *QueryRecordResponse) XXX_Size() int
- func (m *QueryRecordResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type Record
- func (this Record) Convert() interface{}
- func (*Record) Descriptor() ([]byte, []int)
- func (this *Record) Equal(that interface{}) bool
- func (m *Record) Marshal() (dAtA []byte, err error)
- func (m *Record) MarshalTo(dAtA []byte) (int, error)
- func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Record) ProtoMessage()
- func (m *Record) Reset()
- func (m *Record) Size() (n int)
- func (m *Record) String() string
- func (m *Record) Unmarshal(dAtA []byte) error
- func (m *Record) XXX_DiscardUnknown()
- func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Record) XXX_Merge(src proto.Message)
- func (m *Record) XXX_Size() int
- func (m *Record) XXX_Unmarshal(b []byte) error
- type UnimplementedQueryServer
Constants ¶
const (
ModuleName = "record"
)
Variables ¶
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthRecord = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRecord = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupRecord = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var (
ModuleCdc = codec.NewAminoCodec(amino)
)
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type Client ¶
type Client interface { sdk.Module CreateRecord(request CreateRecordRequest, baseTx sdk.BaseTx) (string, sdk.Error) QueryRecord(request QueryRecordReq) (QueryRecordResp, sdk.Error) }
expose Record module api for user
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) MarshalToSizedBuffer ¶
func (*Content) ProtoMessage ¶
func (*Content) ProtoMessage()
func (*Content) XXX_DiscardUnknown ¶
func (m *Content) XXX_DiscardUnknown()
func (*Content) XXX_Marshal ¶
func (*Content) XXX_Unmarshal ¶
type CreateRecordRequest ¶
type CreateRecordRequest struct {
Contents []Content
}
type MsgCreateRecord ¶
type MsgCreateRecord struct { Contents []Content `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents"` Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` }
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) MarshalToSizedBuffer ¶
func (m *MsgCreateRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateRecord) ProtoMessage ¶
func (*MsgCreateRecord) ProtoMessage()
func (*MsgCreateRecord) Reset ¶
func (m *MsgCreateRecord) Reset()
func (*MsgCreateRecord) Size ¶
func (m *MsgCreateRecord) Size() (n int)
func (*MsgCreateRecord) String ¶
func (m *MsgCreateRecord) String() string
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 ¶
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 ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryRecordReq ¶
type QueryRecordRequest ¶
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 ¶
func (*QueryRecordRequest) Descriptor() ([]byte, []int)
func (*QueryRecordRequest) GetRecordId ¶
func (m *QueryRecordRequest) GetRecordId() []byte
func (*QueryRecordRequest) Marshal ¶
func (m *QueryRecordRequest) Marshal() (dAtA []byte, err error)
func (*QueryRecordRequest) MarshalTo ¶
func (m *QueryRecordRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryRecordRequest) MarshalToSizedBuffer ¶
func (m *QueryRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRecordRequest) ProtoMessage ¶
func (*QueryRecordRequest) ProtoMessage()
func (*QueryRecordRequest) Reset ¶
func (m *QueryRecordRequest) Reset()
func (*QueryRecordRequest) Size ¶
func (m *QueryRecordRequest) Size() (n int)
func (*QueryRecordRequest) String ¶
func (m *QueryRecordRequest) String() string
func (*QueryRecordRequest) Unmarshal ¶
func (m *QueryRecordRequest) Unmarshal(dAtA []byte) error
func (*QueryRecordRequest) XXX_DiscardUnknown ¶
func (m *QueryRecordRequest) XXX_DiscardUnknown()
func (*QueryRecordRequest) XXX_Marshal ¶
func (m *QueryRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRecordRequest) XXX_Merge ¶
func (m *QueryRecordRequest) XXX_Merge(src proto.Message)
func (*QueryRecordRequest) XXX_Size ¶
func (m *QueryRecordRequest) XXX_Size() int
func (*QueryRecordRequest) XXX_Unmarshal ¶
func (m *QueryRecordRequest) XXX_Unmarshal(b []byte) error
type QueryRecordResp ¶
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 ¶
func (*QueryRecordResponse) Descriptor() ([]byte, []int)
func (*QueryRecordResponse) GetRecord ¶
func (m *QueryRecordResponse) GetRecord() *Record
func (*QueryRecordResponse) Marshal ¶
func (m *QueryRecordResponse) Marshal() (dAtA []byte, err error)
func (*QueryRecordResponse) MarshalTo ¶
func (m *QueryRecordResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryRecordResponse) MarshalToSizedBuffer ¶
func (m *QueryRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRecordResponse) ProtoMessage ¶
func (*QueryRecordResponse) ProtoMessage()
func (*QueryRecordResponse) Reset ¶
func (m *QueryRecordResponse) Reset()
func (*QueryRecordResponse) Size ¶
func (m *QueryRecordResponse) Size() (n int)
func (*QueryRecordResponse) String ¶
func (m *QueryRecordResponse) String() string
func (*QueryRecordResponse) Unmarshal ¶
func (m *QueryRecordResponse) Unmarshal(dAtA []byte) error
func (*QueryRecordResponse) XXX_DiscardUnknown ¶
func (m *QueryRecordResponse) XXX_DiscardUnknown()
func (*QueryRecordResponse) XXX_Marshal ¶
func (m *QueryRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRecordResponse) XXX_Merge ¶
func (m *QueryRecordResponse) XXX_Merge(src proto.Message)
func (*QueryRecordResponse) XXX_Size ¶
func (m *QueryRecordResponse) XXX_Size() int
func (*QueryRecordResponse) XXX_Unmarshal ¶
func (m *QueryRecordResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
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 string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty" yaml:"tx_hash"` Contents []Content `protobuf:"bytes,2,rep,name=contents,proto3" json:"contents"` Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"` }
func (*Record) Descriptor ¶
func (*Record) MarshalToSizedBuffer ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) XXX_DiscardUnknown ¶
func (m *Record) XXX_DiscardUnknown()
func (*Record) XXX_Marshal ¶
func (*Record) XXX_Unmarshal ¶
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Record ¶
func (*UnimplementedQueryServer) Record(ctx context.Context, req *QueryRecordRequest) (*QueryRecordResponse, error)