types

package
v1.68.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TyUnknowAction = iota + 100
	TyRegisterAction
	TyResetAction
	TyTransferAction
	TySuperviseAction
	TyApplyAction

	NameRegisterAction  = "Register"
	NameResetAction     = "ResetKey"
	NameTransferAction  = "Transfer"
	NameSuperviseAction = "Supervise"
	NameApplyAction     = "Apply"

	FuncNameQueryAccountByID      = "QueryAccountByID"
	FuncNameQueryAccountsByStatus = "QueryAccountsByStatus"
	FuncNameQueryExpiredAccounts  = "QueryExpiredAccounts"
	FuncNameQueryAccountByAddr    = "QueryAccountByAddr"
	FuncNameQueryBalanceByID      = "QueryBalanceByID"
)

action类型id和name,这些常量可以自定义修改

View Source
const (
	TyUnknownLog = iota + 100
	TyRegisterLog
	TyResetLog
	TyTransferLog
	TySuperviseLog
	TyApplyLog
)

log类型id值

View Source
const (
	Normal = int32(iota)
	Frozen
	Locked
	Expired
)

状态

View Source
const (
	UnknownSupervisorOp = int32(iota)
	Freeze
	UnFreeze
	AddExpire
	Authorize
)

supervior op

View Source
const (
	UnknownApplyOp = int32(iota)
	RevokeReset
	EnforceReset
)

apply op

View Source
const (
	ListDESC = int32(0)
	ListASC  = int32(1)
	ListSeek = int32(2)
)

list ...

View Source
const (
	//Count 单次list还回条数
	Count = int32(10)
)

Variables

View Source
var (
	ErrAccountIDExist      = fmt.Errorf("%s", "The account ID has been registered!")
	ErrAccountIDNotExist   = fmt.Errorf("%s", "The account ID is not exist")
	ErrAccountIDNotPermiss = fmt.Errorf("%s", "You don't have permission to do that!")
	ErrAssetBalance        = fmt.Errorf("%s", "Insufficient balance!")
	ErrNotAdmin            = fmt.Errorf("%s", "No adiministrator privileges!")
)

some errors definition

View Source
var (
	//AccountmanagerX 执行器名称定义
	AccountmanagerX = "accountmanager"
)

Functions

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor defines register executor

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork defines register fork

func RegisterAccountmanagerServer

func RegisterAccountmanagerServer(s *grpc.Server, srv AccountmanagerServer)

Types

type Account

