Documentation ¶
Index ¶
- func GenerateRandomSalt() string
- func GetPollPrivateDetailsSDK(s *SetupSDK, pollID string) (string, error)
- func GetPollSDK(s *SetupSDK, pollID string) (string, error)
- func GetVotePrivateDetailsHashSDK(s *SetupSDK, pollID, voterID string) (string, error)
- func GetVotePrivateDetailsSDK(s *SetupSDK, pollID, voterID string) (string, error)
- func GetVoteSDK(s *SetupSDK, pollID, voterID string) (string, error)
- func InitPollSDK(s *SetupSDK, PollID, Title, PollHash string) (string, error)
- func InitVoteSDK(s *SetupSDK, PollID string, VoterID string, VoterSex string, VoterAge string, ...) (string, error)
- func QueryAllPollsSDK(s *SetupSDK) (string, error)
- func QueryVotePrivateDetailsByPollSDK(s *SetupSDK, pollID string) ([]string, error)
- func QueryVotesByPollSDK(s *SetupSDK, pollID string) (string, error)
- func QueryVotesByVoterSDK(s *SetupSDK, voterID string) (string, error)
- func UpdatePollStatusSDK(s *SetupSDK, pollID, status string) (string, error)
- type SetupSDK
- func (s *SetupSDK) AdminSetup() error
- func (s *SetupSDK) ChainCodeInstallationInstantiation(ccID string) error
- func (s *SetupSDK) CloseSDK()
- func (s *SetupSDK) CreateChannelClient(clientContext context.ChannelProvider) (*channel.Client, error)
- func (s *SetupSDK) CreateEventClient(clientContext context.ChannelProvider, eventID string) (*event.Client, fab.Registration, <-chan *fab.CCEvent, error)
- func (s *SetupSDK) Initialization() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomSalt ¶
func GenerateRandomSalt() string
func GetPollPrivateDetailsSDK ¶
read private details of vote using SDK
func GetVotePrivateDetailsHashSDK ¶
get the private data hash of a vote
func GetVotePrivateDetailsSDK ¶
read private details of vote using SDK
func GetVoteSDK ¶
read entry on chaincode using SDK
func InitPollSDK ¶
add entry of poll using SDK
func InitVoteSDK ¶
func InitVoteSDK(s *SetupSDK, PollID string, VoterID string, VoterSex string, VoterAge string, VoteHash string) (string, error)
add entry using SDK
func QueryAllPollsSDK ¶
retrieve all poll objects in state database
func QueryVotePrivateDetailsByPollSDK ¶
query the private details of a vote by poll
func QueryVotesByPollSDK ¶
query votes of a particular poll
func QueryVotesByVoterSDK ¶
query votes of a particular poll
Types ¶
type SetupSDK ¶
type SetupSDK struct { ConfigFile string OrgID string OrdererID string ChannelID string ChannelConfig string ChaincodeGoPath string ChaincodePath map[string]string OrgAdmin string OrgName string UserName string Client *channel.Client Mgmt *resmgmt.Client Fsdk *fabsdk.FabricSDK Event *event.Client MgmtIdentity msp.SigningIdentity // contains filtered or unexported fields }
FabricSetup implementation
func (*SetupSDK) AdminSetup ¶
func (*SetupSDK) ChainCodeInstallationInstantiation ¶
Installs and instantiates chaincode
func (*SetupSDK) CreateChannelClient ¶
func (*SetupSDK) CreateEventClient ¶
func (*SetupSDK) Initialization ¶
Initialization setups new sdk
Click to show internal directories.
Click to hide internal directories.