Documentation ¶
Index ¶
- Variables
- func RegisterDatasourceServer(s grpc.ServiceRegistrar, srv DatasourceServer)
- type DatasourceClient
- type DatasourceServer
- type Datasource_PullDataClient
- type Datasource_PullDataServer
- 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 UnimplementedDatasourceServer
- type UnsafeDatasourceServer
Constants ¶
This section is empty.
Variables ¶
var Datasource_ServiceDesc = grpc.ServiceDesc{ ServiceName: "datasource.Datasource", HandlerType: (*DatasourceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _Datasource_Version_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "PullData", Handler: _Datasource_PullData_Handler, ServerStreams: true, }, }, Metadata: "datasource.proto", }
Datasource_ServiceDesc is the grpc.ServiceDesc for Datasource service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_datasource_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDatasourceServer ¶
func RegisterDatasourceServer(s grpc.ServiceRegistrar, srv DatasourceServer)
Types ¶
type DatasourceClient ¶
type DatasourceClient interface { Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) PullData(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (Datasource_PullDataClient, error) }
DatasourceClient is the client API for Datasource 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 NewDatasourceClient ¶
func NewDatasourceClient(cc grpc.ClientConnInterface) DatasourceClient
type DatasourceServer ¶
type DatasourceServer interface { Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) PullData(*wrapperspb.StringValue, Datasource_PullDataServer) error // contains filtered or unexported methods }
DatasourceServer is the server API for Datasource service. All implementations must embed UnimplementedDatasourceServer for forward compatibility
type Datasource_PullDataClient ¶
type Datasource_PullDataClient interface { Recv() (*Metadata, error) grpc.ClientStream }
type Datasource_PullDataServer ¶
type Datasource_PullDataServer interface { Send(*Metadata) error grpc.ServerStream }
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 UnimplementedDatasourceServer ¶
type UnimplementedDatasourceServer struct { }
UnimplementedDatasourceServer must be embedded to have forward compatible implementations.
func (UnimplementedDatasourceServer) PullData ¶
func (UnimplementedDatasourceServer) PullData(*wrapperspb.StringValue, Datasource_PullDataServer) error
func (UnimplementedDatasourceServer) Version ¶
func (UnimplementedDatasourceServer) Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
type UnsafeDatasourceServer ¶
type UnsafeDatasourceServer interface {
// contains filtered or unexported methods
}
UnsafeDatasourceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DatasourceServer will result in compilation errors.