type Account struct {
	//账户名称
	AccountID string `protobuf:"bytes,1,opt,name=accountID,proto3" json:"accountID,omitempty"`
	//地址
	Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	//上一次公钥地址
	PrevAddr string `protobuf:"bytes,3,opt,name=prevAddr,proto3" json:"prevAddr,omitempty"`
	//账户状态 0 正常, 1表示冻结, 2表示锁定 3,过期注销
	Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
	//等级权限 0普通,后面根据业务需要可以自定义,有管理员授予不同的权限
	Level int32 `protobuf:"varint,5,opt,name=level,proto3" json:"level,omitempty"`
	//注册时间
	CreateTime int64 `protobuf:"varint,6,opt,name=createTime,proto3" json:"createTime,omitempty"`
	//失效时间
	ExpireTime int64 `protobuf:"varint,7,opt,name=expireTime,proto3" json:"expireTime,omitempty"`
	//锁定时间
	LockTime int64 `protobuf:"varint,8,opt,name=lockTime,proto3" json:"lockTime,omitempty"`
	//主键索引
	Index                int64    `protobuf:"varint,9,opt,name=index,proto3" json:"index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Account) Descriptor

func (*Account) Descriptor() ([]byte, []int)

func (*Account) GetAccountID

func (m *Account) GetAccountID() string

func (*Account) GetAddr

func (m *Account) GetAddr() string

func (*Account) GetCreateTime

func (m *Account) GetCreateTime() int64

func (*Account) GetExpireTime

func (m *Account) GetExpireTime() int64

func (*Account) GetIndex

func (m *Account) GetIndex() int64

func (*Account) GetLevel

func (m *Account) GetLevel() int32

func (*Account) GetLockTime

func (m *Account) GetLockTime() int64

func (*Account) GetPrevAddr

func (m *Account) GetPrevAddr() string

func (*Account) GetStatus

func (m *Account) GetStatus() int32

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) String

func (m *Account) String() string

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Account) XXX_Merge

func (m *Account) XXX_Merge(src proto.Message)

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

func (m *Account) XXX_Unmarshal(b []byte) error

type AccountReceipt

type AccountReceipt struct {
	Account              *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AccountReceipt) Descriptor

func (*AccountReceipt) Descriptor() ([]byte, []int)

func (*AccountReceipt) GetAccount

func (m *AccountReceipt) GetAccount() *Account

func (*AccountReceipt) ProtoMessage

func (*AccountReceipt) ProtoMessage()

func (*AccountReceipt) Reset

func (m *AccountReceipt) Reset()

func (*AccountReceipt) String

func (m *AccountReceipt) String() string

func (*AccountReceipt) XXX_DiscardUnknown

func (m *AccountReceipt) XXX_DiscardUnknown()

func (*AccountReceipt) XXX_Marshal

func (m *AccountReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountReceipt) XXX_Merge

func (m *AccountReceipt) XXX_Merge(src proto.Message)

func (*AccountReceipt) XXX_Size

func (m *AccountReceipt) XXX_Size() int

func (*AccountReceipt) XXX_Unmarshal

func (m *AccountReceipt) XXX_Unmarshal(b []byte) error

type Accountmanager

type Accountmanager struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Accountmanager) Descriptor

func (*Accountmanager) Descriptor() ([]byte, []int)

func (*Accountmanager) ProtoMessage

func (*Accountmanager) ProtoMessage()

func (*Accountmanager) Reset

func (m *Accountmanager) Reset()

func (*Accountmanager) String

func (m *Accountmanager) String() string

func (*Accountmanager) XXX_DiscardUnknown

func (m *Accountmanager) XXX_DiscardUnknown()

func (*Accountmanager) XXX_Marshal

func (m *Accountmanager) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Accountmanager) XXX_Merge

func (m *Accountmanager) XXX_Merge(src proto.Message)

func (*Accountmanager) XXX_Size

func (m *Accountmanager) XXX_Size() int

func (*Accountmanager) XXX_Unmarshal

func (m *Accountmanager) XXX_Unmarshal(b []byte) error

type AccountmanagerAction

type AccountmanagerAction struct {
	// Types that are valid to be assigned to Value:
	//	*AccountmanagerAction_Register
	//	*AccountmanagerAction_ResetKey
	//	*AccountmanagerAction_Transfer
	//	*AccountmanagerAction_Supervise
	//	*AccountmanagerAction_Apply
	Value                isAccountmanagerAction_Value `protobuf_oneof:"value"`
	Ty                   int32                        `protobuf:"varint,6,opt,name=ty,proto3" json:"ty,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
	XXX_unrecognized     []byte                       `json:"-"`
	XXX_sizecache        int32                        `json:"-"`
}

func (*AccountmanagerAction) Descriptor

func (*AccountmanagerAction) Descriptor() ([]byte, []int)

func (*AccountmanagerAction) GetApply

func (m *AccountmanagerAction) GetApply() *Apply

func (*AccountmanagerAction) GetRegister

func (m *AccountmanagerAction) GetRegister() *Register

func (*AccountmanagerAction) GetResetKey

func (m *AccountmanagerAction) GetResetKey() *ResetKey

func (*AccountmanagerAction) GetSupervise

func (m *AccountmanagerAction) GetSupervise() *Supervise

func (*AccountmanagerAction) GetTransfer

func (m *AccountmanagerAction) GetTransfer() *Transfer

func (*AccountmanagerAction) GetTy

func (m *AccountmanagerAction) GetTy() int32

func (*AccountmanagerAction) GetValue

func (m *AccountmanagerAction) GetValue() isAccountmanagerAction_Value

func (*AccountmanagerAction) ProtoMessage

func (*AccountmanagerAction) ProtoMessage()

func (*AccountmanagerAction) Reset

func (m *AccountmanagerAction) Reset()

func (*AccountmanagerAction) String

func (m *AccountmanagerAction) String() string

func (*AccountmanagerAction) XXX_DiscardUnknown

func (m *AccountmanagerAction) XXX_DiscardUnknown()

func (*AccountmanagerAction) XXX_Marshal

func (m *AccountmanagerAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountmanagerAction) XXX_Merge

func (m *AccountmanagerAction) XXX_Merge(src proto.Message)

func (*AccountmanagerAction) XXX_OneofWrappers

