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 DelegateParam
- type DelegateStatus
- type FuncsToRoleParam
- type InitContractAdminParam
- type OntIDsToRoleParam
- 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 ¶ added in v1.8.0
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 ¶ added in v1.8.1
func (this *AuthToken) Deserialization(source *common.ZeroCopySource) error
func (*AuthToken) Serialization ¶ added in v1.8.1
func (this *AuthToken) 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 ¶ added in v1.8.1
func (this *DelegateParam) Deserialization(source *common.ZeroCopySource) error
func (*DelegateParam) Serialization ¶ added in v1.8.1
func (this *DelegateParam) Serialization(sink *common.ZeroCopySink)
type DelegateStatus ¶
type DelegateStatus struct { AuthToken // contains filtered or unexported fields }
func (*DelegateStatus) Deserialization ¶ added in v1.8.1
func (this *DelegateStatus) Deserialization(source *common.ZeroCopySource) error
func (*DelegateStatus) Serialization ¶ added in v1.8.1
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 ¶ added in v1.8.1
func (this *FuncsToRoleParam) Deserialization(source *common.ZeroCopySource) error
func (*FuncsToRoleParam) Serialization ¶ added in v1.8.1
func (this *FuncsToRoleParam) Serialization(sink *common.ZeroCopySink)
type InitContractAdminParam ¶
type InitContractAdminParam struct {
AdminOntID []byte
}
**********************************************
func (*InitContractAdminParam) Deserialization ¶ added in v1.8.1
func (this *InitContractAdminParam) Deserialization(source *common.ZeroCopySource) error
func (*InitContractAdminParam) Serialization ¶ added in v1.8.1
func (this *InitContractAdminParam) Serialization(sink *common.ZeroCopySink)
type OntIDsToRoleParam ¶
type OntIDsToRoleParam struct { ContractAddr common.Address AdminOntID []byte Role []byte Persons [][]byte KeyNo uint64 }
func (*OntIDsToRoleParam) Deserialization ¶ added in v1.8.1
func (this *OntIDsToRoleParam) Deserialization(source *common.ZeroCopySource) error
func (*OntIDsToRoleParam) Serialization ¶ added in v1.8.1
func (this *OntIDsToRoleParam) Serialization(sink *common.ZeroCopySink)
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
func (*Status) Deserialization ¶ added in v1.8.1
func (this *Status) Deserialization(source *common.ZeroCopySource) error
func (*Status) Serialization ¶ added in v1.8.1
func (this *Status) Serialization(sink *common.ZeroCopySink)
type TransferParam ¶
**********************************************
func (*TransferParam) Deserialization ¶ added in v1.8.1
func (this *TransferParam) Deserialization(source *common.ZeroCopySource) error
func (*TransferParam) Serialization ¶ added in v1.8.1
func (this *TransferParam) Serialization(sink *common.ZeroCopySink)
type VerifyTokenParam ¶
func (*VerifyTokenParam) Deserialization ¶ added in v1.8.1
func (this *VerifyTokenParam) Deserialization(source *common.ZeroCopySource) error
func (*VerifyTokenParam) Serialization ¶ added in v1.8.1
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 ¶ added in v1.8.1
func (this *WithdrawParam) Deserialization(source *common.ZeroCopySource) error
func (*WithdrawParam) Serialization ¶ added in v1.8.1
func (this *WithdrawParam) Serialization(sink *common.ZeroCopySink)
Click to show internal directories.
Click to hide internal directories.