Documentation ¶
Index ¶
- Constants
- func RegisterHsmSyncServer(s *grpc.Server, srv HsmSyncServer)
- type HsmSyncClient
- type HsmSyncServer
- type SyncFileReply
- type SyncFileRequest
- func (*SyncFileRequest) Descriptor() ([]byte, []int)
- func (m *SyncFileRequest) GetFileData() []byte
- func (m *SyncFileRequest) GetNodeAddr() string
- func (m *SyncFileRequest) GetNodePIN() string
- func (*SyncFileRequest) ProtoMessage()
- func (m *SyncFileRequest) Reset()
- func (m *SyncFileRequest) String() string
Constants ¶
View Source
const ( SYNC_PORT = ":20031" SYNC_NODE_KEY = "/.wanchain/server/server.key" SYNC_NODE_CERT = "/.wanchain/server/server.pem" SYNCFILE_ERROR_NONE = 0 SYNCFILE_ERROR_PIN = 1 SYNCFILE_ERROR_FILEDATA = 2 SYNCFILE_ERROR_UNKNOWN = 3 )
Variables ¶
This section is empty.
Functions ¶
func RegisterHsmSyncServer ¶
func RegisterHsmSyncServer(s *grpc.Server, srv HsmSyncServer)
Types ¶
type HsmSyncClient ¶
type HsmSyncClient interface { // Sends a sync file. SyncFile(ctx context.Context, in *SyncFileRequest, opts ...grpc.CallOption) (*SyncFileReply, error) }
func NewHsmSyncClient ¶
func NewHsmSyncClient(cc *grpc.ClientConn) HsmSyncClient
type HsmSyncServer ¶
type HsmSyncServer interface { // Sends a sync file. SyncFile(context.Context, *SyncFileRequest) (*SyncFileReply, error) }
type SyncFileReply ¶
type SyncFileReply struct {
ResCode int32 `protobuf:"varint,1,opt,name=resCode" json:"resCode,omitempty"`
}
The response message containing the greetings
func (*SyncFileReply) Descriptor ¶
func (*SyncFileReply) Descriptor() ([]byte, []int)
func (*SyncFileReply) GetResCode ¶
func (m *SyncFileReply) GetResCode() int32
func (*SyncFileReply) ProtoMessage ¶
func (*SyncFileReply) ProtoMessage()
func (*SyncFileReply) Reset ¶
func (m *SyncFileReply) Reset()
func (*SyncFileReply) String ¶
func (m *SyncFileReply) String() string
type SyncFileRequest ¶
type SyncFileRequest struct { NodeAddr string `protobuf:"bytes,1,opt,name=nodeAddr" json:"nodeAddr,omitempty"` NodePIN string `protobuf:"bytes,2,opt,name=nodePIN" json:"nodePIN,omitempty"` FileData []byte `protobuf:"bytes,3,opt,name=fileData,proto3" json:"fileData,omitempty"` }
The request message containing the user's name.
func (*SyncFileRequest) Descriptor ¶
func (*SyncFileRequest) Descriptor() ([]byte, []int)
func (*SyncFileRequest) GetFileData ¶
func (m *SyncFileRequest) GetFileData() []byte
func (*SyncFileRequest) GetNodeAddr ¶
func (m *SyncFileRequest) GetNodeAddr() string
func (*SyncFileRequest) GetNodePIN ¶
func (m *SyncFileRequest) GetNodePIN() string
func (*SyncFileRequest) ProtoMessage ¶
func (*SyncFileRequest) ProtoMessage()
func (*SyncFileRequest) Reset ¶
func (m *SyncFileRequest) Reset()
func (*SyncFileRequest) String ¶
func (m *SyncFileRequest) String() string
Click to show internal directories.
Click to hide internal directories.