func (*AccountmanagerAction) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*AccountmanagerAction) XXX_Size

func (m *AccountmanagerAction) XXX_Size() int

func (*AccountmanagerAction) XXX_Unmarshal

func (m *AccountmanagerAction) XXX_Unmarshal(b []byte) error

type AccountmanagerAction_Apply

type AccountmanagerAction_Apply struct {
	Apply *Apply `protobuf:"bytes,5,opt,name=apply,proto3,oneof"`
}

type AccountmanagerAction_Register

type AccountmanagerAction_Register struct {
	Register *Register `protobuf:"bytes,1,opt,name=register,proto3,oneof"`
}

type AccountmanagerAction_ResetKey

type AccountmanagerAction_ResetKey struct {
	ResetKey *ResetKey `protobuf:"bytes,2,opt,name=resetKey,proto3,oneof"`
}

type AccountmanagerAction_Supervise

type AccountmanagerAction_Supervise struct {
	Supervise *Supervise `protobuf:"bytes,4,opt,name=supervise,proto3,oneof"`
}

type AccountmanagerAction_Transfer

type AccountmanagerAction_Transfer struct {
	Transfer *Transfer `protobuf:"bytes,3,opt,name=transfer,proto3,oneof"`
}

type AccountmanagerClient

type AccountmanagerClient interface {
}

AccountmanagerClient is the client API for Accountmanager service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type AccountmanagerServer

type AccountmanagerServer interface {
}

AccountmanagerServer is the server API for Accountmanager service.

type AccountmanagerType

type AccountmanagerType struct {
	types.ExecTypeBase
}

AccountmanagerType ...

func NewType

func NewType(cfg *types.Chain33Config) *AccountmanagerType

NewType ...

func (*AccountmanagerType) GetLogMap

func (a *AccountmanagerType) GetLogMap() map[int64]*types.LogInfo

GetLogMap 获取合约log相关信息

func (*AccountmanagerType) GetPayload

func (a *AccountmanagerType) GetPayload() types.Message

GetPayload 获取合约action结构

func (*AccountmanagerType) GetTypeMap

func (a *AccountmanagerType) GetTypeMap() map[string]int32

GetTypeMap 获取合约action的id和name信息

type Apply

type Apply struct {
	AccountID string `protobuf:"bytes,1,opt,name=accountID,proto3" json:"accountID,omitempty"`
	//操作, 1 撤销账户公钥重置, 2 锁定期结束后,执行重置公钥操作
	Op                   int32    `protobuf:"varint,2,opt,name=op,proto3" json:"op,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

用户申请服务

func (*Apply) Descriptor

func (*Apply) Descriptor() ([]byte, []int)

func (*Apply) GetAccountID

func (m *Apply) GetAccountID() string

func (*Apply) GetOp

func (m *Apply) GetOp() int32

func (*Apply) ProtoMessage

func (*Apply) ProtoMessage()

func (*Apply) Reset

func (m *Apply) Reset()

func (*Apply) String

func (m *Apply) String() string

func (*Apply) XXX_DiscardUnknown

func (m *Apply) XXX_DiscardUnknown()

func (*Apply) XXX_Marshal

func (m *Apply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Apply) XXX_Merge

func (m *Apply) XXX_Merge(src proto.Message)

func (*Apply) XXX_Size

func (m *Apply) XXX_Size() int

func (*Apply) XXX_Unmarshal

func (m *Apply) XXX_Unmarshal(b []byte) error

type Balance

type Balance struct {
	Balance              int64    `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"`
	Frozen               int64    `protobuf:"varint,2,opt,name=frozen,proto3" json:"frozen,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Balance) Descriptor

func (*Balance) Descriptor() ([]byte, []int)

func (*Balance) GetBalance

func (m *Balance) GetBalance() int64

func (*Balance) GetFrozen

func (m *Balance) GetFrozen() int64

func (*Balance) ProtoMessage

func (*Balance) ProtoMessage()

func (*Balance) Reset

func (m *Balance) Reset()

func (*Balance) String

func (m *Balance) String() string

func (*Balance) XXX_DiscardUnknown

func (m *Balance) XXX_DiscardUnknown()

func (*Balance) XXX_Marshal

func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Balance) XXX_Merge

func (m *Balance) XXX_Merge(src proto.Message)

func (*Balance) XXX_Size

func (m *Balance) XXX_Size() int

func (*Balance) XXX_Unmarshal

func (m *Balance) XXX_Unmarshal(b []byte) error

type QueryAccountByAddr

type QueryAccountByAddr struct {
	Addr                 string   `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*QueryAccountByAddr) Descriptor

