Documentation
¶
Index ¶
- Variables
- func AssignFuncsToRole(native *native.NativeService) ([]byte, error)
- func AssignOntIDsToRole(native *native.NativeService) ([]byte, error)
- func Delegate(native *native.NativeService) ([]byte, error)
- func Init()
- func InitContractAdmin(native *native.NativeService) ([]byte, error)
- func RegisterAuthContract(native *native.NativeService)
- func StringsDedupAndSort(s []string) []string
- func Transfer(native *native.NativeService) ([]byte, error)
- func VerifyToken(native *native.NativeService) ([]byte, error)
- func Withdraw(native *native.NativeService) ([]byte, error)
- type AuthToken
- type DIDsToRoleParam
- type DelegateParam
- type DelegateStatus
- type FuncsToRoleParam
- type InitContractAdminParam
- type Status
- type TransferParam
- type VerifyTokenParam
- type WithdrawParam
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PreAdmin = []byte{0x01} PreRoleFunc = []byte{0x02} PreRoleToken = []byte{0x03} PreDelegateStatus = []byte{0x04} )
Functions ¶
func AssignFuncsToRole ¶
func AssignFuncsToRole(native *native.NativeService) ([]byte, error)
func AssignOntIDsToRole ¶
func AssignOntIDsToRole(native *native.NativeService) ([]byte, error)
func InitContractAdmin ¶
func InitContractAdmin(native *native.NativeService) ([]byte, error)
func RegisterAuthContract ¶
func RegisterAuthContract(native *native.NativeService)
func StringsDedupAndSort ¶
remove duplicates in the slice of string and sorts the slice in increasing order.
func VerifyToken ¶
func VerifyToken(native *native.NativeService) ([]byte, error)
Types ¶
type AuthToken ¶
type AuthToken struct {
// contains filtered or unexported fields
}
func (*AuthToken) Deserialization ¶
func (this *AuthToken) Deserialization(source *common.ZeroCopySource) error
func (*AuthToken) Serialization ¶
func (this *AuthToken) Serialization(sink *common.ZeroCopySink)
type DIDsToRoleParam ¶
type DIDsToRoleParam struct {
ContractAddr common.Address
AdminOntID []byte
Role []byte
Persons [][]byte
KeyNo uint64
}
func (*DIDsToRoleParam) Deserialization ¶
func (this *DIDsToRoleParam) Deserialization(source *common.ZeroCopySource) error
func (*DIDsToRoleParam) Serialization ¶
func (this *DIDsToRoleParam) Serialization(sink *common.ZeroCopySink)
type DelegateParam ¶
type DelegateParam struct {
ContractAddr common.Address
From []byte
To []byte
Role []byte
Period uint64
Level uint64
KeyNo uint64
}
func (*DelegateParam) Deserialization ¶
func (this *DelegateParam) Deserialization(source *common.ZeroCopySource) error
func (*DelegateParam) Serialization ¶
func (this *DelegateParam) Serialization(sink *common.ZeroCopySink)
type DelegateStatus ¶
type DelegateStatus struct {
AuthToken
// contains filtered or unexported fields
}
func (*DelegateStatus) Deserialization ¶
func (this *DelegateStatus) Deserialization(source *common.ZeroCopySource) error
func (*DelegateStatus) Serialization ¶
func (this *DelegateStatus) Serialization(sink *common.ZeroCopySink)
type FuncsToRoleParam ¶
type FuncsToRoleParam struct {
ContractAddr common.Address
AdminOntID []byte
Role []byte
FuncNames []string
KeyNo uint64
}
**********************************************
func (*FuncsToRoleParam) Deserialization ¶
func (this *FuncsToRoleParam) Deserialization(source *common.ZeroCopySource) error
func (*FuncsToRoleParam) Serialization ¶
func (this *FuncsToRoleParam) Serialization(sink *common.ZeroCopySink)
type InitContractAdminParam ¶
type InitContractAdminParam struct {
AdminOntID []byte
}
**********************************************
func (*InitContractAdminParam) Deserialization ¶
func (this *InitContractAdminParam) Deserialization(source *common.ZeroCopySource) error
func (*InitContractAdminParam) Serialization ¶
func (this *InitContractAdminParam) Serialization(sink *common.ZeroCopySink)
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
func (*Status) Deserialization ¶
func (this *Status) Deserialization(source *common.ZeroCopySource) error
func (*Status) Serialization ¶
func (this *Status) Serialization(sink *common.ZeroCopySink)
type TransferParam ¶
**********************************************
func (*TransferParam) Deserialization ¶
func (this *TransferParam) Deserialization(source *common.ZeroCopySource) error
func (*TransferParam) Serialization ¶
func (this *TransferParam) Serialization(sink *common.ZeroCopySink)
type VerifyTokenParam ¶
func (*VerifyTokenParam) Deserialization ¶
func (this *VerifyTokenParam) Deserialization(source *common.ZeroCopySource) error
func (*VerifyTokenParam) Serialization ¶
func (this *VerifyTokenParam) Serialization(sink *common.ZeroCopySink)
type WithdrawParam ¶
type WithdrawParam struct {
ContractAddr common.Address
Initiator []byte
Delegate []byte
Role []byte
KeyNo uint64
}
func (*WithdrawParam) Deserialization ¶
func (this *WithdrawParam) Deserialization(source *common.ZeroCopySource) error
func (*WithdrawParam) Serialization ¶
func (this *WithdrawParam) Serialization(sink *common.ZeroCopySink)
Click to show internal directories.
Click to hide internal directories.