Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type Count
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata) GetAccount() float64
- func (x *Metadata) GetCode() string
- func (x *Metadata) GetDate() string
- func (x *Metadata) GetHigh() float64
- func (x *Metadata) GetLatest() float64
- func (x *Metadata) GetLow() float64
- func (x *Metadata) GetName() string
- func (x *Metadata) GetOpen() float64
- func (x *Metadata) GetSuspend() string
- func (x *Metadata) GetTime() string
- func (x *Metadata) GetVolume() uint64
- func (x *Metadata) GetYesterdayClosed() float64
- func (*Metadata) ProtoMessage()
- func (x *Metadata) ProtoReflect() protoreflect.Message
- func (x *Metadata) Reset()
- func (x *Metadata) String() string
- type Quote
- func (*Quote) Descriptor() ([]byte, []int)deprecated
- func (x *Quote) GetAccount() float64
- func (x *Quote) GetClose() float64
- func (x *Quote) GetCode() string
- func (x *Quote) GetDate() string
- func (x *Quote) GetHigh() float64
- func (x *Quote) GetLow() float64
- func (x *Quote) GetNumOfYear() int32
- func (x *Quote) GetOpen() float64
- func (x *Quote) GetVolume() uint64
- func (x *Quote) GetYesterdayClosed() float64
- func (*Quote) ProtoMessage()
- func (x *Quote) ProtoReflect() protoreflect.Message
- func (x *Quote) Reset()
- func (x *Quote) String() string
- type QuoteRequest
- func (*QuoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QuoteRequest) GetCode() string
- func (x *QuoteRequest) GetDate() string
- func (x *QuoteRequest) GetLimit() int64
- func (x *QuoteRequest) GetMode() QuoteRequest_Mode
- func (*QuoteRequest) ProtoMessage()
- func (x *QuoteRequest) ProtoReflect() protoreflect.Message
- func (x *QuoteRequest) Reset()
- func (x *QuoteRequest) String() string
- type QuoteRequest_Mode
- func (QuoteRequest_Mode) Descriptor() protoreflect.EnumDescriptor
- func (x QuoteRequest_Mode) Enum() *QuoteRequest_Mode
- func (QuoteRequest_Mode) EnumDescriptor() ([]byte, []int)deprecated
- func (x QuoteRequest_Mode) Number() protoreflect.EnumNumber
- func (x QuoteRequest_Mode) String() string
- func (QuoteRequest_Mode) Type() protoreflect.EnumType
- type ServiceClient
- type ServiceServer
- type Service_GetQuoteLatestClient
- type Service_GetQuoteLatestServer
- type Service_GetStockFullClient
- type Service_GetStockFullServer
- type Service_PushDataClient
- type Service_PushDataServer
- type Stock
- type Task
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetCallbackUrl() string
- func (x *Task) GetDate() string
- func (x *Task) GetDayCount() int64
- func (x *Task) GetMetadataCount() int64
- func (x *Task) GetStockCount() int64
- func (x *Task) GetWeekCount() int64
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- type UnimplementedServiceServer
- func (UnimplementedServiceServer) Complete(context.Context, *Task) (*emptypb.Empty, error)
- func (UnimplementedServiceServer) CreateTask(context.Context, *Task) (*emptypb.Empty, error)
- func (UnimplementedServiceServer) GetQuoteLatest(*QuoteRequest, Service_GetQuoteLatestServer) error
- func (UnimplementedServiceServer) GetStockFull(*emptypb.Empty, Service_GetStockFullServer) error
- func (UnimplementedServiceServer) PushData(Service_PushDataServer) error
- func (UnimplementedServiceServer) Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
- type UnsafeServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( QuoteRequest_Mode_name = map[int32]string{ 0: "Day", 1: "Week", } QuoteRequest_Mode_value = map[string]int32{ "Day": 0, "Week": 1, } )
Enum value maps for QuoteRequest_Mode.
var File_repository_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "repository.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _Service_Version_Handler, }, { MethodName: "CreateTask", Handler: _Service_CreateTask_Handler, }, { MethodName: "Complete", Handler: _Service_Complete_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "PushData", Handler: _Service_PushData_Handler, ClientStreams: true, }, { StreamName: "GetStockFull", Handler: _Service_GetStockFull_Handler, ServerStreams: true, }, { StreamName: "GetQuoteLatest", Handler: _Service_GetQuoteLatest_Handler, ServerStreams: true, }, }, Metadata: "repository.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type Count ¶
type Count struct { Stock int64 `protobuf:"varint,1,opt,name=stock,proto3" json:"stock,omitempty"` Day int64 `protobuf:"varint,2,opt,name=day,proto3" json:"day,omitempty"` Week int64 `protobuf:"varint,3,opt,name=week,proto3" json:"week,omitempty"` // contains filtered or unexported fields }
func (*Count) Descriptor
deprecated
func (*Count) ProtoMessage ¶
func (*Count) ProtoMessage()
func (*Count) ProtoReflect ¶
func (x *Count) ProtoReflect() protoreflect.Message
type Metadata ¶
type Metadata struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Open float64 `protobuf:"fixed64,3,opt,name=open,proto3" json:"open,omitempty"` YesterdayClosed float64 `protobuf:"fixed64,4,opt,name=yesterday_closed,json=yesterdayClosed,proto3" json:"yesterday_closed,omitempty"` Latest float64 `protobuf:"fixed64,5,opt,name=latest,proto3" json:"latest,omitempty"` High float64 `protobuf:"fixed64,6,opt,name=high,proto3" json:"high,omitempty"` Low float64 `protobuf:"fixed64,7,opt,name=low,proto3" json:"low,omitempty"` Volume uint64 `protobuf:"varint,8,opt,name=volume,proto3" json:"volume,omitempty"` Account float64 `protobuf:"fixed64,9,opt,name=account,proto3" json:"account,omitempty"` Date string `protobuf:"bytes,10,opt,name=date,proto3" json:"date,omitempty"` Time string `protobuf:"bytes,11,opt,name=time,proto3" json:"time,omitempty"` Suspend string `protobuf:"bytes,12,opt,name=suspend,proto3" json:"suspend,omitempty"` // contains filtered or unexported fields }
func (*Metadata) Descriptor
deprecated
func (*Metadata) GetAccount ¶
func (*Metadata) GetSuspend ¶
func (*Metadata) GetYesterdayClosed ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
type Quote ¶
type Quote struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` Open float64 `protobuf:"fixed64,2,opt,name=open,proto3" json:"open,omitempty"` Close float64 `protobuf:"fixed64,3,opt,name=close,proto3" json:"close,omitempty"` High float64 `protobuf:"fixed64,4,opt,name=high,proto3" json:"high,omitempty"` Low float64 `protobuf:"fixed64,5,opt,name=low,proto3" json:"low,omitempty"` YesterdayClosed float64 `protobuf:"fixed64,6,opt,name=yesterday_closed,json=yesterdayClosed,proto3" json:"yesterday_closed,omitempty"` Volume uint64 `protobuf:"varint,7,opt,name=volume,proto3" json:"volume,omitempty"` Account float64 `protobuf:"fixed64,8,opt,name=account,proto3" json:"account,omitempty"` Date string `protobuf:"bytes,9,opt,name=date,proto3" json:"date,omitempty"` NumOfYear int32 `protobuf:"varint,10,opt,name=num_of_year,json=numOfYear,proto3" json:"num_of_year,omitempty"` // contains filtered or unexported fields }
func (*Quote) Descriptor
deprecated
func (*Quote) GetAccount ¶
func (*Quote) GetNumOfYear ¶
func (*Quote) GetYesterdayClosed ¶
func (*Quote) ProtoMessage ¶
func (*Quote) ProtoMessage()
func (*Quote) ProtoReflect ¶
func (x *Quote) ProtoReflect() protoreflect.Message
type QuoteRequest ¶
type QuoteRequest struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` Date string `protobuf:"bytes,2,opt,name=date,proto3" json:"date,omitempty"` Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` Mode QuoteRequest_Mode `protobuf:"varint,4,opt,name=mode,proto3,enum=repository.QuoteRequest_Mode" json:"mode,omitempty"` // contains filtered or unexported fields }
func (*QuoteRequest) Descriptor
deprecated
func (*QuoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use QuoteRequest.ProtoReflect.Descriptor instead.
func (*QuoteRequest) GetCode ¶
func (x *QuoteRequest) GetCode() string
func (*QuoteRequest) GetDate ¶
func (x *QuoteRequest) GetDate() string
func (*QuoteRequest) GetLimit ¶
func (x *QuoteRequest) GetLimit() int64
func (*QuoteRequest) GetMode ¶
func (x *QuoteRequest) GetMode() QuoteRequest_Mode
func (*QuoteRequest) ProtoMessage ¶
func (*QuoteRequest) ProtoMessage()
func (*QuoteRequest) ProtoReflect ¶
func (x *QuoteRequest) ProtoReflect() protoreflect.Message
func (*QuoteRequest) Reset ¶
func (x *QuoteRequest) Reset()
func (*QuoteRequest) String ¶
func (x *QuoteRequest) String() string
type QuoteRequest_Mode ¶
type QuoteRequest_Mode int32
const ( QuoteRequest_Day QuoteRequest_Mode = 0 QuoteRequest_Week QuoteRequest_Mode = 1 )
func (QuoteRequest_Mode) Descriptor ¶
func (QuoteRequest_Mode) Descriptor() protoreflect.EnumDescriptor
func (QuoteRequest_Mode) Enum ¶
func (x QuoteRequest_Mode) Enum() *QuoteRequest_Mode
func (QuoteRequest_Mode) EnumDescriptor
deprecated
func (QuoteRequest_Mode) EnumDescriptor() ([]byte, []int)
Deprecated: Use QuoteRequest_Mode.Descriptor instead.
func (QuoteRequest_Mode) Number ¶
func (x QuoteRequest_Mode) Number() protoreflect.EnumNumber
func (QuoteRequest_Mode) String ¶
func (x QuoteRequest_Mode) String() string
func (QuoteRequest_Mode) Type ¶
func (QuoteRequest_Mode) Type() protoreflect.EnumType
type ServiceClient ¶
type ServiceClient interface { Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) CreateTask(ctx context.Context, in *Task, opts ...grpc.CallOption) (*emptypb.Empty, error) Complete(ctx context.Context, in *Task, opts ...grpc.CallOption) (*emptypb.Empty, error) PushData(ctx context.Context, opts ...grpc.CallOption) (Service_PushDataClient, error) GetStockFull(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Service_GetStockFullClient, error) GetQuoteLatest(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (Service_GetQuoteLatestClient, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) CreateTask(context.Context, *Task) (*emptypb.Empty, error) Complete(context.Context, *Task) (*emptypb.Empty, error) PushData(Service_PushDataServer) error GetStockFull(*emptypb.Empty, Service_GetStockFullServer) error GetQuoteLatest(*QuoteRequest, Service_GetQuoteLatestServer) error // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type Service_GetQuoteLatestClient ¶
type Service_GetQuoteLatestClient interface { Recv() (*Quote, error) grpc.ClientStream }
type Service_GetQuoteLatestServer ¶
type Service_GetQuoteLatestServer interface { Send(*Quote) error grpc.ServerStream }
type Service_GetStockFullClient ¶
type Service_GetStockFullClient interface { Recv() (*Stock, error) grpc.ClientStream }
type Service_GetStockFullServer ¶
type Service_GetStockFullServer interface { Send(*Stock) error grpc.ServerStream }
type Service_PushDataClient ¶
type Service_PushDataServer ¶
type Stock ¶
type Stock struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Suspend string `protobuf:"bytes,3,opt,name=suspend,proto3" json:"suspend,omitempty"` // contains filtered or unexported fields }
func (*Stock) Descriptor
deprecated
func (*Stock) GetSuspend ¶
func (*Stock) ProtoMessage ¶
func (*Stock) ProtoMessage()
func (*Stock) ProtoReflect ¶
func (x *Stock) ProtoReflect() protoreflect.Message
type Task ¶
type Task struct { Date string `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"` MetadataCount int64 `protobuf:"varint,2,opt,name=metadata_count,json=metadataCount,proto3" json:"metadata_count,omitempty"` StockCount int64 `protobuf:"varint,3,opt,name=stock_count,json=stockCount,proto3" json:"stock_count,omitempty"` DayCount int64 `protobuf:"varint,4,opt,name=day_count,json=dayCount,proto3" json:"day_count,omitempty"` WeekCount int64 `protobuf:"varint,5,opt,name=week_count,json=weekCount,proto3" json:"week_count,omitempty"` CallbackUrl string `protobuf:"bytes,6,opt,name=callback_url,json=callbackUrl,proto3" json:"callback_url,omitempty"` // contains filtered or unexported fields }
func (*Task) Descriptor
deprecated
func (*Task) GetCallbackUrl ¶
func (*Task) GetDayCount ¶
func (*Task) GetMetadataCount ¶
func (*Task) GetStockCount ¶
func (*Task) GetWeekCount ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) CreateTask ¶
func (UnimplementedServiceServer) GetQuoteLatest ¶
func (UnimplementedServiceServer) GetQuoteLatest(*QuoteRequest, Service_GetQuoteLatestServer) error
func (UnimplementedServiceServer) GetStockFull ¶
func (UnimplementedServiceServer) GetStockFull(*emptypb.Empty, Service_GetStockFullServer) error
func (UnimplementedServiceServer) PushData ¶
func (UnimplementedServiceServer) PushData(Service_PushDataServer) error
func (UnimplementedServiceServer) Version ¶
func (UnimplementedServiceServer) Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.