func (*QueryAccountByAddr) Descriptor() ([]byte, []int)

func (*QueryAccountByAddr) GetAddr

func (m *QueryAccountByAddr) GetAddr() string

func (*QueryAccountByAddr) ProtoMessage

func (*QueryAccountByAddr) ProtoMessage()

func (*QueryAccountByAddr) Reset

func (m *QueryAccountByAddr) Reset()

func (*QueryAccountByAddr) String

func (m *QueryAccountByAddr) String() string

func (*QueryAccountByAddr) XXX_DiscardUnknown

func (m *QueryAccountByAddr) XXX_DiscardUnknown()

func (*QueryAccountByAddr) XXX_Marshal

func (m *QueryAccountByAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAccountByAddr) XXX_Merge

func (m *QueryAccountByAddr) XXX_Merge(src proto.Message)

func (*QueryAccountByAddr) XXX_Size

func (m *QueryAccountByAddr) XXX_Size() int

func (*QueryAccountByAddr) XXX_Unmarshal

func (m *QueryAccountByAddr) XXX_Unmarshal(b []byte) error

type QueryAccountByID

type QueryAccountByID struct {
	AccountID            string   `protobuf:"bytes,1,opt,name=accountID,proto3" json:"accountID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*QueryAccountByID) Descriptor

func (*QueryAccountByID) Descriptor() ([]byte, []int)

func (*QueryAccountByID) GetAccountID

func (m *QueryAccountByID) GetAccountID() string

func (*QueryAccountByID) ProtoMessage

func (*QueryAccountByID) ProtoMessage()

func (*QueryAccountByID) Reset

func (m *QueryAccountByID) Reset()

func (*QueryAccountByID) String

func (m *QueryAccountByID) String() string

func (*QueryAccountByID) XXX_DiscardUnknown

func (m *QueryAccountByID) XXX_DiscardUnknown()

func (*QueryAccountByID) XXX_Marshal

func (m *QueryAccountByID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAccountByID) XXX_Merge

func (m *QueryAccountByID) XXX_Merge(src proto.Message)

func (*QueryAccountByID) XXX_Size

func (m *QueryAccountByID) XXX_Size() int

func (*QueryAccountByID) XXX_Unmarshal

func (m *QueryAccountByID) XXX_Unmarshal(b []byte) error

type QueryAccountsByStatus

type QueryAccountsByStatus struct {
	//账户状态 1 正常, 2表示冻结, 3表示锁定
	Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	// 主键索引
	PrimaryKey string `protobuf:"bytes,3,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
	// 0降序,1升序,默认降序
	Direction            int32    `protobuf:"varint,5,opt,name=direction,proto3" json:"direction,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*QueryAccountsByStatus) Descriptor

func (*QueryAccountsByStatus) Descriptor() ([]byte, []int)

func (*QueryAccountsByStatus) GetDirection

func (m *QueryAccountsByStatus) GetDirection() int32

func (*QueryAccountsByStatus) GetPrimaryKey

func (m *QueryAccountsByStatus) GetPrimaryKey() string

func (*QueryAccountsByStatus) GetStatus

func (m *QueryAccountsByStatus) GetStatus() int32

func (*QueryAccountsByStatus) ProtoMessage

func (*QueryAccountsByStatus) ProtoMessage()

func (*QueryAccountsByStatus) Reset

func (m *QueryAccountsByStatus) Reset()

func (*QueryAccountsByStatus) String

func (m *QueryAccountsByStatus) String() string

func (*QueryAccountsByStatus) XXX_DiscardUnknown

func (m *QueryAccountsByStatus) XXX_DiscardUnknown()

func (*QueryAccountsByStatus) XXX_Marshal

func (m *QueryAccountsByStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAccountsByStatus) XXX_Merge

func (m *QueryAccountsByStatus) XXX_Merge(src proto.Message)

func (*QueryAccountsByStatus) XXX_Size

func (m *QueryAccountsByStatus) XXX_Size() int

func (*QueryAccountsByStatus) XXX_Unmarshal

func (m *QueryAccountsByStatus) XXX_Unmarshal(b []byte) error

type QueryBalanceByID

type QueryBalanceByID struct {
	AccountID            string       `protobuf:"bytes,1,opt,name=accountID,proto3" json:"accountID,omitempty"`
	Asset                *types.Asset `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*QueryBalanceByID) Descriptor

