pb

package
v0.0.0-...-66ac6bd Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrderService_CreateOrder_FullMethodName = "/pb.OrderService/CreateOrder"
	OrderService_ListOrders_FullMethodName  = "/pb.OrderService/ListOrders"
)

Variables

View Source
var File_internal_infra_grpc_protofiles_order_proto protoreflect.FileDescriptor
View Source
var OrderService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.OrderService",
	HandlerType: (*OrderServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateOrder",
			Handler:    _OrderService_CreateOrder_Handler,
		},
		{
			MethodName: "ListOrders",
			Handler:    _OrderService_ListOrders_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/infra/grpc/protofiles/order.proto",
}

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

Functions

func RegisterOrderServiceServer

func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer)

Types

type Blank

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

func (*Blank) Descriptor deprecated

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

Deprecated: Use Blank.ProtoReflect.Descriptor instead.

func (*Blank) ProtoMessage

func (*Blank) ProtoMessage()

func (*Blank) ProtoReflect

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

func (*Blank) Reset

func (x *Blank) Reset()

func (*Blank) String

func (x *Blank) String() string

type CreateOrderRequest

type CreateOrderRequest struct {
	Id    string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Price float32 `protobuf:"fixed32,2,opt,name=price,proto3" json:"price,omitempty"`
	Tax   float32 `protobuf:"fixed32,3,opt,name=tax,proto3" json:"tax,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateOrderRequest) Descriptor deprecated

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

Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.

func (*CreateOrderRequest) GetId

func (x *CreateOrderRequest) GetId() string

func (*CreateOrderRequest) GetPrice

func (x *CreateOrderRequest) GetPrice() float32

func (*CreateOrderRequest) GetTax

func (x *CreateOrderRequest) GetTax() float32

func (*CreateOrderRequest) ProtoMessage

func (*CreateOrderRequest) ProtoMessage()

func (*CreateOrderRequest) ProtoReflect

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

func (*CreateOrderRequest) Reset

func (x *CreateOrderRequest) Reset()

func (*CreateOrderRequest) String

func (x *CreateOrderRequest) String() string

type CreateOrderResponse

type CreateOrderResponse struct {
	Id         string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Price      float32 `protobuf:"fixed32,2,opt,name=price,proto3" json:"price,omitempty"`
	Tax        float32 `protobuf:"fixed32,3,opt,name=tax,proto3" json:"tax,omitempty"`
	FinalPrice float32 `protobuf:"fixed32,4,opt,name=final_price,json=finalPrice,proto3" json:"final_price,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateOrderResponse) Descriptor deprecated

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

Deprecated: Use CreateOrderResponse.ProtoReflect.Descriptor instead.

func (*CreateOrderResponse) GetFinalPrice

func (x *CreateOrderResponse) GetFinalPrice() float32

func (*CreateOrderResponse) GetId

func (x *CreateOrderResponse) GetId() string

func (*CreateOrderResponse) GetPrice

func (x *CreateOrderResponse) GetPrice() float32

func (*CreateOrderResponse) GetTax

func (x *CreateOrderResponse) GetTax() float32

func (*CreateOrderResponse) ProtoMessage

func (*CreateOrderResponse) ProtoMessage()

func (*CreateOrderResponse) ProtoReflect

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

func (*CreateOrderResponse) Reset

func (x *CreateOrderResponse) Reset()

func (*CreateOrderResponse) String

func (x *CreateOrderResponse) String() string

type ListOrdersResponse

type ListOrdersResponse struct {
	Id         string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Price      float32 `protobuf:"fixed32,2,opt,name=price,proto3" json:"price,omitempty"`
	Tax        float32 `protobuf:"fixed32,3,opt,name=tax,proto3" json:"tax,omitempty"`
	FinalPrice float32 `protobuf:"fixed32,4,opt,name=final_price,json=finalPrice,proto3" json:"final_price,omitempty"`
	// contains filtered or unexported fields
}

func (*ListOrdersResponse) Descriptor deprecated

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

Deprecated: Use ListOrdersResponse.ProtoReflect.Descriptor instead.

func (*ListOrdersResponse) GetFinalPrice

func (x *ListOrdersResponse) GetFinalPrice() float32

func (*ListOrdersResponse) GetId

func (x *ListOrdersResponse) GetId() string

func (*ListOrdersResponse) GetPrice

func (x *ListOrdersResponse) GetPrice() float32

func (*ListOrdersResponse) GetTax

func (x *ListOrdersResponse) GetTax() float32

func (*ListOrdersResponse) ProtoMessage

func (*ListOrdersResponse) ProtoMessage()

func (*ListOrdersResponse) ProtoReflect

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

func (*ListOrdersResponse) Reset

func (x *ListOrdersResponse) Reset()

func (*ListOrdersResponse) String

func (x *ListOrdersResponse) String() string

type OrderServiceClient

type OrderServiceClient interface {
	CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error)
	ListOrders(ctx context.Context, in *Blank, opts ...grpc.CallOption) (*OrdersList, error)
}

OrderServiceClient is the client API for OrderService 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.

type OrderServiceServer

type OrderServiceServer interface {
	CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
	ListOrders(context.Context, *Blank) (*OrdersList, error)
	// contains filtered or unexported methods
}

OrderServiceServer is the server API for OrderService service. All implementations must embed UnimplementedOrderServiceServer for forward compatibility

type OrdersList

type OrdersList struct {
	Orders []*ListOrdersResponse `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"`
	// contains filtered or unexported fields
}

func (*OrdersList) Descriptor deprecated

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

Deprecated: Use OrdersList.ProtoReflect.Descriptor instead.

func (*OrdersList) GetOrders

func (x *OrdersList) GetOrders() []*ListOrdersResponse

func (*OrdersList) ProtoMessage

func (*OrdersList) ProtoMessage()

func (*OrdersList) ProtoReflect

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

func (*OrdersList) Reset

func (x *OrdersList) Reset()

func (*OrdersList) String

func (x *OrdersList) String() string

type UnimplementedOrderServiceServer

type UnimplementedOrderServiceServer struct {
}

UnimplementedOrderServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedOrderServiceServer) CreateOrder

func (UnimplementedOrderServiceServer) ListOrders

type UnsafeOrderServiceServer

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

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

Jump to

Keyboard shortcuts

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