Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func CurationQueueByTimeKey(curationEndTime time.Time) []byte
- func GetPostIDBytes(postID uint64) (postIDBz []byte)
- func GetPostIDFromBytes(bz []byte) (postID uint64)
- func PostKey(vendorID uint32, postID PostID) []byte
- func PostsKey(vendorID uint32) []byte
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func UpvoteKey(vendorID uint32, postID PostID, curator sdk.AccAddress) []byte
- func UpvotePrefixKey(vendorID uint32, postID PostID) []byte
- type AccountKeeper
- type BankKeeper
- type BodyHash
- func (b BodyHash) Marshal() ([]byte, error)
- func (b BodyHash) MarshalJSON() ([]byte, error)
- func (b BodyHash) MarshalTo(data []byte) (n int, err error)
- func (b BodyHash) Size() int
- func (b *BodyHash) String() string
- func (b *BodyHash) Unmarshal(data []byte) error
- func (b *BodyHash) UnmarshalJSON(data []byte) error
- type CuratingQueue
- type CustomProtobufType
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetCuratingQueue() CuratingQueue
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetPosts() Posts
- func (m *GenesisState) GetUpvotes() Upvotes
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgPost
- func (*MsgPost) Descriptor() ([]byte, []int)
- func (this *MsgPost) Equal(that interface{}) bool
- func (m *MsgPost) GetBody() string
- func (m *MsgPost) GetChainID() string
- func (m *MsgPost) GetContractAddress() string
- func (m *MsgPost) GetCreator() string
- func (m *MsgPost) GetMetadata() string
- func (m *MsgPost) GetPostID() string
- func (m *MsgPost) GetRewardAccount() string
- func (msg MsgPost) GetSignBytes() []byte
- func (msg MsgPost) GetSigners() []sdk.AccAddress
- func (m *MsgPost) GetVendorID() uint32
- func (m *MsgPost) Marshal() (dAtA []byte, err error)
- func (m *MsgPost) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPost) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPost) ProtoMessage()
- func (m *MsgPost) Reset()
- func (msg MsgPost) Route() string
- func (m *MsgPost) Size() (n int)
- func (m *MsgPost) String() string
- func (msg MsgPost) Type() string
- func (m *MsgPost) Unmarshal(dAtA []byte) error
- func (msg MsgPost) ValidateBasic() error
- func (m *MsgPost) XXX_DiscardUnknown()
- func (m *MsgPost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPost) XXX_Merge(src proto.Message)
- func (m *MsgPost) XXX_Size() int
- func (m *MsgPost) XXX_Unmarshal(b []byte) error
- type MsgPostResponse
- func (*MsgPostResponse) Descriptor() ([]byte, []int)
- func (m *MsgPostResponse) GetPostID() string
- func (m *MsgPostResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgPostResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPostResponse) ProtoMessage()
- func (m *MsgPostResponse) Reset()
- func (m *MsgPostResponse) Size() (n int)
- func (m *MsgPostResponse) String() string
- func (m *MsgPostResponse) Unmarshal(dAtA []byte) error
- func (m *MsgPostResponse) XXX_DiscardUnknown()
- func (m *MsgPostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPostResponse) XXX_Merge(src proto.Message)
- func (m *MsgPostResponse) XXX_Size() int
- func (m *MsgPostResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgUpvote
- func (*MsgUpvote) Descriptor() ([]byte, []int)
- func (this *MsgUpvote) Equal(that interface{}) bool
- func (m *MsgUpvote) GetCurator() string
- func (m *MsgUpvote) GetPostID() string
- func (m *MsgUpvote) GetRewardAccount() string
- func (msg MsgUpvote) GetSignBytes() []byte
- func (msg MsgUpvote) GetSigners() []sdk.AccAddress
- func (m *MsgUpvote) GetVendorID() uint32
- func (m *MsgUpvote) GetVoteNum() int32
- func (m *MsgUpvote) Marshal() (dAtA []byte, err error)
- func (m *MsgUpvote) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpvote) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpvote) ProtoMessage()
- func (m *MsgUpvote) Reset()
- func (msg MsgUpvote) Route() string
- func (m *MsgUpvote) Size() (n int)
- func (m *MsgUpvote) String() string
- func (msg MsgUpvote) Type() string
- func (m *MsgUpvote) Unmarshal(dAtA []byte) error
- func (msg MsgUpvote) ValidateBasic() error
- func (m *MsgUpvote) XXX_DiscardUnknown()
- func (m *MsgUpvote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpvote) XXX_Merge(src proto.Message)
- func (m *MsgUpvote) XXX_Size() int
- func (m *MsgUpvote) XXX_Unmarshal(b []byte) error
- type MsgUpvoteResponse
- func (*MsgUpvoteResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpvoteResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpvoteResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpvoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpvoteResponse) ProtoMessage()
- func (m *MsgUpvoteResponse) Reset()
- func (m *MsgUpvoteResponse) Size() (n int)
- func (m *MsgUpvoteResponse) String() string
- func (m *MsgUpvoteResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpvoteResponse) XXX_DiscardUnknown()
- func (m *MsgUpvoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpvoteResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpvoteResponse) XXX_Size() int
- func (m *MsgUpvoteResponse) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetCurationWindow() time.Duration
- func (m *Params) GetInitialRewardPool() types.Coin
- func (m *Params) GetMaxNumVotes() uint32
- func (m *Params) GetMaxPostBodyLength() uint32
- func (m *Params) GetMaxVendors() uint32
- func (m *Params) GetStakeDenom() string
- func (m *Params) GetVoteAmount() types.Coin
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type Post
- func (*Post) Descriptor() ([]byte, []int)
- func (m *Post) GetBody() string
- func (m *Post) GetChainID() string
- func (m *Post) GetContractAddress() string
- func (m *Post) GetCreator() string
- func (m *Post) GetCuratingEndTime() time.Time
- func (m *Post) GetLocked() bool
- func (m *Post) GetMetadata() string
- func (m *Post) GetOwner() string
- func (m *Post) GetRewardAccount() string
- func (m *Post) GetTotalAmount() types.Coin
- func (m *Post) GetTotalVoters() uint64
- func (m *Post) GetTotalVotes() uint64
- func (m *Post) GetVendorID() uint32
- func (m *Post) Marshal() (dAtA []byte, err error)
- func (m *Post) MarshalTo(dAtA []byte) (int, error)
- func (m *Post) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Post) ProtoMessage()
- func (m *Post) Reset()
- func (m *Post) Size() (n int)
- func (m *Post) String() string
- func (m *Post) Unmarshal(dAtA []byte) error
- func (m *Post) XXX_DiscardUnknown()
- func (m *Post) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Post) XXX_Merge(src proto.Message)
- func (m *Post) XXX_Size() int
- func (m *Post) XXX_Unmarshal(b []byte) error
- type PostID
- func (p PostID) Bytes() []byte
- func (p PostID) Equal(p2 PostID) bool
- func (p PostID) Marshal() ([]byte, error)
- func (p PostID) MarshalJSON() ([]byte, error)
- func (p PostID) MarshalTo(data []byte) (n int, err error)
- func (p PostID) Size() int
- func (p PostID) String() string
- func (p *PostID) Unmarshal(data []byte) error
- func (p *PostID) UnmarshalJSON(data []byte) error
- type Posts
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryPostRequest
- func (*QueryPostRequest) Descriptor() ([]byte, []int)
- func (m *QueryPostRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPostRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPostRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPostRequest) ProtoMessage()
- func (m *QueryPostRequest) Reset()
- func (m *QueryPostRequest) Size() (n int)
- func (m *QueryPostRequest) String() string
- func (m *QueryPostRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPostRequest) XXX_DiscardUnknown()
- func (m *QueryPostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPostRequest) XXX_Merge(src proto.Message)
- func (m *QueryPostRequest) XXX_Size() int
- func (m *QueryPostRequest) XXX_Unmarshal(b []byte) error
- type QueryPostResponse
- func (*QueryPostResponse) Descriptor() ([]byte, []int)
- func (m *QueryPostResponse) GetPost() *Post
- func (m *QueryPostResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPostResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPostResponse) ProtoMessage()
- func (m *QueryPostResponse) Reset()
- func (m *QueryPostResponse) Size() (n int)
- func (m *QueryPostResponse) String() string
- func (m *QueryPostResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPostResponse) XXX_DiscardUnknown()
- func (m *QueryPostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPostResponse) XXX_Merge(src proto.Message)
- func (m *QueryPostResponse) XXX_Size() int
- func (m *QueryPostResponse) XXX_Unmarshal(b []byte) error
- type QueryPostsRequest
- func (*QueryPostsRequest) Descriptor() ([]byte, []int)
- func (m *QueryPostsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPostsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPostsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPostsRequest) ProtoMessage()
- func (m *QueryPostsRequest) Reset()
- func (m *QueryPostsRequest) Size() (n int)
- func (m *QueryPostsRequest) String() string
- func (m *QueryPostsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPostsRequest) XXX_DiscardUnknown()
- func (m *QueryPostsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPostsRequest) XXX_Merge(src proto.Message)
- func (m *QueryPostsRequest) XXX_Size() int
- func (m *QueryPostsRequest) XXX_Unmarshal(b []byte) error
- type QueryPostsResponse
- func (*QueryPostsResponse) Descriptor() ([]byte, []int)
- func (m *QueryPostsResponse) GetPosts() []Post
- func (m *QueryPostsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPostsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPostsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPostsResponse) ProtoMessage()
- func (m *QueryPostsResponse) Reset()
- func (m *QueryPostsResponse) Size() (n int)
- func (m *QueryPostsResponse) String() string
- func (m *QueryPostsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPostsResponse) XXX_DiscardUnknown()
- func (m *QueryPostsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPostsResponse) XXX_Merge(src proto.Message)
- func (m *QueryPostsResponse) XXX_Size() int
- func (m *QueryPostsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryUpvotesRequest
- func (*QueryUpvotesRequest) Descriptor() ([]byte, []int)
- func (m *QueryUpvotesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryUpvotesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryUpvotesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryUpvotesRequest) ProtoMessage()
- func (m *QueryUpvotesRequest) Reset()
- func (m *QueryUpvotesRequest) Size() (n int)
- func (m *QueryUpvotesRequest) String() string
- func (m *QueryUpvotesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryUpvotesRequest) XXX_DiscardUnknown()
- func (m *QueryUpvotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryUpvotesRequest) XXX_Merge(src proto.Message)
- func (m *QueryUpvotesRequest) XXX_Size() int
- func (m *QueryUpvotesRequest) XXX_Unmarshal(b []byte) error
- type QueryUpvotesResponse
- func (*QueryUpvotesResponse) Descriptor() ([]byte, []int)
- func (m *QueryUpvotesResponse) GetUpvotes() []Upvote
- func (m *QueryUpvotesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryUpvotesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryUpvotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryUpvotesResponse) ProtoMessage()
- func (m *QueryUpvotesResponse) Reset()
- func (m *QueryUpvotesResponse) Size() (n int)
- func (m *QueryUpvotesResponse) String() string
- func (m *QueryUpvotesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryUpvotesResponse) XXX_DiscardUnknown()
- func (m *QueryUpvotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryUpvotesResponse) XXX_Merge(src proto.Message)
- func (m *QueryUpvotesResponse) XXX_Size() int
- func (m *QueryUpvotesResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) Post(ctx context.Context, req *QueryPostRequest) (*QueryPostResponse, error)
- func (*UnimplementedQueryServer) Posts(ctx context.Context, req *QueryPostsRequest) (*QueryPostsResponse, error)
- func (*UnimplementedQueryServer) Upvotes(ctx context.Context, req *QueryUpvotesRequest) (*QueryUpvotesResponse, error)
- type Upvote
- func (*Upvote) Descriptor() ([]byte, []int)
- func (m *Upvote) GetCuratedTime() time.Time
- func (m *Upvote) GetCurator() string
- func (m *Upvote) GetRewardAccount() string
- func (m *Upvote) GetUpdatedTime() time.Time
- func (m *Upvote) GetVendorID() uint32
- func (m *Upvote) GetVoteAmount() types.Coin
- func (m *Upvote) GetVoteNum() int32
- func (m *Upvote) Marshal() (dAtA []byte, err error)
- func (m *Upvote) MarshalTo(dAtA []byte) (int, error)
- func (m *Upvote) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Upvote) ProtoMessage()
- func (m *Upvote) Reset()
- func (m *Upvote) Size() (n int)
- func (m *Upvote) String() string
- func (m *Upvote) Unmarshal(dAtA []byte) error
- func (m *Upvote) XXX_DiscardUnknown()
- func (m *Upvote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Upvote) XXX_Merge(src proto.Message)
- func (m *Upvote) XXX_Size() int
- func (m *Upvote) XXX_Unmarshal(b []byte) error
- type Upvotes
- type VPPair
- func (*VPPair) Descriptor() ([]byte, []int)
- func (this *VPPair) Equal(that interface{}) bool
- func (m *VPPair) GetVendorID() uint32
- func (m *VPPair) Marshal() (dAtA []byte, err error)
- func (m *VPPair) MarshalTo(dAtA []byte) (int, error)
- func (m *VPPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*VPPair) ProtoMessage()
- func (m *VPPair) Reset()
- func (m *VPPair) Size() (n int)
- func (m *VPPair) String() string
- func (m *VPPair) Unmarshal(dAtA []byte) error
- func (m *VPPair) XXX_DiscardUnknown()
- func (m *VPPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VPPair) XXX_Merge(src proto.Message)
- func (m *VPPair) XXX_Size() int
- func (m *VPPair) XXX_Unmarshal(b []byte) error
- type VPPairs
- func (*VPPairs) Descriptor() ([]byte, []int)
- func (m *VPPairs) GetPairs() []VPPair
- func (m *VPPairs) Marshal() (dAtA []byte, err error)
- func (m *VPPairs) MarshalTo(dAtA []byte) (int, error)
- func (m *VPPairs) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*VPPairs) ProtoMessage()
- func (m *VPPairs) Reset()
- func (m *VPPairs) Size() (n int)
- func (m *VPPairs) String() string
- func (m *VPPairs) Unmarshal(dAtA []byte) error
- func (m *VPPairs) XXX_DiscardUnknown()
- func (m *VPPairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VPPairs) XXX_Merge(src proto.Message)
- func (m *VPPairs) XXX_Size() int
- func (m *VPPairs) XXX_Unmarshal(b []byte) error
Constants ¶
const ( EventTypePost = "post" EventTypeUpvote = "upvote" EventTypeCurationComplete = "curation_complete" EventTypeProtocolReward = "protocol_reward" AttributeKeyVendorID = "vendor_id" AttributeKeyPostID = "post_id" AttributeKeyCreator = "creator" AttributeKeyCurator = "curator" AttributeKeyRewardAccount = "reward_account" AttributeKeyBodyHash = "body_hash" AttributeKeyBody = "body" AttributeCurationEndTime = "curation_end_time" AttributeKeyVoteNumber = "vote_number" AttributeKeyVoteAmount = "vote_amount" AttributeKeyVoteDenom = "vote_denom" AttributeKeyProtocolRewardType = "reward_type" AttributeKeyRewardAmount = "reward_amount" AttributeKeyChainID = "chain_id" AttributeKeyContractAddress = "contract_address" AttributeKeyMetadata = "metadata" AttributeKeyParentID = "parent_id" AttributeKeyLocked = "locked" AttributeValueCategory = ModuleName )
curating module event types
const ( // ModuleName is the name of the module ModuleName = "curating" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used for routing msgs RouterKey = ModuleName // QuerierKey to be used for querierer msgs QuerierKey = ModuleName // RewardPoolName is the name for the module account for the reward pool RewardPoolName = "reward_matching_pool" // VotingPoolName is the name of the global voting pool module account VotingPoolName = "voting_pool" // DefaultStakeDenom is the staking denom for the zone DefaultStakeDenom = "ustarx" // DefaultVoteDenom is the denom for quadratic voting DefaultVoteDenom = "ucredits" )
const ( TypeMsgPost = "curating_post" TypeMsgUpvote = "curating_upvote" )
msg types
const ( DefaultParamspace string = ModuleName DefaultCurationWindow time.Duration = time.Minute * 10 DefaultMaxNumVotes uint32 = 5 DefaultMaxVendors uint32 = 1 DefaultMaxPostBodyLength uint32 = 280 )
Default parameter namespace
Variables ¶
var ( ErrInvalidLengthCurating = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCurating = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupCurating = fmt.Errorf("proto: unexpected end of group") )
var ( // error code 1 is reserved for internal ABCI error code ErrPostNotFound = sdkerrors.Register(ModuleName, 2, "Post not found") ErrAlreadyVoted = sdkerrors.Register(ModuleName, 3, "Already voted") ErrDuplicatePost = sdkerrors.Register(ModuleName, 4, "Post already exists") ErrPostExpired = sdkerrors.Register(ModuleName, 5, "Post already expired") ErrInvalidPostID = sdkerrors.Register(ModuleName, 6, "PostID cannot be nil") )
x/curating module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( // KeyPrefixPost 0x00 | vendor_id | post_id -> Post KeyPrefixPost = []byte{0x00} // KeyPrefixUpvote 0x01 | vendor_id | post_id | curator -> Upvote KeyPrefixUpvote = []byte{0x01} // KeyPrefixCurationQueue 0x02 | format(curation_end_time) -> []VPPair KeyPrefixCurationQueue = []byte{0x02} // PostIDKey for native posts (vendor = 0) PostIDKey = []byte{0x03} )
var ( DefaultVoteAmount = sdk.NewInt64Coin(DefaultVoteDenom, 1_000_000) DefaultInitialRewardPool = sdk.NewInt64Coin(DefaultStakeDenom, 21_000_000_000_000) DefaultRewardPoolAllocation = sdk.NewDecWithPrec(50, 2) // from inflation DefaultRewardPoolCurationMaxAllocation = sdk.NewDecWithPrec(1, 3) // .001 (0.1%) )
Default vars
var ( KeyCurationWindow = []byte("CurationWindow") KeyVoteAmount = []byte("VoteAmount") KeyMaxNumVotes = []byte("MaxNumVotes") KeyMaxVendors = []byte("MaxVendors") KeyMaxPostBodyLength = []byte("MaxPostBodyLength") KeyRewardPoolAllocation = []byte("RewardPoolAllocation") KeyRewardPoolCurationMaxAlloc = []byte("RewardPoolCurationMaxAlloc") KeyInitialRewardPool = []byte("InitialRewardPool") KeyStakeDenom = []byte("StakeDenom") )
Parameter store keys
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 ( 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 references the global x/curating module codec. Note, the codec // should ONLY be used in certain instances of tests and for JSON encoding. ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) )
Functions ¶
func CurationQueueByTimeKey ¶
CurationQueueByTimeKey gets the curation queue key by curation end time
func GetPostIDBytes ¶ added in v0.6.0
GetPostIDBytes returns the byte representation of the postlID
func GetPostIDFromBytes ¶ added in v0.6.0
GetPostIDFromBytes returns postID in uint64 format from a byte array
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register the curating module interfaces to protobuf Any.
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func UpvoteKey ¶
func UpvoteKey(vendorID uint32, postID PostID, curator sdk.AccAddress) []byte
UpvoteKey key is the key used to store an upvote
func UpvotePrefixKey ¶
UpvotePrefixKey 0x01|vendorID|postID|...
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool)) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // only used for simulation GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI // TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 SetModuleAccount(sdk.Context, authtypes.ModuleAccountI) }
AccountKeeper defines the expected account keeper (noalias)
type BankKeeper ¶
type BankKeeper interface { MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error }
BankKeeper defines the expected interface needed to retrieve account balances.
type BodyHash ¶
type BodyHash struct {
// contains filtered or unexported fields
}
func BodyHashFromString ¶
BodyHashFromString does exactly whats on the label
func (BodyHash) MarshalJSON ¶
MarshalJSON implements the gogo proto custom type interface
func (*BodyHash) UnmarshalJSON ¶
UnmarshalJSON implements the gogo proto custom type interface
type CustomProtobufType ¶
type CustomProtobufType interface { Marshal() ([]byte, error) MarshalTo(data []byte) (n int, err error) Unmarshal(data []byte) error Size() int MarshalJSON() ([]byte, error) UnmarshalJSON(data []byte) error }
CustomProtobufType defines the interface custom gogo proto types must implement in order to be used as a "customtype" extension.
ref: https://github.com/gogo/protobuf/blob/master/custom_types.md
type GenesisState ¶
type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` Posts Posts `protobuf:"bytes,3,rep,name=posts,proto3,castrepeated=Posts" json:"posts"` Upvotes Upvotes `protobuf:"bytes,4,rep,name=upvotes,proto3,castrepeated=Upvotes" json:"upvotes"` CuratingQueue CuratingQueue `protobuf:"bytes,5,rep,name=curating_queue,json=curatingQueue,proto3,castrepeated=CuratingQueue" json:"curating_queue"` }
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState - default GenesisState
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetCuratingQueue ¶
func (m *GenesisState) GetCuratingQueue() CuratingQueue
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetPosts ¶
func (m *GenesisState) GetPosts() Posts
func (*GenesisState) GetUpvotes ¶
func (m *GenesisState) GetUpvotes() Upvotes
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate validates the x/curating genesis parameters
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // Post defines a method for sending a post Post(ctx context.Context, in *MsgPost, opts ...grpc.CallOption) (*MsgPostResponse, error) // Upvote defines a method for upvoting a post Upvote(ctx context.Context, in *MsgUpvote, opts ...grpc.CallOption) (*MsgUpvoteResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgPost ¶
type MsgPost struct { VendorID uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id" yaml:"vendor_id"` PostID string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"` Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"` RewardAccount string `protobuf:"bytes,4,opt,name=reward_account,json=rewardAccount,proto3" json:"reward_account,omitempty" yaml:"reward_account"` Body string `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty" yaml:"body"` ChainID string `protobuf:"bytes,6,opt,name=chain_id,json=chainId,proto3" json:"chain_id" yaml:"chain_id"` ContractAddress string `` /* 130-byte string literal not displayed */ Metadata string `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty" yaml:"metadata"` ParentID *PostID `protobuf:"bytes,9,opt,name=parent_id,json=parentId,proto3,customtype=PostID" json:"parent_id" yaml:"parent_id"` }
func NewMsgPost ¶
func NewMsgPost( vendorID uint32, postID string, creator, rewardAccount sdk.AccAddress, body string, ) *MsgPost
NewMsgPost creates a new MsgPost instance
func (*MsgPost) Descriptor ¶
func (*MsgPost) GetChainID ¶ added in v0.6.0
func (*MsgPost) GetContractAddress ¶ added in v0.6.0
func (*MsgPost) GetCreator ¶
func (*MsgPost) GetMetadata ¶ added in v0.6.0
func (*MsgPost) GetRewardAccount ¶
func (MsgPost) GetSignBytes ¶
GetSignBytes gets the bytes for the message signer to sign on
func (MsgPost) GetSigners ¶
func (msg MsgPost) GetSigners() []sdk.AccAddress
GetSigners implements sdk.Msg
func (*MsgPost) GetVendorID ¶
func (*MsgPost) MarshalToSizedBuffer ¶
func (*MsgPost) ProtoMessage ¶
func (*MsgPost) ProtoMessage()
func (MsgPost) ValidateBasic ¶
ValidateBasic validity check for the AnteHandler
func (*MsgPost) XXX_DiscardUnknown ¶
func (m *MsgPost) XXX_DiscardUnknown()
func (*MsgPost) XXX_Marshal ¶
func (*MsgPost) XXX_Unmarshal ¶
type MsgPostResponse ¶
type MsgPostResponse struct {
PostID string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"`
}
func (*MsgPostResponse) Descriptor ¶
func (*MsgPostResponse) Descriptor() ([]byte, []int)
func (*MsgPostResponse) GetPostID ¶ added in v0.6.0
func (m *MsgPostResponse) GetPostID() string
func (*MsgPostResponse) Marshal ¶
func (m *MsgPostResponse) Marshal() (dAtA []byte, err error)
func (*MsgPostResponse) MarshalToSizedBuffer ¶
func (m *MsgPostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgPostResponse) ProtoMessage ¶
func (*MsgPostResponse) ProtoMessage()
func (*MsgPostResponse) Reset ¶
func (m *MsgPostResponse) Reset()
func (*MsgPostResponse) Size ¶
func (m *MsgPostResponse) Size() (n int)
func (*MsgPostResponse) String ¶
func (m *MsgPostResponse) String() string
func (*MsgPostResponse) Unmarshal ¶
func (m *MsgPostResponse) Unmarshal(dAtA []byte) error
func (*MsgPostResponse) XXX_DiscardUnknown ¶
func (m *MsgPostResponse) XXX_DiscardUnknown()
func (*MsgPostResponse) XXX_Marshal ¶
func (m *MsgPostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgPostResponse) XXX_Merge ¶
func (m *MsgPostResponse) XXX_Merge(src proto.Message)
func (*MsgPostResponse) XXX_Size ¶
func (m *MsgPostResponse) XXX_Size() int
func (*MsgPostResponse) XXX_Unmarshal ¶
func (m *MsgPostResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // Post defines a method for sending a post Post(context.Context, *MsgPost) (*MsgPostResponse, error) // Upvote defines a method for upvoting a post Upvote(context.Context, *MsgUpvote) (*MsgUpvoteResponse, error) }
MsgServer is the server API for Msg service.
type MsgUpvote ¶
type MsgUpvote struct { VendorID uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id" yaml:"vendor_id"` PostID string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"` Curator string `protobuf:"bytes,3,opt,name=curator,proto3" json:"curator,omitempty" yaml:"curator"` RewardAccount string `protobuf:"bytes,4,opt,name=reward_account,json=rewardAccount,proto3" json:"reward_account,omitempty" yaml:"reward_account"` VoteNum int32 `protobuf:"varint,5,opt,name=vote_num,json=voteNum,proto3" json:"vote_num,omitempty"` }
func NewMsgUpvote ¶
func NewMsgUpvote(vendorID uint32, postID string, curator, rewardAccount sdk.AccAddress, voteNum int32) *MsgUpvote
NewMsgUpvote creates a new MsgUpvote instance
func (*MsgUpvote) Descriptor ¶
func (*MsgUpvote) GetCurator ¶
func (*MsgUpvote) GetRewardAccount ¶
func (MsgUpvote) GetSignBytes ¶
GetSignBytes gets the bytes for the message signer to sign on
func (MsgUpvote) GetSigners ¶
func (msg MsgUpvote) GetSigners() []sdk.AccAddress
GetSigners implements sdk.Msg
func (*MsgUpvote) GetVendorID ¶
func (*MsgUpvote) GetVoteNum ¶
func (*MsgUpvote) MarshalToSizedBuffer ¶
func (*MsgUpvote) ProtoMessage ¶
func (*MsgUpvote) ProtoMessage()
func (MsgUpvote) ValidateBasic ¶
ValidateBasic validity check for the AnteHandler
func (*MsgUpvote) XXX_DiscardUnknown ¶
func (m *MsgUpvote) XXX_DiscardUnknown()
func (*MsgUpvote) XXX_Marshal ¶
func (*MsgUpvote) XXX_Unmarshal ¶
type MsgUpvoteResponse ¶
type MsgUpvoteResponse struct { }
func (*MsgUpvoteResponse) Descriptor ¶
func (*MsgUpvoteResponse) Descriptor() ([]byte, []int)
func (*MsgUpvoteResponse) Marshal ¶
func (m *MsgUpvoteResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpvoteResponse) MarshalTo ¶
func (m *MsgUpvoteResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpvoteResponse) MarshalToSizedBuffer ¶
func (m *MsgUpvoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpvoteResponse) ProtoMessage ¶
func (*MsgUpvoteResponse) ProtoMessage()
func (*MsgUpvoteResponse) Reset ¶
func (m *MsgUpvoteResponse) Reset()
func (*MsgUpvoteResponse) Size ¶
func (m *MsgUpvoteResponse) Size() (n int)
func (*MsgUpvoteResponse) String ¶
func (m *MsgUpvoteResponse) String() string
func (*MsgUpvoteResponse) Unmarshal ¶
func (m *MsgUpvoteResponse) Unmarshal(dAtA []byte) error
func (*MsgUpvoteResponse) XXX_DiscardUnknown ¶
func (m *MsgUpvoteResponse) XXX_DiscardUnknown()
func (*MsgUpvoteResponse) XXX_Marshal ¶
func (m *MsgUpvoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpvoteResponse) XXX_Merge ¶
func (m *MsgUpvoteResponse) XXX_Merge(src proto.Message)
func (*MsgUpvoteResponse) XXX_Size ¶
func (m *MsgUpvoteResponse) XXX_Size() int
func (*MsgUpvoteResponse) XXX_Unmarshal ¶
func (m *MsgUpvoteResponse) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { CurationWindow time.Duration `` /* 128-byte string literal not displayed */ VoteAmount types.Coin `protobuf:"bytes,2,opt,name=vote_amount,json=voteAmount,proto3" json:"vote_amount" yaml:"vote_amount"` MaxNumVotes uint32 `protobuf:"varint,3,opt,name=max_num_votes,json=maxNumVotes,proto3" json:"max_num_votes" yaml:"max_num_votes"` MaxVendors uint32 `protobuf:"varint,4,opt,name=max_vendors,json=maxVendors,proto3" json:"max_vendors" yaml:"max_vendors"` RewardPoolAllocation github_com_cosmos_cosmos_sdk_types.Dec `` /* 193-byte string literal not displayed */ MaxPostBodyLength uint32 `` /* 135-byte string literal not displayed */ RewardPoolCurationMaxAlloc github_com_cosmos_cosmos_sdk_types.Dec `` /* 233-byte string literal not displayed */ InitialRewardPool types.Coin `` /* 131-byte string literal not displayed */ StakeDenom string `protobuf:"bytes,10,opt,name=stake_denom,json=stakeDenom,proto3" json:"stake_denom" yaml:"stake_denom"` }
func DefaultParams ¶
func DefaultParams() Params
DefaultParams defines the parameters for this module
func NewParams ¶
func NewParams( curationWindow time.Duration, voteAmount, initialRewardPool sdk.Coin, maxNumVotes, maxVendors uint32, maxPostBodyLength uint32, rewardPoolAllocation, rewardPoolCurationMaxAllocation sdk.Dec, stakeDenom string, ) Params
NewParams creates a new Params object
func (*Params) Descriptor ¶
func (*Params) GetCurationWindow ¶
func (*Params) GetInitialRewardPool ¶
func (*Params) GetMaxNumVotes ¶
func (*Params) GetMaxPostBodyLength ¶ added in v0.6.0
func (*Params) GetMaxVendors ¶
func (*Params) GetStakeDenom ¶
func (*Params) GetVoteAmount ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs - Implements params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type Post ¶
type Post struct { VendorID uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id" yaml:"vendor_id"` PostID PostID `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3,customtype=PostID" json:"post_id" yaml:"post_id"` Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"` RewardAccount string `protobuf:"bytes,4,opt,name=reward_account,json=rewardAccount,proto3" json:"reward_account,omitempty" yaml:"reward_account"` BodyHash BodyHash `protobuf:"bytes,5,opt,name=body_hash,json=bodyHash,proto3,customtype=BodyHash" json:"body_hash" yaml:"body_hash"` Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty" yaml:"body"` CuratingEndTime time.Time `` /* 131-byte string literal not displayed */ TotalVotes uint64 `protobuf:"varint,8,opt,name=total_votes,json=totalVotes,proto3" json:"total_votes" yaml:"total_votes"` TotalVoters uint64 `protobuf:"varint,9,opt,name=total_voters,json=totalVoters,proto3" json:"total_voters" yaml:"total_voters"` TotalAmount types.Coin `protobuf:"bytes,10,opt,name=total_amount,json=totalAmount,proto3" json:"total_amount" yaml:"total_amount"` ChainID string `protobuf:"bytes,11,opt,name=chain_id,json=chainId,proto3" json:"chain_id" yaml:"chain_id"` Owner string `protobuf:"bytes,12,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"` ContractAddress string `` /* 131-byte string literal not displayed */ Metadata string `protobuf:"bytes,14,opt,name=metadata,proto3" json:"metadata,omitempty" yaml:"metadata"` Locked bool `protobuf:"varint,15,opt,name=locked,proto3" json:"locked,omitempty" yaml:"locked"` ParentID *PostID `protobuf:"bytes,16,opt,name=parent_id,json=parentId,proto3,customtype=PostID" json:"parent_id" yaml:"parent_id"` }
func NewPost ¶
func NewPost( vendorID uint32, postID PostID, bodyHash BodyHash, body string, creator, rewardAccount sdk.AccAddress, curatingEndTime time.Time, chainID string, owner sdk.AccAddress, contractAddress sdk.AccAddress, metaData string, locked bool, parentID *PostID) Post
NewPost allocates and returns a new `Post` struct
func (*Post) Descriptor ¶
func (*Post) GetChainID ¶ added in v0.6.0
func (*Post) GetContractAddress ¶ added in v0.6.0
func (*Post) GetCreator ¶
func (*Post) GetCuratingEndTime ¶
func (*Post) GetMetadata ¶ added in v0.6.0
func (*Post) GetRewardAccount ¶
func (*Post) GetTotalAmount ¶
func (*Post) GetTotalVoters ¶
func (*Post) GetTotalVotes ¶
func (*Post) GetVendorID ¶
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) XXX_DiscardUnknown ¶
func (m *Post) XXX_DiscardUnknown()
func (*Post) XXX_Unmarshal ¶
type PostID ¶
type PostID struct {
// contains filtered or unexported fields
}
PostID represents a Twitter post ID (for now)
func PostIDFromInt64 ¶ added in v0.6.0
PostIDFromInt64 does exactly whats on the label
func PostIDFromString ¶
PostIDFromString does exactly whats on the label
func (PostID) MarshalJSON ¶
MarshalJSON implements the gogo proto custom type interface
func (*PostID) UnmarshalJSON ¶
UnmarshalJSON implements the gogo proto custom type interface
type QueryClient ¶
type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) Posts(ctx context.Context, in *QueryPostsRequest, opts ...grpc.CallOption) (*QueryPostsResponse, error) Post(ctx context.Context, in *QueryPostRequest, opts ...grpc.CallOption) (*QueryPostResponse, error) Upvotes(ctx context.Context, in *QueryUpvotesRequest, opts ...grpc.CallOption) (*QueryUpvotesResponse, 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 QueryParamsRequest ¶
type QueryParamsRequest struct { }
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryPostRequest ¶
type QueryPostRequest struct { VendorId uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id,omitempty"` PostId string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` }
func (*QueryPostRequest) Descriptor ¶
func (*QueryPostRequest) Descriptor() ([]byte, []int)
func (*QueryPostRequest) Marshal ¶
func (m *QueryPostRequest) Marshal() (dAtA []byte, err error)
func (*QueryPostRequest) MarshalToSizedBuffer ¶
func (m *QueryPostRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPostRequest) ProtoMessage ¶
func (*QueryPostRequest) ProtoMessage()
func (*QueryPostRequest) Reset ¶
func (m *QueryPostRequest) Reset()
func (*QueryPostRequest) Size ¶
func (m *QueryPostRequest) Size() (n int)
func (*QueryPostRequest) String ¶
func (m *QueryPostRequest) String() string
func (*QueryPostRequest) Unmarshal ¶
func (m *QueryPostRequest) Unmarshal(dAtA []byte) error
func (*QueryPostRequest) XXX_DiscardUnknown ¶
func (m *QueryPostRequest) XXX_DiscardUnknown()
func (*QueryPostRequest) XXX_Marshal ¶
func (m *QueryPostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPostRequest) XXX_Merge ¶
func (m *QueryPostRequest) XXX_Merge(src proto.Message)
func (*QueryPostRequest) XXX_Size ¶
func (m *QueryPostRequest) XXX_Size() int
func (*QueryPostRequest) XXX_Unmarshal ¶
func (m *QueryPostRequest) XXX_Unmarshal(b []byte) error
type QueryPostResponse ¶
type QueryPostResponse struct {
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (*QueryPostResponse) Descriptor ¶
func (*QueryPostResponse) Descriptor() ([]byte, []int)
func (*QueryPostResponse) GetPost ¶
func (m *QueryPostResponse) GetPost() *Post
func (*QueryPostResponse) Marshal ¶
func (m *QueryPostResponse) Marshal() (dAtA []byte, err error)
func (*QueryPostResponse) MarshalTo ¶
func (m *QueryPostResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPostResponse) MarshalToSizedBuffer ¶
func (m *QueryPostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPostResponse) ProtoMessage ¶
func (*QueryPostResponse) ProtoMessage()
func (*QueryPostResponse) Reset ¶
func (m *QueryPostResponse) Reset()
func (*QueryPostResponse) Size ¶
func (m *QueryPostResponse) Size() (n int)
func (*QueryPostResponse) String ¶
func (m *QueryPostResponse) String() string
func (*QueryPostResponse) Unmarshal ¶
func (m *QueryPostResponse) Unmarshal(dAtA []byte) error
func (*QueryPostResponse) XXX_DiscardUnknown ¶
func (m *QueryPostResponse) XXX_DiscardUnknown()
func (*QueryPostResponse) XXX_Marshal ¶
func (m *QueryPostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPostResponse) XXX_Merge ¶
func (m *QueryPostResponse) XXX_Merge(src proto.Message)
func (*QueryPostResponse) XXX_Size ¶
func (m *QueryPostResponse) XXX_Size() int
func (*QueryPostResponse) XXX_Unmarshal ¶
func (m *QueryPostResponse) XXX_Unmarshal(b []byte) error
type QueryPostsRequest ¶
type QueryPostsRequest struct {
VendorId uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id,omitempty"`
}
func (*QueryPostsRequest) Descriptor ¶
func (*QueryPostsRequest) Descriptor() ([]byte, []int)
func (*QueryPostsRequest) Marshal ¶
func (m *QueryPostsRequest) Marshal() (dAtA []byte, err error)
func (*QueryPostsRequest) MarshalTo ¶
func (m *QueryPostsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPostsRequest) MarshalToSizedBuffer ¶
func (m *QueryPostsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPostsRequest) ProtoMessage ¶
func (*QueryPostsRequest) ProtoMessage()
func (*QueryPostsRequest) Reset ¶
func (m *QueryPostsRequest) Reset()
func (*QueryPostsRequest) Size ¶
func (m *QueryPostsRequest) Size() (n int)
func (*QueryPostsRequest) String ¶
func (m *QueryPostsRequest) String() string
func (*QueryPostsRequest) Unmarshal ¶
func (m *QueryPostsRequest) Unmarshal(dAtA []byte) error
func (*QueryPostsRequest) XXX_DiscardUnknown ¶
func (m *QueryPostsRequest) XXX_DiscardUnknown()
func (*QueryPostsRequest) XXX_Marshal ¶
func (m *QueryPostsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPostsRequest) XXX_Merge ¶
func (m *QueryPostsRequest) XXX_Merge(src proto.Message)
func (*QueryPostsRequest) XXX_Size ¶
func (m *QueryPostsRequest) XXX_Size() int
func (*QueryPostsRequest) XXX_Unmarshal ¶
func (m *QueryPostsRequest) XXX_Unmarshal(b []byte) error
type QueryPostsResponse ¶
type QueryPostsResponse struct {
Posts []Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts"`
}
func (*QueryPostsResponse) Descriptor ¶
func (*QueryPostsResponse) Descriptor() ([]byte, []int)
func (*QueryPostsResponse) GetPosts ¶
func (m *QueryPostsResponse) GetPosts() []Post
func (*QueryPostsResponse) Marshal ¶
func (m *QueryPostsResponse) Marshal() (dAtA []byte, err error)
func (*QueryPostsResponse) MarshalTo ¶
func (m *QueryPostsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPostsResponse) MarshalToSizedBuffer ¶
func (m *QueryPostsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPostsResponse) ProtoMessage ¶
func (*QueryPostsResponse) ProtoMessage()
func (*QueryPostsResponse) Reset ¶
func (m *QueryPostsResponse) Reset()
func (*QueryPostsResponse) Size ¶
func (m *QueryPostsResponse) Size() (n int)
func (*QueryPostsResponse) String ¶
func (m *QueryPostsResponse) String() string
func (*QueryPostsResponse) Unmarshal ¶
func (m *QueryPostsResponse) Unmarshal(dAtA []byte) error
func (*QueryPostsResponse) XXX_DiscardUnknown ¶
func (m *QueryPostsResponse) XXX_DiscardUnknown()
func (*QueryPostsResponse) XXX_Marshal ¶
func (m *QueryPostsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPostsResponse) XXX_Merge ¶
func (m *QueryPostsResponse) XXX_Merge(src proto.Message)
func (*QueryPostsResponse) XXX_Size ¶
func (m *QueryPostsResponse) XXX_Size() int
func (*QueryPostsResponse) XXX_Unmarshal ¶
func (m *QueryPostsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) Posts(context.Context, *QueryPostsRequest) (*QueryPostsResponse, error) Post(context.Context, *QueryPostRequest) (*QueryPostResponse, error) Upvotes(context.Context, *QueryUpvotesRequest) (*QueryUpvotesResponse, error) }
QueryServer is the server API for Query service.
type QueryUpvotesRequest ¶
type QueryUpvotesRequest struct { VendorId uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id,omitempty"` PostId string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` }
func (*QueryUpvotesRequest) Descriptor ¶
func (*QueryUpvotesRequest) Descriptor() ([]byte, []int)
func (*QueryUpvotesRequest) Marshal ¶
func (m *QueryUpvotesRequest) Marshal() (dAtA []byte, err error)
func (*QueryUpvotesRequest) MarshalTo ¶
func (m *QueryUpvotesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryUpvotesRequest) MarshalToSizedBuffer ¶
func (m *QueryUpvotesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryUpvotesRequest) ProtoMessage ¶
func (*QueryUpvotesRequest) ProtoMessage()
func (*QueryUpvotesRequest) Reset ¶
func (m *QueryUpvotesRequest) Reset()
func (*QueryUpvotesRequest) Size ¶
func (m *QueryUpvotesRequest) Size() (n int)
func (*QueryUpvotesRequest) String ¶
func (m *QueryUpvotesRequest) String() string
func (*QueryUpvotesRequest) Unmarshal ¶
func (m *QueryUpvotesRequest) Unmarshal(dAtA []byte) error
func (*QueryUpvotesRequest) XXX_DiscardUnknown ¶
func (m *QueryUpvotesRequest) XXX_DiscardUnknown()
func (*QueryUpvotesRequest) XXX_Marshal ¶
func (m *QueryUpvotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryUpvotesRequest) XXX_Merge ¶
func (m *QueryUpvotesRequest) XXX_Merge(src proto.Message)
func (*QueryUpvotesRequest) XXX_Size ¶
func (m *QueryUpvotesRequest) XXX_Size() int
func (*QueryUpvotesRequest) XXX_Unmarshal ¶
func (m *QueryUpvotesRequest) XXX_Unmarshal(b []byte) error
type QueryUpvotesResponse ¶
type QueryUpvotesResponse struct {
Upvotes []Upvote `protobuf:"bytes,1,rep,name=upvotes,proto3" json:"upvotes"`
}
func (*QueryUpvotesResponse) Descriptor ¶
func (*QueryUpvotesResponse) Descriptor() ([]byte, []int)
func (*QueryUpvotesResponse) GetUpvotes ¶
func (m *QueryUpvotesResponse) GetUpvotes() []Upvote
func (*QueryUpvotesResponse) Marshal ¶
func (m *QueryUpvotesResponse) Marshal() (dAtA []byte, err error)
func (*QueryUpvotesResponse) MarshalTo ¶
func (m *QueryUpvotesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryUpvotesResponse) MarshalToSizedBuffer ¶
func (m *QueryUpvotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryUpvotesResponse) ProtoMessage ¶
func (*QueryUpvotesResponse) ProtoMessage()
func (*QueryUpvotesResponse) Reset ¶
func (m *QueryUpvotesResponse) Reset()
func (*QueryUpvotesResponse) Size ¶
func (m *QueryUpvotesResponse) Size() (n int)
func (*QueryUpvotesResponse) String ¶
func (m *QueryUpvotesResponse) String() string
func (*QueryUpvotesResponse) Unmarshal ¶
func (m *QueryUpvotesResponse) Unmarshal(dAtA []byte) error
func (*QueryUpvotesResponse) XXX_DiscardUnknown ¶
func (m *QueryUpvotesResponse) XXX_DiscardUnknown()
func (*QueryUpvotesResponse) XXX_Marshal ¶
func (m *QueryUpvotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryUpvotesResponse) XXX_Merge ¶
func (m *QueryUpvotesResponse) XXX_Merge(src proto.Message)
func (*QueryUpvotesResponse) XXX_Size ¶
func (m *QueryUpvotesResponse) XXX_Size() int
func (*QueryUpvotesResponse) XXX_Unmarshal ¶
func (m *QueryUpvotesResponse) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Post ¶
func (*UnimplementedMsgServer) Post(ctx context.Context, req *MsgPost) (*MsgPostResponse, error)
func (*UnimplementedMsgServer) Upvote ¶
func (*UnimplementedMsgServer) Upvote(ctx context.Context, req *MsgUpvote) (*MsgUpvoteResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Post ¶
func (*UnimplementedQueryServer) Post(ctx context.Context, req *QueryPostRequest) (*QueryPostResponse, error)
func (*UnimplementedQueryServer) Posts ¶
func (*UnimplementedQueryServer) Posts(ctx context.Context, req *QueryPostsRequest) (*QueryPostsResponse, error)
func (*UnimplementedQueryServer) Upvotes ¶
func (*UnimplementedQueryServer) Upvotes(ctx context.Context, req *QueryUpvotesRequest) (*QueryUpvotesResponse, error)
type Upvote ¶
type Upvote struct { VendorID uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id" yaml:"vendor_id"` PostID PostID `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3,customtype=PostID" json:"post_id" yaml:"post_id"` Curator string `protobuf:"bytes,3,opt,name=curator,proto3" json:"curator,omitempty" yaml:"curator"` RewardAccount string `protobuf:"bytes,4,opt,name=reward_account,json=rewardAccount,proto3" json:"reward_account,omitempty" yaml:"reward_account"` VoteAmount types.Coin `protobuf:"bytes,5,opt,name=vote_amount,json=voteAmount,proto3" json:"vote_amount"` CuratedTime time.Time `protobuf:"bytes,6,opt,name=curated_time,json=curatedTime,proto3,stdtime" json:"curated_time" yaml:"curated_time"` VoteNum int32 `protobuf:"varint,7,opt,name=vote_num,json=voteNum,proto3" json:"vote_num" yaml:"vote_num"` UpdatedTime time.Time `protobuf:"bytes,8,opt,name=updated_time,json=updatedTime,proto3,stdtime" json:"updated_time" yaml:"updated_time"` }
func NewUpvote ¶
func NewUpvote( vendorID uint32, postID PostID, curator, rewardAccount sdk.AccAddress, voteNum int32, voteAmount sdk.Coin, curatedTime time.Time, updatedTime time.Time) Upvote
NewUpvote fills and Upvote struct
func (*Upvote) Descriptor ¶
func (*Upvote) GetCuratedTime ¶
func (*Upvote) GetCurator ¶
func (*Upvote) GetRewardAccount ¶
func (*Upvote) GetUpdatedTime ¶ added in v0.7.0
func (*Upvote) GetVendorID ¶
func (*Upvote) GetVoteAmount ¶
func (*Upvote) GetVoteNum ¶ added in v0.7.0
func (*Upvote) MarshalToSizedBuffer ¶
func (*Upvote) ProtoMessage ¶
func (*Upvote) ProtoMessage()
func (*Upvote) XXX_DiscardUnknown ¶
func (m *Upvote) XXX_DiscardUnknown()
func (*Upvote) XXX_Marshal ¶
func (*Upvote) XXX_Unmarshal ¶
type VPPair ¶
type VPPair struct { VendorID uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id" yaml:"vendor_id"` PostID PostID `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3,customtype=PostID" json:"post_id" yaml:"post_id"` }
VPPair is struct that just has a vendor_id, post_id pair with no other data. It is intended to be used as a marshalable pointer. For example, a VPPair can be used to construct the key to getting an Upvote from state.
func (*VPPair) Descriptor ¶
func (*VPPair) GetVendorID ¶
func (*VPPair) MarshalToSizedBuffer ¶
func (*VPPair) ProtoMessage ¶
func (*VPPair) ProtoMessage()
func (*VPPair) XXX_DiscardUnknown ¶
func (m *VPPair) XXX_DiscardUnknown()
func (*VPPair) XXX_Marshal ¶
func (*VPPair) XXX_Unmarshal ¶
type VPPairs ¶
type VPPairs struct {
Pairs []VPPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"`
}
VPPairs defines an array of VPPair objects.
func (*VPPairs) Descriptor ¶
func (*VPPairs) MarshalToSizedBuffer ¶
func (*VPPairs) ProtoMessage ¶
func (*VPPairs) ProtoMessage()
func (*VPPairs) XXX_DiscardUnknown ¶
func (m *VPPairs) XXX_DiscardUnknown()