online

package
v0.8.13-pre5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 15 Imported by: 4

Documentation

Index

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)
	DoDailyStatusReportHandler(ctx context.Context, in *ReqSignMetrics, opts ...grpc.CallOption) (*Result, error)
	GetLastDailySignedInfoHandler(ctx context.Context, in *ReqLastDailySignedInfo, 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)
	DoDailyStatusReportHandler(context.Context, *ReqSignMetrics) (*Result, error)
	GetLastDailySignedInfoHandler(context.Context, *ReqLastDailySignedInfo) (*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) MarshalTo

func (m *PayLoadInfo) MarshalTo(dAtA []byte) (int, 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 ReqLastDailySignedInfo added in v0.8.13

type ReqLastDailySignedInfo struct {
	PeerId               string   `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty" pg:"peer_id"`
	XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"`
	XXX_unrecognized     []byte   `json:"-" pg:"-"`
	XXX_sizecache        int32    `json:"-" pg:"-"`
}

func (*ReqLastDailySignedInfo) Descriptor added in v0.8.13

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

func (*ReqLastDailySignedInfo) GetPeerId added in v0.8.13

func (m *ReqLastDailySignedInfo) GetPeerId() string

func (*ReqLastDailySignedInfo) Marshal added in v0.8.13

func (m *ReqLastDailySignedInfo) Marshal() (dAtA []byte, err error)

func (*ReqLastDailySignedInfo) MarshalTo added in v0.8.13

func (m *ReqLastDailySignedInfo) MarshalTo(dAtA []byte) (int, error)

func (*ReqLastDailySignedInfo) MarshalToSizedBuffer added in v0.8.13

func (m *ReqLastDailySignedInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ReqLastDailySignedInfo) ProtoMessage added in v0.8.13

func (*ReqLastDailySignedInfo) ProtoMessage()

func (*ReqLastDailySignedInfo) Reset added in v0.8.13

func (m *ReqLastDailySignedInfo) Reset()

func (*ReqLastDailySignedInfo) Size added in v0.8.13

func (m *ReqLastDailySignedInfo) Size() (n int)

func (*ReqLastDailySignedInfo) String added in v0.8.13

func (m *ReqLastDailySignedInfo) String() string

func (*ReqLastDailySignedInfo) Unmarshal added in v0.8.13

func (m *ReqLastDailySignedInfo) Unmarshal(dAtA []byte) error

func (*ReqLastDailySignedInfo) XXX_DiscardUnknown added in v0.8.13

func (m *ReqLastDailySignedInfo) XXX_DiscardUnknown()

func (*ReqLastDailySignedInfo) XXX_Marshal added in v0.8.13

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

func (*ReqLastDailySignedInfo) XXX_Merge added in v0.8.13

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

func (*ReqLastDailySignedInfo) XXX_MessageName added in v0.8.13

func (*ReqLastDailySignedInfo) XXX_MessageName() string

func (*ReqLastDailySignedInfo) XXX_Size added in v0.8.13

func (m *ReqLastDailySignedInfo) XXX_Size() int

func (*ReqLastDailySignedInfo) XXX_Unmarshal added in v0.8.13

func (m *ReqLastDailySignedInfo) 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) MarshalTo

func (m *ReqSignMetrics) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *RespSignMetrics) MarshalTo(dAtA []byte) (int, 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 Result added in v0.8.13

type Result 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"`
	ResponseTime         time.Time    `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-" pg:"-"`
	XXX_unrecognized     []byte       `json:"-" pg:"-"`
	XXX_sizecache        int32        `json:"-" pg:"-"`
}

func (*Result) Descriptor added in v0.8.13

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

func (*Result) GetCode added in v0.8.13

func (m *Result) GetCode() ResponseCode

func (*Result) GetMessage added in v0.8.13

func (m *Result) GetMessage() string

func (*Result) GetResponseTime added in v0.8.13

func (m *Result) GetResponseTime() time.Time

func (*Result) Marshal added in v0.8.13

func (m *Result) Marshal() (dAtA []byte, err error)

func (*Result) MarshalTo added in v0.8.13

func (m *Result) MarshalTo(dAtA []byte) (int, error)

func (*Result) MarshalToSizedBuffer added in v0.8.13

func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Result) ProtoMessage added in v0.8.13

func (*Result) ProtoMessage()

func (*Result) Reset added in v0.8.13

func (m *Result) Reset()

func (*Result) Size added in v0.8.13

func (m *Result) Size() (n int)

func (*Result) String added in v0.8.13

func (m *Result) String() string

func (*Result) Unmarshal added in v0.8.13

func (m *Result) Unmarshal(dAtA []byte) error

func (*Result) XXX_DiscardUnknown added in v0.8.13

func (m *Result) XXX_DiscardUnknown()

func (*Result) XXX_Marshal added in v0.8.13

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

func (*Result) XXX_Merge added in v0.8.13

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

func (*Result) XXX_MessageName added in v0.8.13

func (*Result) XXX_MessageName() string

func (*Result) XXX_Size added in v0.8.13

func (m *Result) XXX_Size() int

func (*Result) XXX_Unmarshal added in v0.8.13

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

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) MarshalTo

func (m *SignedInfo) MarshalTo(dAtA []byte) (int, 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) DoDailyStatusReportHandler

func (*UnimplementedOnlineServiceServer) DoDailyStatusReportHandler(ctx context.Context, req *ReqSignMetrics) (*Result, error)

func (*UnimplementedOnlineServiceServer) GetLastDailySignedInfoHandler

func (*UnimplementedOnlineServiceServer) GetLastDailySignedInfoHandler(ctx context.Context, req *ReqLastDailySignedInfo) (*RespSignMetrics, error)

func (*UnimplementedOnlineServiceServer) UpdateSignMetrics

Jump to

Keyboard shortcuts

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