proto

package
v0.0.0-...-34481b2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_proto_price_proto protoreflect.FileDescriptor
View Source
var Price_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Price",
	HandlerType: (*PriceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Fetch",
			Handler:    _Price_Fetch_Handler,
		},
		{
			MethodName: "List",
			Handler:    _Price_List_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/proto/price.proto",
}

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

Functions

func RegisterPriceServer

func RegisterPriceServer(s grpc.ServiceRegistrar, srv PriceServer)

Types

type FetchReply

type FetchReply struct {
	// contains filtered or unexported fields
}

func (*FetchReply) Descriptor deprecated

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

Deprecated: Use FetchReply.ProtoReflect.Descriptor instead.

func (*FetchReply) ProtoMessage

func (*FetchReply) ProtoMessage()

func (*FetchReply) ProtoReflect

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

func (*FetchReply) Reset

func (x *FetchReply) Reset()

func (*FetchReply) String

func (x *FetchReply) String() string

type FetchRequest

type FetchRequest struct {
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchRequest) Descriptor deprecated

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

Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead.

func (*FetchRequest) GetUrl

func (x *FetchRequest) GetUrl() string

func (*FetchRequest) ProtoMessage

func (*FetchRequest) ProtoMessage()

func (*FetchRequest) ProtoReflect

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

func (*FetchRequest) Reset

func (x *FetchRequest) Reset()

func (*FetchRequest) String

func (x *FetchRequest) String() string

type ListReply

type ListReply struct {
	Results []*ListReply_Price `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*ListReply) Descriptor deprecated

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

Deprecated: Use ListReply.ProtoReflect.Descriptor instead.

func (*ListReply) GetResults

func (x *ListReply) GetResults() []*ListReply_Price

func (*ListReply) ProtoMessage

func (*ListReply) ProtoMessage()

func (*ListReply) ProtoReflect

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

func (*ListReply) Reset

func (x *ListReply) Reset()

func (*ListReply) String

func (x *ListReply) String() string

type ListReply_Price

type ListReply_Price struct {
	Name      string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Price     float64                `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"`
	Changes   int64                  `protobuf:"varint,3,opt,name=changes,proto3" json:"changes,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ListReply_Price) Descriptor deprecated

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

Deprecated: Use ListReply_Price.ProtoReflect.Descriptor instead.

func (*ListReply_Price) GetChanges

func (x *ListReply_Price) GetChanges() int64

func (*ListReply_Price) GetName

func (x *ListReply_Price) GetName() string

func (*ListReply_Price) GetPrice

func (x *ListReply_Price) GetPrice() float64

func (*ListReply_Price) GetUpdatedAt

func (x *ListReply_Price) GetUpdatedAt() *timestamppb.Timestamp

func (*ListReply_Price) ProtoMessage

func (*ListReply_Price) ProtoMessage()

func (*ListReply_Price) ProtoReflect

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

func (*ListReply_Price) Reset

func (x *ListReply_Price) Reset()

func (*ListReply_Price) String

func (x *ListReply_Price) String() string

type ListRequest

type ListRequest struct {
	Skip      int64  `protobuf:"varint,2,opt,name=skip,proto3" json:"skip,omitempty"`
	Limit     int64  `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	OrderBy   string `protobuf:"bytes,4,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
	OrderType int32  `protobuf:"varint,5,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetLimit

func (x *ListRequest) GetLimit() int64

func (*ListRequest) GetOrderBy

func (x *ListRequest) GetOrderBy() string

func (*ListRequest) GetOrderType

func (x *ListRequest) GetOrderType() int32

func (*ListRequest) GetSkip

func (x *ListRequest) GetSkip() int64

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type PriceClient

type PriceClient interface {
	Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchReply, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error)
}

PriceClient is the client API for Price 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 NewPriceClient

func NewPriceClient(cc grpc.ClientConnInterface) PriceClient

type PriceServer

type PriceServer interface {
	Fetch(context.Context, *FetchRequest) (*FetchReply, error)
	List(context.Context, *ListRequest) (*ListReply, error)
	// contains filtered or unexported methods
}

PriceServer is the server API for Price service. All implementations must embed UnimplementedPriceServer for forward compatibility

type UnimplementedPriceServer

type UnimplementedPriceServer struct {
}

UnimplementedPriceServer must be embedded to have forward compatible implementations.

func (UnimplementedPriceServer) Fetch

func (UnimplementedPriceServer) List

type UnsafePriceServer

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

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

Jump to

Keyboard shortcuts

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