Documentation ¶
Index ¶
- Variables
- type Codec
- type CodecContent
- func (*CodecContent) Descriptor() ([]byte, []int)
- func (this *CodecContent) Equal(that interface{}) bool
- func (this *CodecContent) GetContent() github_com_KuChain_io_kuchain_x_gov_types.Content
- func (m *CodecContent) GetParameterChange() *proposal.ParameterChangeProposal
- func (m *CodecContent) GetSum() isCodecContent_Sum
- func (m *CodecContent) GetText() *types.TextProposal
- func (m *CodecContent) Marshal() (dAtA []byte, err error)
- func (m *CodecContent) MarshalTo(dAtA []byte) (int, error)
- func (m *CodecContent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CodecContent) ProtoMessage()
- func (m *CodecContent) Reset()
- func (this *CodecContent) SetContent(value github_com_KuChain_io_kuchain_x_gov_types.Content) error
- func (m *CodecContent) Size() (n int)
- func (m *CodecContent) String() string
- func (m *CodecContent) Unmarshal(dAtA []byte) error
- func (m *CodecContent) XXX_DiscardUnknown()
- func (m *CodecContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CodecContent) XXX_Merge(src proto.Message)
- func (*CodecContent) XXX_OneofWrappers() []interface{}
- func (m *CodecContent) XXX_Size() int
- func (m *CodecContent) XXX_Unmarshal(b []byte) error
- type CodecContent_ParameterChange
- type CodecContent_Text
- type CodecMsgSubmitProposal
- func (*CodecMsgSubmitProposal) Descriptor() ([]byte, []int)
- func (this *CodecMsgSubmitProposal) Equal(that interface{}) bool
- func (m *CodecMsgSubmitProposal) Marshal() (dAtA []byte, err error)
- func (m *CodecMsgSubmitProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *CodecMsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CodecMsgSubmitProposal) ProtoMessage()
- func (m *CodecMsgSubmitProposal) Reset()
- func (m *CodecMsgSubmitProposal) Size() (n int)
- func (m *CodecMsgSubmitProposal) String() string
- func (m *CodecMsgSubmitProposal) Unmarshal(dAtA []byte) error
- func (m *CodecMsgSubmitProposal) XXX_DiscardUnknown()
- func (m *CodecMsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CodecMsgSubmitProposal) XXX_Merge(src proto.Message)
- func (m *CodecMsgSubmitProposal) XXX_Size() int
- func (m *CodecMsgSubmitProposal) XXX_Unmarshal(b []byte) error
- type CodecProposal
- func (*CodecProposal) Descriptor() ([]byte, []int)
- func (this *CodecProposal) Equal(that interface{}) bool
- func (m *CodecProposal) GetContent() CodecContent
- func (m *CodecProposal) Marshal() (dAtA []byte, err error)
- func (m *CodecProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *CodecProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CodecProposal) ProtoMessage()
- func (m *CodecProposal) Reset()
- func (m *CodecProposal) Size() (n int)
- func (m *CodecProposal) String() string
- func (m *CodecProposal) Unmarshal(dAtA []byte) error
- func (m *CodecProposal) XXX_DiscardUnknown()
- func (m *CodecProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CodecProposal) XXX_Merge(src proto.Message)
- func (m *CodecProposal) XXX_Size() int
- func (m *CodecProposal) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthCodec = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCodec = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupCodec = fmt.Errorf("proto: unexpected end of group") )
View Source
var (
Gov_Cdc = NewGovCodec(gov.Amino)
)
Functions ¶
This section is empty.
Types ¶
type Codec ¶
func NewAppCodec ¶
func NewGovCodec ¶
func (*Codec) MarshalProposal ¶
MarshalProposal marshals a Proposal. It accepts a Proposal defined by the x/gov module and uses the application-level Proposal type which has the concrete Content implementation to serialize.
type CodecContent ¶
type CodecContent struct { // sum defines a set of all acceptable concrete governance proposal Content types. // // Types that are valid to be assigned to Sum: // *CodecContent_Text // *CodecContent_ParameterChange Sum isCodecContent_Sum `protobuf_oneof:"sum"` }
Content defines the application-level allowed Content to be included in a governance proposal.
func (*CodecContent) Descriptor ¶
func (*CodecContent) Descriptor() ([]byte, []int)
func (*CodecContent) Equal ¶
func (this *CodecContent) Equal(that interface{}) bool
func (*CodecContent) GetContent ¶
func (this *CodecContent) GetContent() github_com_KuChain_io_kuchain_x_gov_types.Content
func (*CodecContent) GetParameterChange ¶
func (m *CodecContent) GetParameterChange() *proposal.ParameterChangeProposal
func (*CodecContent) GetSum ¶
func (m *CodecContent) GetSum() isCodecContent_Sum
func (*CodecContent) GetText ¶
func (m *CodecContent) GetText() *types.TextProposal
func (*CodecContent) Marshal ¶
func (m *CodecContent) Marshal() (dAtA []byte, err error)
func (*CodecContent) MarshalToSizedBuffer ¶
func (m *CodecContent) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CodecContent) ProtoMessage ¶
func (*CodecContent) ProtoMessage()
func (*CodecContent) Reset ¶
func (m *CodecContent) Reset()
func (*CodecContent) SetContent ¶
func (this *CodecContent) SetContent(value github_com_KuChain_io_kuchain_x_gov_types.Content) error
func (*CodecContent) Size ¶
func (m *CodecContent) Size() (n int)
func (*CodecContent) String ¶
func (m *CodecContent) String() string
func (*CodecContent) Unmarshal ¶
func (m *CodecContent) Unmarshal(dAtA []byte) error
func (*CodecContent) XXX_DiscardUnknown ¶
func (m *CodecContent) XXX_DiscardUnknown()
func (*CodecContent) XXX_Marshal ¶
func (m *CodecContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CodecContent) XXX_Merge ¶
func (m *CodecContent) XXX_Merge(src proto.Message)
func (*CodecContent) XXX_OneofWrappers ¶
func (*CodecContent) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*CodecContent) XXX_Size ¶
func (m *CodecContent) XXX_Size() int
func (*CodecContent) XXX_Unmarshal ¶
func (m *CodecContent) XXX_Unmarshal(b []byte) error
type CodecContent_ParameterChange ¶
type CodecContent_ParameterChange struct {
ParameterChange *proposal.ParameterChangeProposal `protobuf:"bytes,2,opt,name=parameter_change,json=parameterChange,proto3,oneof" json:"parameter_change,omitempty"`
}
func (*CodecContent_ParameterChange) Equal ¶
func (this *CodecContent_ParameterChange) Equal(that interface{}) bool
func (*CodecContent_ParameterChange) MarshalTo ¶
func (m *CodecContent_ParameterChange) MarshalTo(dAtA []byte) (int, error)
func (*CodecContent_ParameterChange) MarshalToSizedBuffer ¶
func (m *CodecContent_ParameterChange) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CodecContent_ParameterChange) Size ¶
func (m *CodecContent_ParameterChange) Size() (n int)
type CodecContent_Text ¶
type CodecContent_Text struct {
Text *types.TextProposal `protobuf:"bytes,1,opt,name=text,proto3,oneof" json:"text,omitempty"`
}
func (*CodecContent_Text) Equal ¶
func (this *CodecContent_Text) Equal(that interface{}) bool
func (*CodecContent_Text) MarshalTo ¶
func (m *CodecContent_Text) MarshalTo(dAtA []byte) (int, error)
func (*CodecContent_Text) MarshalToSizedBuffer ¶
func (m *CodecContent_Text) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CodecContent_Text) Size ¶
func (m *CodecContent_Text) Size() (n int)
type CodecMsgSubmitProposal ¶
type CodecMsgSubmitProposal struct { types.MsgSubmitProposalBase `protobuf:"bytes,1,opt,name=base,proto3,embedded=base" json:"base"` Content *CodecContent `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` }
MsgSubmitProposal defines the application-level message type for handling governance proposals.
func (*CodecMsgSubmitProposal) Descriptor ¶
func (*CodecMsgSubmitProposal) Descriptor() ([]byte, []int)
func (*CodecMsgSubmitProposal) Equal ¶
func (this *CodecMsgSubmitProposal) Equal(that interface{}) bool
func (*CodecMsgSubmitProposal) Marshal ¶
func (m *CodecMsgSubmitProposal) Marshal() (dAtA []byte, err error)
func (*CodecMsgSubmitProposal) MarshalTo ¶
func (m *CodecMsgSubmitProposal) MarshalTo(dAtA []byte) (int, error)
func (*CodecMsgSubmitProposal) MarshalToSizedBuffer ¶
func (m *CodecMsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CodecMsgSubmitProposal) ProtoMessage ¶
func (*CodecMsgSubmitProposal) ProtoMessage()
func (*CodecMsgSubmitProposal) Reset ¶
func (m *CodecMsgSubmitProposal) Reset()
func (*CodecMsgSubmitProposal) Size ¶
func (m *CodecMsgSubmitProposal) Size() (n int)
func (*CodecMsgSubmitProposal) String ¶
func (m *CodecMsgSubmitProposal) String() string
func (*CodecMsgSubmitProposal) Unmarshal ¶
func (m *CodecMsgSubmitProposal) Unmarshal(dAtA []byte) error
func (*CodecMsgSubmitProposal) XXX_DiscardUnknown ¶
func (m *CodecMsgSubmitProposal) XXX_DiscardUnknown()
func (*CodecMsgSubmitProposal) XXX_Marshal ¶
func (m *CodecMsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CodecMsgSubmitProposal) XXX_Merge ¶
func (m *CodecMsgSubmitProposal) XXX_Merge(src proto.Message)
func (*CodecMsgSubmitProposal) XXX_Size ¶
func (m *CodecMsgSubmitProposal) XXX_Size() int
func (*CodecMsgSubmitProposal) XXX_Unmarshal ¶
func (m *CodecMsgSubmitProposal) XXX_Unmarshal(b []byte) error
type CodecProposal ¶
type CodecProposal struct { types.ProposalBase `protobuf:"bytes,1,opt,name=base,proto3,embedded=base" json:"base"` Content CodecContent `protobuf:"bytes,2,opt,name=content,proto3" json:"content"` }
Proposal defines the application-level concrete proposal type used in governance proposals.
func (*CodecProposal) Descriptor ¶
func (*CodecProposal) Descriptor() ([]byte, []int)
func (*CodecProposal) Equal ¶
func (this *CodecProposal) Equal(that interface{}) bool
func (*CodecProposal) GetContent ¶
func (m *CodecProposal) GetContent() CodecContent
func (*CodecProposal) Marshal ¶
func (m *CodecProposal) Marshal() (dAtA []byte, err error)
func (*CodecProposal) MarshalToSizedBuffer ¶
func (m *CodecProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CodecProposal) ProtoMessage ¶
func (*CodecProposal) ProtoMessage()
func (*CodecProposal) Reset ¶
func (m *CodecProposal) Reset()
func (*CodecProposal) Size ¶
func (m *CodecProposal) Size() (n int)
func (*CodecProposal) String ¶
func (m *CodecProposal) String() string
func (*CodecProposal) Unmarshal ¶
func (m *CodecProposal) Unmarshal(dAtA []byte) error
func (*CodecProposal) XXX_DiscardUnknown ¶
func (m *CodecProposal) XXX_DiscardUnknown()
func (*CodecProposal) XXX_Marshal ¶
func (m *CodecProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CodecProposal) XXX_Merge ¶
func (m *CodecProposal) XXX_Merge(src proto.Message)
func (*CodecProposal) XXX_Size ¶
func (m *CodecProposal) XXX_Size() int
func (*CodecProposal) XXX_Unmarshal ¶
func (m *CodecProposal) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.