types

package
v1.68.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: BSD-3-Clause Imports: 7 Imported by: 18

Documentation

Overview

Package types 管理插件相关的定义

Index

Constants

View Source
const (
	ManageActionModifyConfig = iota
	ManageActionApplyConfig
	ManageActionApproveConfig
)

ManageActionModifyConfig manager action

View Source
const (
	TyLogModifyConfig  = 410
	TyLogApplyConfig   = 411
	TyLogApproveConfig = 412
)

TyLogModifyConfig log

View Source
const (
	ManageConfigStatusNone     = 0
	ManageConfigStatusApply    = 1
	ManageConfigStatusApproved = 2
)

ManageConfigStatus config status

View Source
const (
	OpAdd    = "add"
	OpDelete = "delete"
)

OpAdd config op

View Source
const (
	//ForkManageExec manage key
	ForkManageExec = "ForkManageExec"
	//ForkManageAutonomyEnable enable approve from autonomy
	ForkManageAutonomyEnable = "ForkManageAutonomyEnable"
)
View Source
const (
	ConfigItemArrayConfig = iota
)

ConfigItemArrayConfig config Item

Variables

View Source
var (
	// ErrNoPrivilege defines a error string errnoprivilege
	ErrNoPrivilege = errors.New("ErrNoPrivilege")
	// ErrBadConfigKey defines a err string errbadconfigkey
	ErrBadConfigKey = errors.New("ErrBadConfigKey")
	// ErrBadConfigOp defines a err string errbadconfigop
	ErrBadConfigOp = errors.New("ErrBadConfigOp")
	// ErrBadConfigValue defines a err string errbadconfigvalue
	ErrBadConfigValue = errors.New("ErrBadConfigValue")
)
View Source
var File_manage_proto protoreflect.FileDescriptor
View Source
var (
	// ManageX defines a global string
	ManageX = "manage"
)

Functions

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor init Executor

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork init

Types

type ApplyConfig added in v1.66.1

type ApplyConfig struct {
	Config *types.ModifyConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

申请修改配置项

func (*ApplyConfig) Descriptor deprecated added in v1.66.1

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

Deprecated: Use ApplyConfig.ProtoReflect.Descriptor instead.

func (*ApplyConfig) GetConfig added in v1.66.1

func (x *ApplyConfig) GetConfig() *types.ModifyConfig

func (*ApplyConfig) ProtoMessage added in v1.66.1

func (*ApplyConfig) ProtoMessage()

func (*ApplyConfig) ProtoReflect added in v1.66.1

func (x *ApplyConfig) ProtoReflect() protoreflect.Message

func (*ApplyConfig) Reset added in v1.66.1

func (x *ApplyConfig) Reset()

func (*ApplyConfig) String added in v1.66.1

func (x *ApplyConfig) String() string

type ApproveConfig added in v1.66.1

type ApproveConfig struct {
	ApplyConfigId  string `protobuf:"bytes,1,opt,name=applyConfigId,proto3" json:"applyConfigId,omitempty"`   //修改配置项申请ID
	AutonomyItemId string `protobuf:"bytes,2,opt,name=autonomyItemId,proto3" json:"autonomyItemId,omitempty"` // autonomy 合約批准的 item ID
	// contains filtered or unexported fields
}

批准配置项

func (*ApproveConfig) Descriptor deprecated added in v1.66.1

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

Deprecated: Use ApproveConfig.ProtoReflect.Descriptor instead.

func (*ApproveConfig) GetApplyConfigId added in v1.66.1

func (x *ApproveConfig) GetApplyConfigId() string

func (*ApproveConfig) GetAutonomyItemId added in v1.66.1

func (x *ApproveConfig) GetAutonomyItemId() string

func (*ApproveConfig) ProtoMessage added in v1.66.1

func (*ApproveConfig) ProtoMessage()

func (*ApproveConfig) ProtoReflect added in v1.66.1

func (x *ApproveConfig) ProtoReflect() protoreflect.Message

func (*ApproveConfig) Reset added in v1.66.1

func (x *ApproveConfig) Reset()

func (*ApproveConfig) String added in v1.66.1

func (x *ApproveConfig) String() string

type ConfigStatus added in v1.66.1

type ConfigStatus struct {
	Id       string              `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //申请ID
	Config   *types.ModifyConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	Status   int32               `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	Proposer string              `protobuf:"bytes,4,opt,name=proposer,proto3" json:"proposer,omitempty"`
	// 状态
	Height int64 `protobuf:"varint,8,opt,name=height,proto3" json:"height,omitempty"`
	Index  int32 `protobuf:"varint,9,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigStatus) Descriptor deprecated added in v1.66.1

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

Deprecated: Use ConfigStatus.ProtoReflect.Descriptor instead.

func (*ConfigStatus) GetConfig added in v1.66.1

func (x *ConfigStatus) GetConfig() *types.ModifyConfig

func (*ConfigStatus) GetHeight added in v1.66.1

func (x *ConfigStatus) GetHeight() int64

func (*ConfigStatus) GetId added in v1.66.1

func (x *ConfigStatus) GetId() string

func (*ConfigStatus) GetIndex added in v1.66.1

func (x *ConfigStatus) GetIndex() int32

func (*ConfigStatus) GetProposer added in v1.66.1

func (x *ConfigStatus) GetProposer() string

func (*ConfigStatus) GetStatus added in v1.66.1

func (x *ConfigStatus) GetStatus() int32

func (*ConfigStatus) ProtoMessage added in v1.66.1

func (*ConfigStatus) ProtoMessage()

func (*ConfigStatus) ProtoReflect added in v1.66.1

func (x *ConfigStatus) ProtoReflect() protoreflect.Message

func (*ConfigStatus) Reset added in v1.66.1

func (x *ConfigStatus) Reset()

func (*ConfigStatus) String added in v1.66.1

func (x *ConfigStatus) String() string

type ManageAction

type ManageAction struct {

	// Types that are assignable to Value:
	//	*ManageAction_Modify
	//	*ManageAction_Apply
	//	*ManageAction_Approve
	Value isManageAction_Value `protobuf_oneof:"value"`
	Ty    int32                `protobuf:"varint,2,opt,name=Ty,proto3" json:"Ty,omitempty"`
	// contains filtered or unexported fields
}

func (*ManageAction) Descriptor deprecated

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

Deprecated: Use ManageAction.ProtoReflect.Descriptor instead.

func (*ManageAction) GetApply added in v1.66.1

func (x *ManageAction) GetApply() *ApplyConfig

func (*ManageAction) GetApprove added in v1.66.1

func (x *ManageAction) GetApprove() *ApproveConfig

func (*ManageAction) GetModify

func (x *ManageAction) GetModify() *types.ModifyConfig

func (*ManageAction) GetTy

func (x *ManageAction) GetTy() int32

func (*ManageAction) GetValue

func (m *ManageAction) GetValue() isManageAction_Value

func (*ManageAction) ProtoMessage

func (*ManageAction) ProtoMessage()

func (*ManageAction) ProtoReflect added in v1.65.3

func (x *ManageAction) ProtoReflect() protoreflect.Message

func (*ManageAction) Reset

func (x *ManageAction) Reset()

func (*ManageAction) String

func (x *ManageAction) String() string

type ManageAction_Apply added in v1.66.1

type ManageAction_Apply struct {
	Apply *ApplyConfig `protobuf:"bytes,3,opt,name=apply,proto3,oneof"`
}

type ManageAction_Approve added in v1.66.1

type ManageAction_Approve struct {
	Approve *ApproveConfig `protobuf:"bytes,4,opt,name=approve,proto3,oneof"`
}

type ManageAction_Modify

type ManageAction_Modify struct {
	Modify *types.ModifyConfig `protobuf:"bytes,1,opt,name=modify,proto3,oneof"`
}

type ManageType

type ManageType struct {
	types.ExecTypeBase
}

ManageType defines managetype

func NewType

func NewType(cfg *types.Chain33Config) *ManageType

NewType new a managetype object

func (ManageType) Amount

func (m ManageType) Amount(tx *types.Transaction) (int64, error)

Amount amount

func (*ManageType) GetLogMap

func (m *ManageType) GetLogMap() map[int64]*types.LogInfo

GetLogMap get log for map

func (*ManageType) GetName

func (m *ManageType) GetName() string

GetName reset name

func (*ManageType) GetPayload

func (m *ManageType) GetPayload() types.Message

GetPayload return manageaction

func (ManageType) GetRealToAddr

func (m ManageType) GetRealToAddr(tx *types.Transaction) string

GetRealToAddr main reason for overloading this function is because of the manage protocol during implementation, to address specification varies fron height to height

func (ManageType) GetTypeMap

func (m ManageType) GetTypeMap() map[string]int32

GetTypeMap return typename of actionname

type ReceiptApplyConfig added in v1.66.1

type ReceiptApplyConfig struct {
	Status *ConfigStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiptApplyConfig) Descriptor deprecated added in v1.66.1

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

Deprecated: Use ReceiptApplyConfig.ProtoReflect.Descriptor instead.

func (*ReceiptApplyConfig) GetStatus added in v1.66.1

func (x *ReceiptApplyConfig) GetStatus() *ConfigStatus

func (*ReceiptApplyConfig) ProtoMessage added in v1.66.1

func (*ReceiptApplyConfig) ProtoMessage()

func (*ReceiptApplyConfig) ProtoReflect added in v1.66.1

func (x *ReceiptApplyConfig) ProtoReflect() protoreflect.Message

func (*ReceiptApplyConfig) Reset added in v1.66.1

func (x *ReceiptApplyConfig) Reset()

func (*ReceiptApplyConfig) String added in v1.66.1

func (x *ReceiptApplyConfig) String() string

type ReceiptApproveConfig added in v1.66.1

type ReceiptApproveConfig struct {
	Pre *ConfigStatus `protobuf:"bytes,1,opt,name=pre,proto3" json:"pre,omitempty"`
	Cur *ConfigStatus `protobuf:"bytes,2,opt,name=cur,proto3" json:"cur,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiptApproveConfig) Descriptor deprecated added in v1.66.1

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

Deprecated: Use ReceiptApproveConfig.ProtoReflect.Descriptor instead.

func (*ReceiptApproveConfig) GetCur added in v1.66.1

func (x *ReceiptApproveConfig) GetCur() *ConfigStatus

func (*ReceiptApproveConfig) GetPre added in v1.66.1

func (x *ReceiptApproveConfig) GetPre() *ConfigStatus

func (*ReceiptApproveConfig) ProtoMessage added in v1.66.1

func (*ReceiptApproveConfig) ProtoMessage()

func (*ReceiptApproveConfig) ProtoReflect added in v1.66.1

func (x *ReceiptApproveConfig) ProtoReflect() protoreflect.Message

func (*ReceiptApproveConfig) Reset added in v1.66.1

func (x *ReceiptApproveConfig) Reset()

func (*ReceiptApproveConfig) String added in v1.66.1

func (x *ReceiptApproveConfig) String() string

type ReplyQueryConfigList added in v1.66.1

type ReplyQueryConfigList struct {
	Lists []*ConfigStatus `protobuf:"bytes,1,rep,name=lists,proto3" json:"lists,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyQueryConfigList) Descriptor deprecated added in v1.66.1

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

Deprecated: Use ReplyQueryConfigList.ProtoReflect.Descriptor instead.

func (*ReplyQueryConfigList) GetLists added in v1.66.1

func (x *ReplyQueryConfigList) GetLists() []*ConfigStatus

func (*ReplyQueryConfigList) ProtoMessage added in v1.66.1

func (*ReplyQueryConfigList) ProtoMessage()

func (*ReplyQueryConfigList) ProtoReflect added in v1.66.1

func (x *ReplyQueryConfigList) ProtoReflect() protoreflect.Message

func (*ReplyQueryConfigList) Reset added in v1.66.1

func (x *ReplyQueryConfigList) Reset()

func (*ReplyQueryConfigList) String added in v1.66.1

func (x *ReplyQueryConfigList) String() string

type ReqQueryConfigList added in v1.66.1

type ReqQueryConfigList struct {
	Status    int32  `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	Proposer  string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"`
	Count     int32  `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	Direction int32  `protobuf:"varint,4,opt,name=direction,proto3" json:"direction,omitempty"`
	Height    int64  `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"`
	Index     int32  `protobuf:"varint,6,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

query

func (*ReqQueryConfigList) Descriptor deprecated added in v1.66.1

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

Deprecated: Use ReqQueryConfigList.ProtoReflect.Descriptor instead.

func (*ReqQueryConfigList) GetCount added in v1.66.1

func (x *ReqQueryConfigList) GetCount() int32

func (*ReqQueryConfigList) GetDirection added in v1.66.1

func (x *ReqQueryConfigList) GetDirection() int32

func (*ReqQueryConfigList) GetHeight added in v1.66.1

func (x *ReqQueryConfigList) GetHeight() int64

func (*ReqQueryConfigList) GetIndex added in v1.66.1

func (x *ReqQueryConfigList) GetIndex() int32

func (*ReqQueryConfigList) GetProposer added in v1.66.1

func (x *ReqQueryConfigList) GetProposer() string

func (*ReqQueryConfigList) GetStatus added in v1.66.1

func (x *ReqQueryConfigList) GetStatus() int32

func (*ReqQueryConfigList) ProtoMessage added in v1.66.1

func (*ReqQueryConfigList) ProtoMessage()

func (*ReqQueryConfigList) ProtoReflect added in v1.66.1

func (x *ReqQueryConfigList) ProtoReflect() protoreflect.Message

func (*ReqQueryConfigList) Reset added in v1.66.1

func (x *ReqQueryConfigList) Reset()

func (*ReqQueryConfigList) String added in v1.66.1

func (x *ReqQueryConfigList) String() string

Jump to

Keyboard shortcuts

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