Documentation ¶
Index ¶
- type FabricSetup
- func (setup *FabricSetup) CloseSDK()
- func (s *FabricSetup) EnrollUser(email, password string) error
- func (setup *FabricSetup) Initialize() error
- func (setup *FabricSetup) InstallAndInstantiateCC() error
- func (s *FabricSetup) LoginUser(email, password string) (*FabricUser, error)
- func (s *FabricSetup) ReEnrollUser(email string) error
- func (s *FabricSetup) RegisterUser(name, email, company, occupation, salary, password, userType string) (*FabricUser, error)
- func (s *FabricSetup) RegisterWithCA(email, password, userType string) error
- func (s *FabricSetup) SessionUser() (*FabricUser, error)
- func (s *FabricSetup) TestM()
- type FabricUser
- func (s *FabricUser) ChangePassword(email, userType, oldPwd, newPwd string) error
- func (user *FabricUser) DeleteUserFromLedger(emailValue string) error
- func (user *FabricUser) ExecuteTranctionEvent(eventID, fcnName string, args [][]byte) (*channel.Response, error)
- func (user *FabricUser) GetAllUsersFromLedger() ([]model.UserData, error)
- func (user *FabricUser) GetUserFromLedger(emailValue string) (*model.UserData, error)
- func (s *FabricUser) Logout()
- func (s *FabricUser) RemoveUser(email string) error
- func (s *FabricUser) RemoveUserFromCA(email string) error
- func (s *FabricUser) RevokeUser(email string) error
- func (u *FabricUser) UpdateUserData(userId, name, email, company, occupation, salary, userType string) error
- func (user *FabricUser) UpdateUserDataFromLedger(userId, name, email, company, occupation, salary, userType string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FabricSetup ¶
type FabricSetup struct { // Network parameters OrdererID string // Channel parameters ChannelID string ChannelConfig string // Chaincode parameters ChaincodeID string ChaincodeGoPath string ChaincodePath string OrgAdmin string OrgName string ConfigFile string // CA parameters CaID string CaClient *caMsp.Client // contains filtered or unexported fields }
FabricSetup implementation
func (*FabricSetup) CloseSDK ¶
func (setup *FabricSetup) CloseSDK()
func (*FabricSetup) EnrollUser ¶
func (s *FabricSetup) EnrollUser(email, password string) error
func (*FabricSetup) Initialize ¶
func (setup *FabricSetup) Initialize() error
Initialize reads the configuration file and sets up the client, chain and event hub
func (*FabricSetup) InstallAndInstantiateCC ¶
func (setup *FabricSetup) InstallAndInstantiateCC() error
func (*FabricSetup) LoginUser ¶
func (s *FabricSetup) LoginUser(email, password string) (*FabricUser, error)
func (*FabricSetup) ReEnrollUser ¶
func (s *FabricSetup) ReEnrollUser(email string) error
func (*FabricSetup) RegisterUser ¶
func (s *FabricSetup) RegisterUser(name, email, company, occupation, salary, password, userType string) (*FabricUser, error)
func (*FabricSetup) RegisterWithCA ¶
func (s *FabricSetup) RegisterWithCA(email, password, userType string) error
func (*FabricSetup) SessionUser ¶
func (s *FabricSetup) SessionUser() (*FabricUser, error)
func (*FabricSetup) TestM ¶
func (s *FabricSetup) TestM()
type FabricUser ¶
type FabricUser struct { Username string Fabric *FabricSetup SigningIdentity msp.SigningIdentity ChannelClient *channel.Client }
FabricUser struct that allow a registered user to query and invoke the blockchain
func (*FabricUser) ChangePassword ¶
func (s *FabricUser) ChangePassword(email, userType, oldPwd, newPwd string) error
func (*FabricUser) DeleteUserFromLedger ¶
func (user *FabricUser) DeleteUserFromLedger(emailValue string) error
func (*FabricUser) ExecuteTranctionEvent ¶
func (*FabricUser) GetAllUsersFromLedger ¶
func (user *FabricUser) GetAllUsersFromLedger() ([]model.UserData, error)
func (*FabricUser) GetUserFromLedger ¶
func (user *FabricUser) GetUserFromLedger(emailValue string) (*model.UserData, error)
func (*FabricUser) Logout ¶
func (s *FabricUser) Logout()
func (*FabricUser) RemoveUser ¶
func (s *FabricUser) RemoveUser(email string) error
func (*FabricUser) RemoveUserFromCA ¶
func (s *FabricUser) RemoveUserFromCA(email string) error
func (*FabricUser) RevokeUser ¶
func (s *FabricUser) RevokeUser(email string) error
func (*FabricUser) UpdateUserData ¶
func (u *FabricUser) UpdateUserData(userId, name, email, company, occupation, salary, userType string) error
func (*FabricUser) UpdateUserDataFromLedger ¶
func (user *FabricUser) UpdateUserDataFromLedger(userId, name, email, company, occupation, salary, userType string) error
Click to show internal directories.
Click to hide internal directories.