Documentation ¶
Index ¶
- type ProcessID
- func (p *ProcessID) Addr() common.Address
- func (p *ProcessID) CensusOrigin() models.CensusOrigin
- func (p *ProcessID) ChainID() string
- func (p *ProcessID) EnvelopeType() *models.EnvelopeType
- func (p *ProcessID) Marshal() []byte
- func (p *ProcessID) MarshalBinary() (data []byte, err error)
- func (p *ProcessID) Nonce() uint32
- func (p *ProcessID) SetAddr(addr common.Address)
- func (p *ProcessID) SetCensusOrigin(csOrg models.CensusOrigin) error
- func (p *ProcessID) SetChainID(chID string)
- func (p *ProcessID) SetEnvelopeType(et *models.EnvelopeType) error
- func (p *ProcessID) SetNonce(nonce uint32)
- func (p *ProcessID) String() string
- func (p *ProcessID) Unmarshal(pid []byte) error
- func (p *ProcessID) UnmarshalBinary(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcessID ¶
type ProcessID struct {
// contains filtered or unexported fields
}
ProcessID is a 32 bytes identifier that holds the following information about the voting process:
- chainID: a 6 bytes trunked hash of the blockchain identifier
- organization: hex address of the wallet creating the process
- census origin: kind of census used for the process (from protobuf models)
- envelope type: ballot properties configuration
- nonce: an incremental uint32 number
processID: 395b41cc9abcd8da6bf26964af9d7eed9e03e53415d37aa96045000600000001 represents chID:vocdoni-bizono addr:0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 pt:arbo nc:1
func BuildProcessID ¶
func (*ProcessID) CensusOrigin ¶
func (p *ProcessID) CensusOrigin() models.CensusOrigin
CensusOrigin returns the encoded census origin
func (*ProcessID) EnvelopeType ¶
func (p *ProcessID) EnvelopeType() *models.EnvelopeType
EnvelopeType returns the envelope type encoded into the process ID
func (*ProcessID) MarshalBinary ¶
MarshalBinary implements the BinaryMarshaler interface
func (*ProcessID) SetCensusOrigin ¶
func (p *ProcessID) SetCensusOrigin(csOrg models.CensusOrigin) error
SetCensusOrigin sets the census origin type
func (*ProcessID) SetChainID ¶
SetChainID sets the blockchain identifier
func (*ProcessID) SetEnvelopeType ¶
func (p *ProcessID) SetEnvelopeType(et *models.EnvelopeType) error
SetEnvelopeType sets the envelope type for the process
func (*ProcessID) UnmarshalBinary ¶
UnmarshalBinary implements the BinaryMarshaler interface