Documentation
¶
Index ¶
- type JSON
- type User
- func (u *User) EnrollmentCertificate() []byte
- func (u *User) GenerateTcerts(count int, attributes []string)
- func (u *User) Identity() ([]byte, error)
- func (u *User) MspID() string
- func (u *User) Name() string
- func (u *User) PrivateKey() apicryptosuite.Key
- func (u *User) Roles() []string
- func (u *User) SetEnrollmentCertificate(cert []byte)
- func (u *User) SetMspID(mspID string)
- func (u *User) SetPrivateKey(privateKey apicryptosuite.Key)
- func (u *User) SetRoles(roles []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
User represents a Fabric user registered at an MSP
func NewUser ¶
NewUser Constructor for a user. @param {string} name - The user name @param {string} mspID - The mspID for this user @returns {ca.User} new user
func (*User) EnrollmentCertificate ¶
EnrollmentCertificate Returns the underlying ECert representing this user’s identity.
func (*User) GenerateTcerts ¶
GenerateTcerts Gets a batch of TCerts to use for transaction. there is a 1-to-1 relationship between TCert and Transaction. The TCert can be generated locally by the SDK using the user’s crypto materials. @param {int} count how many in the batch to obtain @param {[]string} attributes list of attributes to include in the TCert @return {[]tcert} An array of TCerts
func (*User) PrivateKey ¶
func (u *User) PrivateKey() apicryptosuite.Key
PrivateKey returns the crypto suite representation of the private key
func (*User) SetEnrollmentCertificate ¶
SetEnrollmentCertificate Set the user’s Enrollment Certificate.
func (*User) SetPrivateKey ¶
func (u *User) SetPrivateKey(privateKey apicryptosuite.Key)
SetPrivateKey sets the crypto suite representation of the private key for this user