pb

package
v0.0.0-...-45d551c Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetAccount

func (x *Metadata) GetAccount() float64

func (*Metadata) GetCode

func (x *Metadata) GetCode() string

func (*Metadata) GetDate

func (x *Metadata) GetDate() string

func (*Metadata) GetHigh

func (x *Metadata) GetHigh() float64

func (*Metadata) GetLatest

func (x *Metadata) GetLatest() float64

func (*Metadata) GetLow

func (x *Metadata) GetLow() float64

func (*Metadata) GetName

func (x *Metadata) GetName() string

func (*Metadata) GetOpen

func (x *Metadata) GetOpen() float64

func (*Metadata) GetSuspend

func (x *Metadata) GetSuspend() string

func (*Metadata) GetTime

func (x *Metadata) GetTime() string

func (*Metadata) GetVolume

func (x *Metadata) GetVolume() uint64

func (*Metadata) GetYesterdayClosed

func (x *Metadata) GetYesterdayClosed() float64

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

func (x *Metadata) ProtoReflect() protoreflect.Message

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type UnimplementedDatasourceServer

type UnimplementedDatasourceServer struct {
}

UnimplementedDatasourceServer must be embedded to have forward compatible implementations.

func (UnimplementedDatasourceServer) PullData

func (UnimplementedDatasourceServer) Version

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.

Jump to

Keyboard shortcuts

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