pb

package
v0.0.0-...-d2b7790 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

View Source
var Repo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "repository.Repo",
	HandlerType: (*RepoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Build",
			Handler:    _Repo_Build_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetStockFull",
			Handler:       _Repo_GetStockFull_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetQuoteLatest",
			Handler:       _Repo_GetQuoteLatest_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "repo.proto",
}

Repo_ServiceDesc is the grpc.ServiceDesc for Repo service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRepoServer

func RegisterRepoServer(s grpc.ServiceRegistrar, srv RepoServer)

Types

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

Deprecated: Use Quote.ProtoReflect.Descriptor instead.

func (*Quote) GetAccount

func (x *Quote) GetAccount() float64

func (*Quote) GetClose

func (x *Quote) GetClose() float64

func (*Quote) GetCode

func (x *Quote) GetCode() string

func (*Quote) GetDate

func (x *Quote) GetDate() string

func (*Quote) GetHigh

func (x *Quote) GetHigh() float64

func (*Quote) GetLow

func (x *Quote) GetLow() float64

func (*Quote) GetNumOfYear

func (x *Quote) GetNumOfYear() int32

func (*Quote) GetOpen

func (x *Quote) GetOpen() float64

func (*Quote) GetVolume

func (x *Quote) GetVolume() uint64

func (*Quote) GetYesterdayClosed

func (x *Quote) GetYesterdayClosed() float64

func (*Quote) ProtoMessage

func (*Quote) ProtoMessage()

func (*Quote) ProtoReflect

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

func (*Quote) Reset

func (x *Quote) Reset()

func (*Quote) String

func (x *Quote) String() string

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

func (QuoteRequest_Mode) EnumDescriptor deprecated

func (QuoteRequest_Mode) EnumDescriptor() ([]byte, []int)

Deprecated: Use QuoteRequest_Mode.Descriptor instead.

func (QuoteRequest_Mode) Number

func (QuoteRequest_Mode) String

func (x QuoteRequest_Mode) String() string

func (QuoteRequest_Mode) Type

type RepoClient

type RepoClient interface {
	Build(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetStockFull(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Repo_GetStockFullClient, error)
	GetQuoteLatest(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (Repo_GetQuoteLatestClient, error)
}

RepoClient is the client API for Repo 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 NewRepoClient

func NewRepoClient(cc grpc.ClientConnInterface) RepoClient

type RepoServer

type RepoServer interface {
	Build(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
	GetStockFull(*emptypb.Empty, Repo_GetStockFullServer) error
	GetQuoteLatest(*QuoteRequest, Repo_GetQuoteLatestServer) error
	// contains filtered or unexported methods
}

RepoServer is the server API for Repo service. All implementations must embed UnimplementedRepoServer for forward compatibility

type Repo_GetQuoteLatestClient

type Repo_GetQuoteLatestClient interface {
	Recv() (*Quote, error)
	grpc.ClientStream
}

type Repo_GetQuoteLatestServer

type Repo_GetQuoteLatestServer interface {
	Send(*Quote) error
	grpc.ServerStream
}

type Repo_GetStockFullClient

type Repo_GetStockFullClient interface {
	Recv() (*Stock, error)
	grpc.ClientStream
}

type Repo_GetStockFullServer

type Repo_GetStockFullServer interface {
	Send(*Stock) error
	grpc.ServerStream
}

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

Deprecated: Use Stock.ProtoReflect.Descriptor instead.

func (*Stock) GetCode

func (x *Stock) GetCode() string

func (*Stock) GetName

func (x *Stock) GetName() string

func (*Stock) GetSuspend

func (x *Stock) GetSuspend() string

func (*Stock) ProtoMessage

func (*Stock) ProtoMessage()

func (*Stock) ProtoReflect

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

func (*Stock) Reset

func (x *Stock) Reset()

func (*Stock) String

func (x *Stock) String() string

type UnimplementedRepoServer

type UnimplementedRepoServer struct {
}

UnimplementedRepoServer must be embedded to have forward compatible implementations.

func (UnimplementedRepoServer) Build

func (UnimplementedRepoServer) GetQuoteLatest

func (UnimplementedRepoServer) GetStockFull

type UnsafeRepoServer

type UnsafeRepoServer interface {
	// contains filtered or unexported methods
}

UnsafeRepoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RepoServer will result in compilation errors.

Jump to

Keyboard shortcuts

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