Documentation ¶
Index ¶
- Variables
- func RegisterOnlineServiceServer(s *grpc.Server, srv OnlineServiceServer)
- type OnlineServiceClient
- type OnlineServiceServer
- type PayLoadInfo
- func (*PayLoadInfo) Descriptor() ([]byte, []int)
- func (m *PayLoadInfo) GetLastSignature() string
- func (m *PayLoadInfo) GetLastSignedInfo() *SignedInfo
- func (m *PayLoadInfo) GetLastTime() time.Time
- func (m *PayLoadInfo) GetNode() *node.Node
- func (m *PayLoadInfo) GetNodeId() string
- func (m *PayLoadInfo) Marshal() (dAtA []byte, err error)
- func (m *PayLoadInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *PayLoadInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PayLoadInfo) ProtoMessage()
- func (m *PayLoadInfo) Reset()
- func (m *PayLoadInfo) Size() (n int)
- func (m *PayLoadInfo) String() string
- func (m *PayLoadInfo) Unmarshal(dAtA []byte) error
- func (m *PayLoadInfo) XXX_DiscardUnknown()
- func (m *PayLoadInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PayLoadInfo) XXX_Merge(src proto.Message)
- func (*PayLoadInfo) XXX_MessageName() string
- func (m *PayLoadInfo) XXX_Size() int
- func (m *PayLoadInfo) XXX_Unmarshal(b []byte) error
- type ReqSignMetrics
- func (*ReqSignMetrics) Descriptor() ([]byte, []int)
- func (m *ReqSignMetrics) GetPayload() []byte
- func (m *ReqSignMetrics) GetPublicKey() []byte
- func (m *ReqSignMetrics) GetSignature() []byte
- func (m *ReqSignMetrics) Marshal() (dAtA []byte, err error)
- func (m *ReqSignMetrics) MarshalTo(dAtA []byte) (int, error)
- func (m *ReqSignMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ReqSignMetrics) ProtoMessage()
- func (m *ReqSignMetrics) Reset()
- func (m *ReqSignMetrics) Size() (n int)
- func (m *ReqSignMetrics) String() string
- func (m *ReqSignMetrics) Unmarshal(dAtA []byte) error
- func (m *ReqSignMetrics) XXX_DiscardUnknown()
- func (m *ReqSignMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReqSignMetrics) XXX_Merge(src proto.Message)
- func (*ReqSignMetrics) XXX_MessageName() string
- func (m *ReqSignMetrics) XXX_Size() int
- func (m *ReqSignMetrics) XXX_Unmarshal(b []byte) error
- type RespSignMetrics
- func (*RespSignMetrics) Descriptor() ([]byte, []int)
- func (m *RespSignMetrics) GetCode() ResponseCode
- func (m *RespSignMetrics) GetMessage() string
- func (m *RespSignMetrics) GetSignature() string
- func (m *RespSignMetrics) GetSignedInfo() *SignedInfo
- func (m *RespSignMetrics) Marshal() (dAtA []byte, err error)
- func (m *RespSignMetrics) MarshalTo(dAtA []byte) (int, error)
- func (m *RespSignMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RespSignMetrics) ProtoMessage()
- func (m *RespSignMetrics) Reset()
- func (m *RespSignMetrics) Size() (n int)
- func (m *RespSignMetrics) String() string
- func (m *RespSignMetrics) Unmarshal(dAtA []byte) error
- func (m *RespSignMetrics) XXX_DiscardUnknown()
- func (m *RespSignMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RespSignMetrics) XXX_Merge(src proto.Message)
- func (*RespSignMetrics) XXX_MessageName() string
- func (m *RespSignMetrics) XXX_Size() int
- func (m *RespSignMetrics) XXX_Unmarshal(b []byte) error
- type ResponseCode
- type SignedInfo
- func (*SignedInfo) Descriptor() ([]byte, []int)
- func (m *SignedInfo) GetBttcAddress() string
- func (m *SignedInfo) GetCreatedTime() uint32
- func (m *SignedInfo) GetNonce() uint32
- func (m *SignedInfo) GetPeer() string
- func (m *SignedInfo) GetSignedTime() uint32
- func (m *SignedInfo) GetVersion() string
- func (m *SignedInfo) Marshal() (dAtA []byte, err error)
- func (m *SignedInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *SignedInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SignedInfo) ProtoMessage()
- func (m *SignedInfo) Reset()
- func (m *SignedInfo) Size() (n int)
- func (m *SignedInfo) String() string
- func (m *SignedInfo) Unmarshal(dAtA []byte) error
- func (m *SignedInfo) XXX_DiscardUnknown()
- func (m *SignedInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignedInfo) XXX_Merge(src proto.Message)
- func (*SignedInfo) XXX_MessageName() string
- func (m *SignedInfo) XXX_Size() int
- func (m *SignedInfo) XXX_Unmarshal(b []byte) error
- type UnimplementedOnlineServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthOnline = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowOnline = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupOnline = fmt.Errorf("proto: unexpected end of group") )
View Source
var ResponseCode_name = map[int32]string{
0: "SUCCESS",
1: "SIGNATURE_FORMAT_ERROR",
2: "COMPUTE_ADDRESS_ERROR",
3: "TIMEOUT_ERROR",
20: "OTHER_ERROR",
}
View Source
var ResponseCode_value = map[string]int32{
"SUCCESS": 0,
"SIGNATURE_FORMAT_ERROR": 1,
"COMPUTE_ADDRESS_ERROR": 2,
"TIMEOUT_ERROR": 3,
"OTHER_ERROR": 20,
}
Functions ¶
func RegisterOnlineServiceServer ¶
func RegisterOnlineServiceServer(s *grpc.Server, srv OnlineServiceServer)
Types ¶
type OnlineServiceClient ¶
type OnlineServiceClient interface {
UpdateSignMetrics(ctx context.Context, in *ReqSignMetrics, opts ...grpc.CallOption) (*RespSignMetrics, error)
}
OnlineServiceClient is the client API for OnlineService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewOnlineServiceClient ¶
func NewOnlineServiceClient(cc *grpc.ClientConn) OnlineServiceClient
type OnlineServiceServer ¶
type OnlineServiceServer interface {
UpdateSignMetrics(context.Context, *ReqSignMetrics) (*RespSignMetrics, error)
}
OnlineServiceServer is the server API for OnlineService service.
type PayLoadInfo ¶
type PayLoadInfo struct { NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` Node *node.Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty" pg:"node"` LastSignedInfo *SignedInfo `` /* 127-byte string literal not displayed */ LastSignature string `protobuf:"bytes,4,opt,name=last_signature,json=lastSignature,proto3" json:"last_signature,omitempty" pg:"last_signature"` LastTime time.Time `protobuf:"bytes,5,opt,name=last_time,json=lastTime,proto3,stdtime" json:"last_time" pg:"last_time"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*PayLoadInfo) Descriptor ¶
func (*PayLoadInfo) Descriptor() ([]byte, []int)
func (*PayLoadInfo) GetLastSignature ¶
func (m *PayLoadInfo) GetLastSignature() string
func (*PayLoadInfo) GetLastSignedInfo ¶
func (m *PayLoadInfo) GetLastSignedInfo() *SignedInfo
func (*PayLoadInfo) GetLastTime ¶
func (m *PayLoadInfo) GetLastTime() time.Time
func (*PayLoadInfo) GetNode ¶
func (m *PayLoadInfo) GetNode() *node.Node
func (*PayLoadInfo) GetNodeId ¶
func (m *PayLoadInfo) GetNodeId() string
func (*PayLoadInfo) Marshal ¶
func (m *PayLoadInfo) Marshal() (dAtA []byte, err error)
func (*PayLoadInfo) MarshalToSizedBuffer ¶
func (m *PayLoadInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PayLoadInfo) ProtoMessage ¶
func (*PayLoadInfo) ProtoMessage()
func (*PayLoadInfo) Reset ¶
func (m *PayLoadInfo) Reset()
func (*PayLoadInfo) Size ¶
func (m *PayLoadInfo) Size() (n int)
func (*PayLoadInfo) String ¶
func (m *PayLoadInfo) String() string
func (*PayLoadInfo) Unmarshal ¶
func (m *PayLoadInfo) Unmarshal(dAtA []byte) error
func (*PayLoadInfo) XXX_DiscardUnknown ¶
func (m *PayLoadInfo) XXX_DiscardUnknown()
func (*PayLoadInfo) XXX_Marshal ¶
func (m *PayLoadInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PayLoadInfo) XXX_Merge ¶
func (m *PayLoadInfo) XXX_Merge(src proto.Message)
func (*PayLoadInfo) XXX_MessageName ¶
func (*PayLoadInfo) XXX_MessageName() string
func (*PayLoadInfo) XXX_Size ¶
func (m *PayLoadInfo) XXX_Size() int
func (*PayLoadInfo) XXX_Unmarshal ¶
func (m *PayLoadInfo) XXX_Unmarshal(b []byte) error
type ReqSignMetrics ¶
type ReqSignMetrics struct { PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" pg:"public_key"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty" pg:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*ReqSignMetrics) Descriptor ¶
func (*ReqSignMetrics) Descriptor() ([]byte, []int)
func (*ReqSignMetrics) GetPayload ¶
func (m *ReqSignMetrics) GetPayload() []byte
func (*ReqSignMetrics) GetPublicKey ¶
func (m *ReqSignMetrics) GetPublicKey() []byte
func (*ReqSignMetrics) GetSignature ¶
func (m *ReqSignMetrics) GetSignature() []byte
func (*ReqSignMetrics) Marshal ¶
func (m *ReqSignMetrics) Marshal() (dAtA []byte, err error)
func (*ReqSignMetrics) MarshalToSizedBuffer ¶
func (m *ReqSignMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ReqSignMetrics) ProtoMessage ¶
func (*ReqSignMetrics) ProtoMessage()
func (*ReqSignMetrics) Reset ¶
func (m *ReqSignMetrics) Reset()
func (*ReqSignMetrics) Size ¶
func (m *ReqSignMetrics) Size() (n int)
func (*ReqSignMetrics) String ¶
func (m *ReqSignMetrics) String() string
func (*ReqSignMetrics) Unmarshal ¶
func (m *ReqSignMetrics) Unmarshal(dAtA []byte) error
func (*ReqSignMetrics) XXX_DiscardUnknown ¶
func (m *ReqSignMetrics) XXX_DiscardUnknown()
func (*ReqSignMetrics) XXX_Marshal ¶
func (m *ReqSignMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReqSignMetrics) XXX_Merge ¶
func (m *ReqSignMetrics) XXX_Merge(src proto.Message)
func (*ReqSignMetrics) XXX_MessageName ¶
func (*ReqSignMetrics) XXX_MessageName() string
func (*ReqSignMetrics) XXX_Size ¶
func (m *ReqSignMetrics) XXX_Size() int
func (*ReqSignMetrics) XXX_Unmarshal ¶
func (m *ReqSignMetrics) XXX_Unmarshal(b []byte) error
type RespSignMetrics ¶
type RespSignMetrics struct { Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=online.ResponseCode" json:"code,omitempty" pg:"code"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` SignedInfo *SignedInfo `protobuf:"bytes,3,opt,name=signed_info,json=signedInfo,proto3" json:"signed_info,omitempty" pg:"signed_info"` Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*RespSignMetrics) Descriptor ¶
func (*RespSignMetrics) Descriptor() ([]byte, []int)
func (*RespSignMetrics) GetCode ¶
func (m *RespSignMetrics) GetCode() ResponseCode
func (*RespSignMetrics) GetMessage ¶
func (m *RespSignMetrics) GetMessage() string
func (*RespSignMetrics) GetSignature ¶
func (m *RespSignMetrics) GetSignature() string
func (*RespSignMetrics) GetSignedInfo ¶
func (m *RespSignMetrics) GetSignedInfo() *SignedInfo
func (*RespSignMetrics) Marshal ¶
func (m *RespSignMetrics) Marshal() (dAtA []byte, err error)
func (*RespSignMetrics) MarshalToSizedBuffer ¶
func (m *RespSignMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RespSignMetrics) ProtoMessage ¶
func (*RespSignMetrics) ProtoMessage()
func (*RespSignMetrics) Reset ¶
func (m *RespSignMetrics) Reset()
func (*RespSignMetrics) Size ¶
func (m *RespSignMetrics) Size() (n int)
func (*RespSignMetrics) String ¶
func (m *RespSignMetrics) String() string
func (*RespSignMetrics) Unmarshal ¶
func (m *RespSignMetrics) Unmarshal(dAtA []byte) error
func (*RespSignMetrics) XXX_DiscardUnknown ¶
func (m *RespSignMetrics) XXX_DiscardUnknown()
func (*RespSignMetrics) XXX_Marshal ¶
func (m *RespSignMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RespSignMetrics) XXX_Merge ¶
func (m *RespSignMetrics) XXX_Merge(src proto.Message)
func (*RespSignMetrics) XXX_MessageName ¶
func (*RespSignMetrics) XXX_MessageName() string
func (*RespSignMetrics) XXX_Size ¶
func (m *RespSignMetrics) XXX_Size() int
func (*RespSignMetrics) XXX_Unmarshal ¶
func (m *RespSignMetrics) XXX_Unmarshal(b []byte) error
type ResponseCode ¶
type ResponseCode int32
const ( ResponseCode_SUCCESS ResponseCode = 0 ResponseCode_SIGNATURE_FORMAT_ERROR ResponseCode = 1 ResponseCode_COMPUTE_ADDRESS_ERROR ResponseCode = 2 ResponseCode_TIMEOUT_ERROR ResponseCode = 3 ResponseCode_OTHER_ERROR ResponseCode = 20 )
func (ResponseCode) EnumDescriptor ¶
func (ResponseCode) EnumDescriptor() ([]byte, []int)
func (ResponseCode) String ¶
func (x ResponseCode) String() string
type SignedInfo ¶
type SignedInfo struct { Peer string `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty" pg:"peer"` CreatedTime uint32 `protobuf:"varint,2,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty" pg:"created_time"` Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty" pg:"version"` Nonce uint32 `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty" pg:"nonce"` BttcAddress string `protobuf:"bytes,5,opt,name=bttc_address,json=bttcAddress,proto3" json:"bttc_address,omitempty" pg:"bttc_address"` SignedTime uint32 `protobuf:"varint,6,opt,name=signed_time,json=signedTime,proto3" json:"signed_time,omitempty" pg:"signed_time"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*SignedInfo) Descriptor ¶
func (*SignedInfo) Descriptor() ([]byte, []int)
func (*SignedInfo) GetBttcAddress ¶
func (m *SignedInfo) GetBttcAddress() string
func (*SignedInfo) GetCreatedTime ¶
func (m *SignedInfo) GetCreatedTime() uint32
func (*SignedInfo) GetNonce ¶
func (m *SignedInfo) GetNonce() uint32
func (*SignedInfo) GetPeer ¶
func (m *SignedInfo) GetPeer() string
func (*SignedInfo) GetSignedTime ¶
func (m *SignedInfo) GetSignedTime() uint32
func (*SignedInfo) GetVersion ¶
func (m *SignedInfo) GetVersion() string
func (*SignedInfo) Marshal ¶
func (m *SignedInfo) Marshal() (dAtA []byte, err error)
func (*SignedInfo) MarshalToSizedBuffer ¶
func (m *SignedInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignedInfo) ProtoMessage ¶
func (*SignedInfo) ProtoMessage()
func (*SignedInfo) Reset ¶
func (m *SignedInfo) Reset()
func (*SignedInfo) Size ¶
func (m *SignedInfo) Size() (n int)
func (*SignedInfo) String ¶
func (m *SignedInfo) String() string
func (*SignedInfo) Unmarshal ¶
func (m *SignedInfo) Unmarshal(dAtA []byte) error
func (*SignedInfo) XXX_DiscardUnknown ¶
func (m *SignedInfo) XXX_DiscardUnknown()
func (*SignedInfo) XXX_Marshal ¶
func (m *SignedInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SignedInfo) XXX_Merge ¶
func (m *SignedInfo) XXX_Merge(src proto.Message)
func (*SignedInfo) XXX_MessageName ¶
func (*SignedInfo) XXX_MessageName() string
func (*SignedInfo) XXX_Size ¶
func (m *SignedInfo) XXX_Size() int
func (*SignedInfo) XXX_Unmarshal ¶
func (m *SignedInfo) XXX_Unmarshal(b []byte) error
type UnimplementedOnlineServiceServer ¶
type UnimplementedOnlineServiceServer struct { }
UnimplementedOnlineServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedOnlineServiceServer) UpdateSignMetrics ¶
func (*UnimplementedOnlineServiceServer) UpdateSignMetrics(ctx context.Context, req *ReqSignMetrics) (*RespSignMetrics, error)
Click to show internal directories.
Click to hide internal directories.