auth

package
v0.0.0-...-c05ccf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PreAdmin          = []byte{0x01}
	PreRoleFunc       = []byte{0x02}
	PreRoleToken      = []byte{0x03}
	PreDelegateStatus = []byte{0x04}
)

Functions

func AssignDnaIDsToRole

func AssignDnaIDsToRole(native *native.NativeService) ([]byte, error)

func AssignFuncsToRole

func AssignFuncsToRole(native *native.NativeService) ([]byte, error)

func Delegate

func Delegate(native *native.NativeService) ([]byte, error)

func Init

func Init()

func InitContractAdmin

func InitContractAdmin(native *native.NativeService) ([]byte, error)

func RegisterAuthContract

func RegisterAuthContract(native *native.NativeService)

func Transfer

func Transfer(native *native.NativeService) ([]byte, error)

func VerifyToken

func VerifyToken(native *native.NativeService) ([]byte, error)

func Withdraw

func Withdraw(native *native.NativeService) ([]byte, error)

Types

type AuthToken

type AuthToken struct {
	// contains filtered or unexported fields
}

func (*AuthToken) Deserialize

func (this *AuthToken) Deserialize(rd io.Reader) error

func (*AuthToken) Serialize

func (this *AuthToken) Serialize(w io.Writer) error

type DelegateParam

type DelegateParam struct {
	ContractAddr common.Address
	From         []byte
	To           []byte
	Role         []byte
	Period       uint64
	Level        uint64
	KeyNo        uint64
}

func (*DelegateParam) Deserialize

func (this *DelegateParam) Deserialize(rd io.Reader) error

func (*DelegateParam) Serialize

func (this *DelegateParam) Serialize(w io.Writer) error

type DelegateStatus

type DelegateStatus struct {
	AuthToken
	// contains filtered or unexported fields
}

func (*DelegateStatus) Deserialize

func (this *DelegateStatus) Deserialize(rd io.Reader) error

func (*DelegateStatus) Serialize

func (this *DelegateStatus) Serialize(w io.Writer) error

type FuncsToRoleParam

type FuncsToRoleParam struct {
	ContractAddr common.Address
	AdminOntID   []byte
	Role         []byte
	FuncNames    []string
	KeyNo        uint64
}

**********************************************

func (*FuncsToRoleParam) Deserialize

func (this *FuncsToRoleParam) Deserialize(rd io.Reader) error

func (*FuncsToRoleParam) Serialize

func (this *FuncsToRoleParam) Serialize(w io.Writer) error

type InitContractAdminParam

type InitContractAdminParam struct {
	AdminOntID []byte
}

**********************************************

func (*InitContractAdminParam) Deserialize

func (this *InitContractAdminParam) Deserialize(rd io.Reader) error

func (*InitContractAdminParam) Serialize

func (this *InitContractAdminParam) Serialize(w io.Writer) error

type OntIDsToRoleParam

type OntIDsToRoleParam struct {
	ContractAddr common.Address
	AdminOntID   []byte
	Role         []byte
	Persons      [][]byte
	KeyNo        uint64
}

func (*OntIDsToRoleParam) Deserialize

func (this *OntIDsToRoleParam) Deserialize(rd io.Reader) error

func (*OntIDsToRoleParam) Serialize

func (this *OntIDsToRoleParam) Serialize(w io.Writer) error

type Status

type Status struct {
	// contains filtered or unexported fields
}

func (*Status) Deserialize

func (this *Status) Deserialize(rd io.Reader) error

func (*Status) Serialize

func (this *Status) Serialize(w io.Writer) error

type TransferParam

type TransferParam struct {
	ContractAddr  common.Address
	NewAdminOntID []byte
	KeyNo         uint64
}

**********************************************

func (*TransferParam) Deserialize

func (this *TransferParam) Deserialize(rd io.Reader) error

func (*TransferParam) Serialize

func (this *TransferParam) Serialize(w io.Writer) error

type VerifyTokenParam

type VerifyTokenParam struct {
	ContractAddr common.Address
	Caller       []byte
	Fn           string
	KeyNo        uint64
}

func (*VerifyTokenParam) Deserialize

func (this *VerifyTokenParam) Deserialize(rd io.Reader) error

func (*VerifyTokenParam) Serialize

func (this *VerifyTokenParam) Serialize(w io.Writer) error

type WithdrawParam

type WithdrawParam struct {
	ContractAddr common.Address
	Initiator    []byte
	Delegate     []byte
	Role         []byte
	KeyNo        uint64
}

func (*WithdrawParam) Deserialize

func (this *WithdrawParam) Deserialize(rd io.Reader) error

func (*WithdrawParam) Serialize

func (this *WithdrawParam) Serialize(w io.Writer) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL