types

package
v1.65.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TyUnknowAction = iota
	TyContentStorageAction
	TyHashStorageAction
	TyLinkStorageAction
	TyEncryptStorageAction
	TyEncryptShareStorageAction

	NameContentStorageAction      = "ContentStorage"
	NameHashStorageAction         = "HashStorage"
	NameLinkStorageAction         = "LinkStorage"
	NameEncryptStorageAction      = "EncryptStorage"
	NameEncryptShareStorageAction = "EncryptShareStorage"

	FuncNameQueryStorage      = "QueryStorage"
	FuncNameBatchQueryStorage = "BatchQueryStorage"
)

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

View Source
const (
	TyUnknownLog = iota
	TyContentStorageLog
	TyHashStorageLog
	TyLinkStorageLog
	TyEncryptStorageLog
	TyEncryptShareStorageLog
)

log类型id值

View Source
const (
	OpCreate = int32(iota)
	OpAdd
)

storage op

Variables

View Source
var (
	ErrKeyExisted  = fmt.Errorf("%s", "The key has already existed!")
	ErrStorageType = fmt.Errorf("%s", "The key has used storage another type!")
)

some errors definition

View Source
var (
	ForkStorageLocalDB = "ForkStorageLocalDB"
)

fork

View Source
var (
	//StorageX 执行器名称定义
	StorageX = "storage"
)

Functions

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor defines register executor

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork defines register fork

func RegisterStorageServer

func RegisterStorageServer(s *grpc.Server, srv StorageServer)

Types

type BatchQueryStorage

type BatchQueryStorage struct {
	TxHashs              []string `protobuf:"bytes,1,rep,name=txHashs,proto3" json:"txHashs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

批量查询有可能导致数据库崩溃

func (*BatchQueryStorage) Descriptor

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

func (*BatchQueryStorage) GetTxHashs

func (m *BatchQueryStorage) GetTxHashs() []string

func (*BatchQueryStorage) ProtoMessage

func (*BatchQueryStorage) ProtoMessage()

func (*BatchQueryStorage) Reset

func (m *BatchQueryStorage) Reset()

func (*BatchQueryStorage) String

func (m *BatchQueryStorage) String() string

func (*BatchQueryStorage) XXX_DiscardUnknown

func (m *BatchQueryStorage) XXX_DiscardUnknown()

func (*BatchQueryStorage) XXX_Marshal

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

func (*BatchQueryStorage) XXX_Merge

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

func (*BatchQueryStorage) XXX_Size

func (m *BatchQueryStorage) XXX_Size() int

func (*BatchQueryStorage) XXX_Unmarshal

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

type BatchReplyStorage

type BatchReplyStorage struct {
	Storages             []*Storage `protobuf:"bytes,1,rep,name=storages,proto3" json:"storages,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*BatchReplyStorage) Descriptor

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

func (*BatchReplyStorage) GetStorages

func (m *BatchReplyStorage) GetStorages() []*Storage

func (*BatchReplyStorage) ProtoMessage

func (*BatchReplyStorage) ProtoMessage()

func (*BatchReplyStorage) Reset

func (m *BatchReplyStorage) Reset()

func (*BatchReplyStorage) String

func (m *BatchReplyStorage) String() string

func (*BatchReplyStorage) XXX_DiscardUnknown

func (m *BatchReplyStorage) XXX_DiscardUnknown()

func (*BatchReplyStorage) XXX_Marshal

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

func (*BatchReplyStorage) XXX_Merge

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

func (*BatchReplyStorage) XXX_Size

func (m *BatchReplyStorage) XXX_Size() int

func (*BatchReplyStorage) XXX_Unmarshal

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

type ContentOnlyNotaryStorage

type ContentOnlyNotaryStorage struct {
	//长度需要小于512k
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	//自定义的主键,可以为空,如果没传,则用txhash为key
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// Op 0表示创建 1表示追加add
	Op int32 `protobuf:"varint,3,opt,name=op,proto3" json:"op,omitempty"`
	//字符串值
	Value                string   `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

内容存证模型

func (*ContentOnlyNotaryStorage) Descriptor

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

func (*ContentOnlyNotaryStorage) GetContent

func (m *ContentOnlyNotaryStorage) GetContent() []byte

func (*ContentOnlyNotaryStorage) GetKey

func (m *ContentOnlyNotaryStorage) GetKey() string

func (*ContentOnlyNotaryStorage) GetOp

func (m *ContentOnlyNotaryStorage) GetOp() int32

func (*ContentOnlyNotaryStorage) GetValue

func (m *ContentOnlyNotaryStorage) GetValue() string

func (*ContentOnlyNotaryStorage) ProtoMessage

func (*ContentOnlyNotaryStorage) ProtoMessage()

func (*ContentOnlyNotaryStorage) Reset

func (m *ContentOnlyNotaryStorage) Reset()

func (*ContentOnlyNotaryStorage) String

func (m *ContentOnlyNotaryStorage) String() string

func (*ContentOnlyNotaryStorage) XXX_DiscardUnknown

func (m *ContentOnlyNotaryStorage) XXX_DiscardUnknown()

func (*ContentOnlyNotaryStorage) XXX_Marshal

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

func (*ContentOnlyNotaryStorage) XXX_Merge

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

func (*ContentOnlyNotaryStorage) XXX_Size

func (m *ContentOnlyNotaryStorage) XXX_Size() int

func (*ContentOnlyNotaryStorage) XXX_Unmarshal

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

type EncryptNotaryStorage

type EncryptNotaryStorage struct {
	//存证明文内容的hash值,推荐使用sha256哈希,限制256位得摘要值
	ContentHash []byte `protobuf:"bytes,1,opt,name=contentHash,proto3" json:"contentHash,omitempty"`
	//源文件得密文,由加密key及nonce对明文加密得到该值。
	EncryptContent []byte `protobuf:"bytes,2,opt,name=encryptContent,proto3" json:"encryptContent,omitempty"`
	//加密iv,通过AES进行加密时制定随机生成的iv,解密时需要使用该值
	Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	//自定义的主键,可以为空,如果没传,则用txhash为key
	Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
	//字符串值
	Value                string   `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

隐私存证模型,如果一个文件需要存证,且不公开内容,可以选择将源文件通过对称加密算法加密后上链

func (*EncryptNotaryStorage) Descriptor

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

func (*EncryptNotaryStorage) GetContentHash

func (m *EncryptNotaryStorage) GetContentHash() []byte

func (*EncryptNotaryStorage) GetEncryptContent

func (m *EncryptNotaryStorage) GetEncryptContent() []byte

func (*EncryptNotaryStorage) GetKey

func (m *EncryptNotaryStorage) GetKey() string

func (*EncryptNotaryStorage) GetNonce

func (m *EncryptNotaryStorage) GetNonce() []byte

func (*EncryptNotaryStorage) GetValue

func (m *EncryptNotaryStorage) GetValue() string

func (*EncryptNotaryStorage) ProtoMessage

func (*EncryptNotaryStorage) ProtoMessage()

func (*EncryptNotaryStorage) Reset

func (m *EncryptNotaryStorage) Reset()

func (*EncryptNotaryStorage) String

func (m *EncryptNotaryStorage) String() string

func (*EncryptNotaryStorage) XXX_DiscardUnknown

func (m *EncryptNotaryStorage) XXX_DiscardUnknown()

func (*EncryptNotaryStorage) XXX_Marshal

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

func (*EncryptNotaryStorage) XXX_Merge

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

func (*EncryptNotaryStorage) XXX_Size

func (m *EncryptNotaryStorage) XXX_Size() int

func (*EncryptNotaryStorage) XXX_Unmarshal

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

type EncryptShareNotaryStorage

type EncryptShareNotaryStorage struct {
	//存证明文内容的hash值,推荐使用sha256哈希,限制256位得摘要值
	ContentHash []byte `protobuf:"bytes,1,opt,name=contentHash,proto3" json:"contentHash,omitempty"`
	//源文件得密文。,用公钥地址加密
	EncryptContent []byte `protobuf:"bytes,2,opt,name=encryptContent,proto3" json:"encryptContent,omitempty"`
	//公钥
	PubKey []byte `protobuf:"bytes,3,opt,name=pubKey,proto3" json:"pubKey,omitempty"`
	//自定义的主键,可以为空,如果没传,则用txhash为key
	Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
	//字符串值
	Value                string   `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

分享隐私存证模型,需要完备的sdk或者相应的密钥库支持

func (*EncryptShareNotaryStorage) Descriptor

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

func (*EncryptShareNotaryStorage) GetContentHash

func (m *EncryptShareNotaryStorage) GetContentHash() []byte

func (*EncryptShareNotaryStorage) GetEncryptContent

func (m *EncryptShareNotaryStorage) GetEncryptContent() []byte

func (*EncryptShareNotaryStorage) GetKey

func (m *EncryptShareNotaryStorage) GetKey() string

func (*EncryptShareNotaryStorage) GetPubKey

func (m *EncryptShareNotaryStorage) GetPubKey() []byte

func (*EncryptShareNotaryStorage) GetValue

func (m *EncryptShareNotaryStorage) GetValue() string

func (*EncryptShareNotaryStorage) ProtoMessage

func (*EncryptShareNotaryStorage) ProtoMessage()

func (*EncryptShareNotaryStorage) Reset

func (m *EncryptShareNotaryStorage) Reset()

func (*EncryptShareNotaryStorage) String

func (m *EncryptShareNotaryStorage) String() string

func (*EncryptShareNotaryStorage) XXX_DiscardUnknown

func (m *EncryptShareNotaryStorage) XXX_DiscardUnknown()

func (*EncryptShareNotaryStorage) XXX_Marshal

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

func (*EncryptShareNotaryStorage) XXX_Merge

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

func (*EncryptShareNotaryStorage) XXX_Size

func (m *EncryptShareNotaryStorage) XXX_Size() int

func (*EncryptShareNotaryStorage) XXX_Unmarshal

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

type HashOnlyNotaryStorage

type HashOnlyNotaryStorage struct {
	//长度固定为32字节
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	//自定义的主键,可以为空,如果没传,则用txhash为key
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	//字符串值
	Value                string   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

哈希存证模型,推荐使用sha256哈希,限制256位得摘要值

func (*HashOnlyNotaryStorage) Descriptor

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

func (*HashOnlyNotaryStorage) GetHash

func (m *HashOnlyNotaryStorage) GetHash() []byte

func (*HashOnlyNotaryStorage) GetKey

func (m *HashOnlyNotaryStorage) GetKey() string

func (*HashOnlyNotaryStorage) GetValue

func (m *HashOnlyNotaryStorage) GetValue() string

func (*HashOnlyNotaryStorage) ProtoMessage

func (*HashOnlyNotaryStorage) ProtoMessage()

func (*HashOnlyNotaryStorage) Reset

func (m *HashOnlyNotaryStorage) Reset()

func (*HashOnlyNotaryStorage) String

func (m *HashOnlyNotaryStorage) String() string

func (*HashOnlyNotaryStorage) XXX_DiscardUnknown

func (m *HashOnlyNotaryStorage) XXX_DiscardUnknown()

func (*HashOnlyNotaryStorage) XXX_Marshal

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

func (*HashOnlyNotaryStorage) XXX_Merge

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

func (*HashOnlyNotaryStorage) XXX_Size

func (m *HashOnlyNotaryStorage) XXX_Size() int

func (*HashOnlyNotaryStorage) XXX_Unmarshal

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

type LinkNotaryStorage

type LinkNotaryStorage struct {
	//存证内容的链接,可以写入URL,或者其他可用于定位源文件得线索.
	Link []byte `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"`
	//源文件得hash值,推荐使用sha256哈希,限制256位得摘要值
	Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	//自定义的主键,可以为空,如果没传,则用txhash为key
	Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	//字符串值
	Value                string   `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

链接存证模型

func (*LinkNotaryStorage) Descriptor

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

func (*LinkNotaryStorage) GetHash

func (m *LinkNotaryStorage) GetHash() []byte

func (*LinkNotaryStorage) GetKey

func (m *LinkNotaryStorage) GetKey() string
func (m *LinkNotaryStorage) GetLink() []byte

func (*LinkNotaryStorage) GetValue

func (m *LinkNotaryStorage) GetValue() string

func (*LinkNotaryStorage) ProtoMessage

func (*LinkNotaryStorage) ProtoMessage()

func (*LinkNotaryStorage) Reset

func (m *LinkNotaryStorage) Reset()

func (*LinkNotaryStorage) String

func (m *LinkNotaryStorage) String() string

func (*LinkNotaryStorage) XXX_DiscardUnknown

func (m *LinkNotaryStorage) XXX_DiscardUnknown()

func (*LinkNotaryStorage) XXX_Marshal

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

func (*LinkNotaryStorage) XXX_Merge

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

func (*LinkNotaryStorage) XXX_Size

func (m *LinkNotaryStorage) XXX_Size() int

func (*LinkNotaryStorage) XXX_Unmarshal

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

type QueryStorage

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

根据txhash去状态数据库中查询存储内容

func (*QueryStorage) Descriptor

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

func (*QueryStorage) GetTxHash

func (m *QueryStorage) GetTxHash() string

func (*QueryStorage) ProtoMessage

func (*QueryStorage) ProtoMessage()

func (*QueryStorage) Reset

func (m *QueryStorage) Reset()

func (*QueryStorage) String

func (m *QueryStorage) String() string

func (*QueryStorage) XXX_DiscardUnknown

func (m *QueryStorage) XXX_DiscardUnknown()

func (*QueryStorage) XXX_Marshal

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

func (*QueryStorage) XXX_Merge

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

func (*QueryStorage) XXX_Size

func (m *QueryStorage) XXX_Size() int

func (*QueryStorage) XXX_Unmarshal

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

type ReceiptStorage

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

func (*ReceiptStorage) Descriptor

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

func (*ReceiptStorage) ProtoMessage

func (*ReceiptStorage) ProtoMessage()

func (*ReceiptStorage) Reset

func (m *ReceiptStorage) Reset()

func (*ReceiptStorage) String

func (m *ReceiptStorage) String() string

func (*ReceiptStorage) XXX_DiscardUnknown

func (m *ReceiptStorage) XXX_DiscardUnknown()

func (*ReceiptStorage) XXX_Marshal

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

func (*ReceiptStorage) XXX_Merge

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

func (*ReceiptStorage) XXX_Size

func (m *ReceiptStorage) XXX_Size() int

func (*ReceiptStorage) XXX_Unmarshal

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

type Storage

type Storage struct {
	// Types that are valid to be assigned to Value:
	//	*Storage_ContentStorage
	//	*Storage_HashStorage
	//	*Storage_LinkStorage
	//	*Storage_EncryptStorage
	//	*Storage_EncryptShareStorage
	Value                isStorage_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 (*Storage) Descriptor

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

func (*Storage) GetContentStorage

func (m *Storage) GetContentStorage() *ContentOnlyNotaryStorage

func (*Storage) GetEncryptShareStorage

func (m *Storage) GetEncryptShareStorage() *EncryptShareNotaryStorage

func (*Storage) GetEncryptStorage

func (m *Storage) GetEncryptStorage() *EncryptNotaryStorage

func (*Storage) GetHashStorage

func (m *Storage) GetHashStorage() *HashOnlyNotaryStorage

func (*Storage) GetLinkStorage

func (m *Storage) GetLinkStorage() *LinkNotaryStorage

func (*Storage) GetTy

func (m *Storage) GetTy() int32

func (*Storage) GetValue

func (m *Storage) GetValue() isStorage_Value

func (*Storage) ProtoMessage

func (*Storage) ProtoMessage()

func (*Storage) Reset

func (m *Storage) Reset()

func (*Storage) String

func (m *Storage) String() string

func (*Storage) XXX_DiscardUnknown

func (m *Storage) XXX_DiscardUnknown()

func (*Storage) XXX_Marshal

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

func (*Storage) XXX_Merge

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

func (*Storage) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*Storage) XXX_Size

func (m *Storage) XXX_Size() int

func (*Storage) XXX_Unmarshal

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

type StorageAction

type StorageAction struct {
	// Types that are valid to be assigned to Value:
	//	*StorageAction_ContentStorage
	//	*StorageAction_HashStorage
	//	*StorageAction_LinkStorage
	//	*StorageAction_EncryptStorage
	//	*StorageAction_EncryptShareStorage
	Value                isStorageAction_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 (*StorageAction) Descriptor

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

func (*StorageAction) GetContentStorage

func (m *StorageAction) GetContentStorage() *ContentOnlyNotaryStorage

func (*StorageAction) GetEncryptShareStorage

func (m *StorageAction) GetEncryptShareStorage() *EncryptShareNotaryStorage

func (*StorageAction) GetEncryptStorage

func (m *StorageAction) GetEncryptStorage() *EncryptNotaryStorage

func (*StorageAction) GetHashStorage

func (m *StorageAction) GetHashStorage() *HashOnlyNotaryStorage

func (*StorageAction) GetLinkStorage

func (m *StorageAction) GetLinkStorage() *LinkNotaryStorage

func (*StorageAction) GetTy

func (m *StorageAction) GetTy() int32

func (*StorageAction) GetValue

func (m *StorageAction) GetValue() isStorageAction_Value

func (*StorageAction) ProtoMessage

func (*StorageAction) ProtoMessage()

func (*StorageAction) Reset

func (m *StorageAction) Reset()

func (*StorageAction) String

func (m *StorageAction) String() string

func (*StorageAction) XXX_DiscardUnknown

func (m *StorageAction) XXX_DiscardUnknown()

func (*StorageAction) XXX_Marshal

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

func (*StorageAction) XXX_Merge

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

func (*StorageAction) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*StorageAction) XXX_Size

func (m *StorageAction) XXX_Size() int

func (*StorageAction) XXX_Unmarshal

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

type StorageAction_ContentStorage

type StorageAction_ContentStorage struct {
	ContentStorage *ContentOnlyNotaryStorage `protobuf:"bytes,1,opt,name=contentStorage,proto3,oneof"`
}

type StorageAction_EncryptShareStorage

type StorageAction_EncryptShareStorage struct {
	EncryptShareStorage *EncryptShareNotaryStorage `protobuf:"bytes,5,opt,name=encryptShareStorage,proto3,oneof"`
}

type StorageAction_EncryptStorage

type StorageAction_EncryptStorage struct {
	EncryptStorage *EncryptNotaryStorage `protobuf:"bytes,4,opt,name=encryptStorage,proto3,oneof"`
}

type StorageAction_HashStorage

type StorageAction_HashStorage struct {
	HashStorage *HashOnlyNotaryStorage `protobuf:"bytes,2,opt,name=hashStorage,proto3,oneof"`
}

type StorageAction_LinkStorage

type StorageAction_LinkStorage struct {
	LinkStorage *LinkNotaryStorage `protobuf:"bytes,3,opt,name=linkStorage,proto3,oneof"`
}

type StorageClient

type StorageClient interface {
}

StorageClient is the client API for Storage service.

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

func NewStorageClient

func NewStorageClient(cc grpc.ClientConnInterface) StorageClient

type StorageServer

type StorageServer interface {
}

StorageServer is the server API for Storage service.

type StorageType

type StorageType struct {
	types.ExecTypeBase
}

StorageType ...

func NewType

func NewType(cfg *types.Chain33Config) *StorageType

NewType ...

func (*StorageType) GetLogMap

func (s *StorageType) GetLogMap() map[int64]*types.LogInfo

GetLogMap 获取合约log相关信息

func (*StorageType) GetPayload

func (s *StorageType) GetPayload() types.Message

GetPayload 获取合约action结构

func (*StorageType) GetTypeMap

func (s *StorageType) GetTypeMap() map[string]int32

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

type Storage_ContentStorage

type Storage_ContentStorage struct {
	ContentStorage *ContentOnlyNotaryStorage `protobuf:"bytes,1,opt,name=contentStorage,proto3,oneof"`
}

type Storage_EncryptShareStorage

type Storage_EncryptShareStorage struct {
	EncryptShareStorage *EncryptShareNotaryStorage `protobuf:"bytes,5,opt,name=encryptShareStorage,proto3,oneof"`
}

type Storage_EncryptStorage

type Storage_EncryptStorage struct {
	EncryptStorage *EncryptNotaryStorage `protobuf:"bytes,4,opt,name=encryptStorage,proto3,oneof"`
}

type Storage_HashStorage

type Storage_HashStorage struct {
	HashStorage *HashOnlyNotaryStorage `protobuf:"bytes,2,opt,name=hashStorage,proto3,oneof"`
}

type Storage_LinkStorage

type Storage_LinkStorage struct {
	LinkStorage *LinkNotaryStorage `protobuf:"bytes,3,opt,name=linkStorage,proto3,oneof"`
}

type UnimplementedStorageServer

type UnimplementedStorageServer struct {
}

UnimplementedStorageServer 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