func (*QueryBalanceByID) Descriptor() ([]byte, []int)

func (*QueryBalanceByID) GetAccountID

func (m *QueryBalanceByID) GetAccountID() string

func (*QueryBalanceByID) GetAsset

func (m *QueryBalanceByID) GetAsset() *types.Asset

func (*QueryBalanceByID) ProtoMessage

func (*QueryBalanceByID) ProtoMessage()

func (*QueryBalanceByID) Reset

func (m *QueryBalanceByID) Reset()

func (*QueryBalanceByID) String

func (m *QueryBalanceByID) String() string

func (*QueryBalanceByID) XXX_DiscardUnknown

func (m *QueryBalanceByID) XXX_DiscardUnknown()

func (*QueryBalanceByID) XXX_Marshal

func (m *QueryBalanceByID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryBalanceByID) XXX_Merge

func (m *QueryBalanceByID) XXX_Merge(src proto.Message)

func (*QueryBalanceByID) XXX_Size

func (m *QueryBalanceByID) XXX_Size() int

func (*QueryBalanceByID) XXX_Unmarshal

func (m *QueryBalanceByID) XXX_Unmarshal(b []byte) error

type QueryExpiredAccounts

type QueryExpiredAccounts struct {
	PrimaryKey string `protobuf:"bytes,1,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
	//第一次需要传入逾期时间,时间戳
	ExpiredTime int64 `protobuf:"varint,2,opt,name=expiredTime,proto3" json:"expiredTime,omitempty"`
	//单页返回多少条记录,默认返回10条
	// 0降序,1升序,默认降序
	Direction            int32    `protobuf:"varint,3,opt,name=direction,proto3" json:"direction,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*QueryExpiredAccounts) Descriptor

func (*QueryExpiredAccounts) Descriptor() ([]byte, []int)

func (*QueryExpiredAccounts) GetDirection

func (m *QueryExpiredAccounts) GetDirection() int32

func (*QueryExpiredAccounts) GetExpiredTime

func (m *QueryExpiredAccounts) GetExpiredTime() int64

func (*QueryExpiredAccounts) GetPrimaryKey

func (m *QueryExpiredAccounts) GetPrimaryKey() string

func (*QueryExpiredAccounts) ProtoMessage

func (*QueryExpiredAccounts) ProtoMessage()

func (*QueryExpiredAccounts) Reset

func (m *QueryExpiredAccounts) Reset()

func (*QueryExpiredAccounts) String

func (m *QueryExpiredAccounts) String() string

func (*QueryExpiredAccounts) XXX_DiscardUnknown

func (m *QueryExpiredAccounts) XXX_DiscardUnknown()

func (*QueryExpiredAccounts) XXX_Marshal

func (m *QueryExpiredAccounts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryExpiredAccounts) XXX_Merge

func (m *QueryExpiredAccounts) XXX_Merge(src proto.Message)

func (*QueryExpiredAccounts) XXX_Size

func (m *QueryExpiredAccounts) XXX_Size() int

func (*QueryExpiredAccounts) XXX_Unmarshal

func (m *QueryExpiredAccounts) XXX_Unmarshal(b []byte) error

type Register

type Register struct {
	AccountID            string   `protobuf:"bytes,1,opt,name=accountID,proto3" json:"accountID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

注册

func (*Register) Descriptor

func (*Register) Descriptor() ([]byte, []int)

func (*Register) GetAccountID

func (m *Register) GetAccountID() string

func (*Register) ProtoMessage

func (*Register) ProtoMessage()

func (*Register) Reset

func (m *Register) Reset()

func (*Register) String

func (m *Register) String() string

func (*Register) XXX_DiscardUnknown

func (m *Register) XXX_DiscardUnknown()

func (*Register) XXX_Marshal

func (m *Register) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Register) XXX_Merge

func (m *Register) XXX_Merge(src proto.Message)

func (*Register) XXX_Size

func (m *Register) XXX_Size() int

func (*Register) XXX_Unmarshal

func (m *Register) XXX_Unmarshal(b []byte) error

type ReplyAccountList

type ReplyAccountList struct {
	Accounts             []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	PrimaryKey           string     `protobuf:"bytes,2,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*ReplyAccountList) Descriptor

func (*ReplyAccountList) Descriptor() ([]byte, []int)

func (*ReplyAccountList) GetAccounts

func (m *ReplyAccountList) GetAccounts() []*Account

func (*ReplyAccountList) GetPrimaryKey

func (m *ReplyAccountList) GetPrimaryKey() string

func (*ReplyAccountList) ProtoMessage

func (*ReplyAccountList) ProtoMessage()

func (*ReplyAccountList) Reset

func (m *ReplyAccountList) Reset()

func (*ReplyAccountList) String

func (m *ReplyAccountList) String() string

func (*ReplyAccountList) XXX_DiscardUnknown

func (m *ReplyAccountList) XXX_DiscardUnknown()

func (*ReplyAccountList) XXX_Marshal

func (m *ReplyAccountList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReplyAccountList) XXX_Merge

func (m *ReplyAccountList) XXX_Merge(src proto.Message)

func (*ReplyAccountList) XXX_Size

func (m *ReplyAccountList) XXX_Size() int

func (*ReplyAccountList) XXX_Unmarshal

func (m *ReplyAccountList) XXX_Unmarshal(b []byte) error

type ResetKey

type ResetKey struct {
	AccountID            string   `protobuf:"bytes,1,opt,name=accountID,proto3" json:"accountID,omitempty"`
	Addr                 string   `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

重置公钥

func (*ResetKey) Descriptor

func (*ResetKey) Descriptor() ([]byte, []int)

func (*ResetKey) GetAccountID

func (m *ResetKey) GetAccountID() string

func (*ResetKey) GetAddr

func (m *ResetKey) GetAddr() string

func (*ResetKey) ProtoMessage

func (*ResetKey) ProtoMessage()

func (*ResetKey) Reset

func (m *ResetKey) Reset()

func (*ResetKey) String

func (m *ResetKey) String() string

func (*ResetKey) XXX_DiscardUnknown

func (m *ResetKey) XXX_DiscardUnknown()

func (*ResetKey) XXX_Marshal

func (m *ResetKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResetKey) XXX_Merge

func (m *ResetKey) XXX_Merge(src proto.Message)

func (*ResetKey) XXX_Size

func (m *ResetKey) XXX_Size() int

func (*ResetKey) XXX_Unmarshal

func (m *ResetKey) XXX_Unmarshal(b []byte) error

type Supervise

type Supervise struct {
	//账户名单
	AccountIDs []string `protobuf:"bytes,1,rep,name=accountIDs,proto3" json:"accountIDs,omitempty"`
	//操作, 1为冻结,2为解冻,3增加有效期,4为授权
	Op int32 `protobuf:"varint,2,opt,name=op,proto3" json:"op,omitempty"`
	//0普通,后面根据业务需要可以自定义,有管理员授予不同的权限
	Level                int32    `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

管理员监管操作

func (*Supervise) Descriptor

func (*Supervise) Descriptor() ([]byte, []int)

func (*Supervise) GetAccountIDs

func (m *Supervise) GetAccountIDs() []string

func (*Supervise) GetLevel

func (m *Supervise) GetLevel() int32

func (*Supervise) GetOp

func (m *Supervise) GetOp() int32

func (*Supervise) ProtoMessage

func (*Supervise) ProtoMessage()

func (*Supervise) Reset

func (m *Supervise) Reset()

func (*Supervise) String

func (m *Supervise) String() string

func (*Supervise) XXX_DiscardUnknown

func (m *Supervise) XXX_DiscardUnknown()

func (*Supervise) XXX_Marshal

func (m *Supervise) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Supervise) XXX_Merge

func (m *Supervise) XXX_Merge(src proto.Message)

func (*Supervise) XXX_Size

func (m *Supervise) XXX_Size() int

func (*Supervise) XXX_Unmarshal

func (m *Supervise) XXX_Unmarshal(b []byte) error

type SuperviseReceipt

type SuperviseReceipt struct {
	Accounts             []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	Op                   int32      `protobuf:"varint,2,opt,name=op,proto3" json:"op,omitempty"`
	Index                int64      `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

回执日志

func (*SuperviseReceipt) Descriptor

func (*SuperviseReceipt) Descriptor() ([]byte, []int)

func (*SuperviseReceipt) GetAccounts

func (m *SuperviseReceipt) GetAccounts() []*Account

func (*SuperviseReceipt) GetIndex

func (m *SuperviseReceipt) GetIndex() int64

func (*SuperviseReceipt) GetOp

func (m *SuperviseReceipt) GetOp() int32

func (*SuperviseReceipt) ProtoMessage

func (*SuperviseReceipt) ProtoMessage()

func (*SuperviseReceipt) Reset

func (m *SuperviseReceipt) Reset()

func (*SuperviseReceipt) String

func (m *SuperviseReceipt) String() string

func (*SuperviseReceipt) XXX_DiscardUnknown

func (m *SuperviseReceipt) XXX_DiscardUnknown()

func (*SuperviseReceipt) XXX_Marshal

func (m *SuperviseReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SuperviseReceipt) XXX_Merge

func (m *SuperviseReceipt) XXX_Merge(src proto.Message)

func (*SuperviseReceipt) XXX_Size

func (m *SuperviseReceipt) XXX_Size() int

func (*SuperviseReceipt) XXX_Unmarshal

func (m *SuperviseReceipt) XXX_Unmarshal(b []byte) error

type Transfer

type Transfer struct {
	//资产类型 及转账金额
	Asset *types.Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"`
	// from账户
	FromAccountID string `protobuf:"bytes,2,opt,name=fromAccountID,proto3" json:"fromAccountID,omitempty"`
	// to账户
	ToAccountID          string   `protobuf:"bytes,3,opt,name=toAccountID,proto3" json:"toAccountID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

合约内部账户之间转账

func (*Transfer) Descriptor

func (*Transfer) Descriptor() ([]byte, []int)

func (*Transfer) GetAsset

func (m *Transfer) GetAsset() *types.Asset

func (*Transfer) GetFromAccountID

func (m *Transfer) GetFromAccountID() string

func (*Transfer) GetToAccountID

func (m *Transfer) GetToAccountID() string

func (*Transfer) ProtoMessage

func (*Transfer) ProtoMessage()

func (*Transfer) Reset

func (m *Transfer) Reset()

func (*Transfer) String

func (m *Transfer) String() string

func (*Transfer) XXX_DiscardUnknown

func (m *Transfer) XXX_DiscardUnknown()

func (*Transfer) XXX_Marshal

func (m *Transfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Transfer) XXX_Merge

func (m *Transfer) XXX_Merge(src proto.Message)

func (*Transfer) XXX_Size

func (m *Transfer) XXX_Size() int

func (*Transfer) XXX_Unmarshal

func (m *Transfer) XXX_Unmarshal(b []byte) error

type TransferReceipt

type TransferReceipt struct {
	FromAccount          *Account `protobuf:"bytes,1,opt,name=FromAccount,proto3" json:"FromAccount,omitempty"`
	ToAccount            *Account `protobuf:"bytes,2,opt,name=ToAccount,proto3" json:"ToAccount,omitempty"`
	Index                int64    `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TransferReceipt) Descriptor

func (*TransferReceipt) Descriptor() ([]byte, []int)

func (*TransferReceipt) GetFromAccount

func (m *TransferReceipt) GetFromAccount() *Account

func (*TransferReceipt) GetIndex

func (m *TransferReceipt) GetIndex() int64

func (*TransferReceipt) GetToAccount

func (m *TransferReceipt) GetToAccount() *Account

func (*TransferReceipt) ProtoMessage

func (*TransferReceipt) ProtoMessage()

func (*TransferReceipt) Reset

func (m *TransferReceipt) Reset()

func (*TransferReceipt) String

func (m *TransferReceipt) String() string

func (*TransferReceipt) XXX_DiscardUnknown

func (m *TransferReceipt) XXX_DiscardUnknown()

func (*TransferReceipt) XXX_Marshal

func (m *TransferReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransferReceipt) XXX_Merge

func (m *TransferReceipt) XXX_Merge(src proto.Message)

func (*TransferReceipt) XXX_Size

func (m *TransferReceipt) XXX_Size() int

func (*TransferReceipt) XXX_Unmarshal

func (m *TransferReceipt) XXX_Unmarshal(b []byte) error

type UnimplementedAccountmanagerServer

type UnimplementedAccountmanagerServer struct {
}

UnimplementedAccountmanagerServer can be embedded to have forward compatible implementations.

Jump to

Keyboard shortcuts

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