proto

package
v0.0.0-...-286033a Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	OrderService_ListOrders_FullMethodName                = "/order.OrderService/ListOrders"
	OrderService_GetOrderCreationResources_FullMethodName = "/order.OrderService/GetOrderCreationResources"
	OrderService_CreateOrder_FullMethodName               = "/order.OrderService/CreateOrder"
	OrderService_DeleteOrder_FullMethodName               = "/order.OrderService/DeleteOrder"
)

Variables

View Source
var File_proto_order_proto protoreflect.FileDescriptor
View Source
var OrderService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "order.OrderService",
	HandlerType: (*OrderServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListOrders",
			Handler:    _OrderService_ListOrders_Handler,
		},
		{
			MethodName: "GetOrderCreationResources",
			Handler:    _OrderService_GetOrderCreationResources_Handler,
		},
		{
			MethodName: "CreateOrder",
			Handler:    _OrderService_CreateOrder_Handler,
		},
		{
			MethodName: "DeleteOrder",
			Handler:    _OrderService_DeleteOrder_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/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 CatalogItem

type CatalogItem struct {
	Id    string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogItem) Descriptor deprecated

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

Deprecated: Use CatalogItem.ProtoReflect.Descriptor instead.

func (*CatalogItem) GetId

func (x *CatalogItem) GetId() string

func (*CatalogItem) GetName

func (x *CatalogItem) GetName() string

func (*CatalogItem) GetPrice

func (x *CatalogItem) GetPrice() float64

func (*CatalogItem) ProtoMessage

func (*CatalogItem) ProtoMessage()

func (*CatalogItem) ProtoReflect

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

func (*CatalogItem) Reset

func (x *CatalogItem) Reset()

func (*CatalogItem) String

func (x *CatalogItem) String() string

type CreateOrderRequest

type CreateOrderRequest struct {
	CustomerId string       `protobuf:"bytes,1,opt,name=customerId,proto3" json:"customerId,omitempty"`
	OrderLines []*OrderLine `protobuf:"bytes,2,rep,name=orderLines,proto3" json:"orderLines,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateOrderRequest) Descriptor deprecated

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

Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.

func (*CreateOrderRequest) GetCustomerId

func (x *CreateOrderRequest) GetCustomerId() string

func (*CreateOrderRequest) GetOrderLines

func (x *CreateOrderRequest) GetOrderLines() []*OrderLine

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 {
	// contains filtered or unexported fields
}

func (*CreateOrderResponse) Descriptor deprecated

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

Deprecated: Use CreateOrderResponse.ProtoReflect.Descriptor instead.

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 Customer

type Customer struct {
	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Email   string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Street  string `protobuf:"bytes,4,opt,name=street,proto3" json:"street,omitempty"`
	City    string `protobuf:"bytes,5,opt,name=city,proto3" json:"city,omitempty"`
	Country string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"`
	// contains filtered or unexported fields
}

func (*Customer) Descriptor deprecated

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

Deprecated: Use Customer.ProtoReflect.Descriptor instead.

func (*Customer) GetCity

func (x *Customer) GetCity() string

func (*Customer) GetCountry

func (x *Customer) GetCountry() string

func (*Customer) GetEmail

func (x *Customer) GetEmail() string

func (*Customer) GetId

func (x *Customer) GetId() string

func (*Customer) GetName

func (x *Customer) GetName() string

func (*Customer) GetStreet

func (x *Customer) GetStreet() string

func (*Customer) ProtoMessage

func (*Customer) ProtoMessage()

func (*Customer) ProtoReflect

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

func (*Customer) Reset

func (x *Customer) Reset()

func (*Customer) String

func (x *Customer) String() string

type DeleteOrderRequest

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

func (*DeleteOrderRequest) Descriptor deprecated

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

Deprecated: Use DeleteOrderRequest.ProtoReflect.Descriptor instead.

func (*DeleteOrderRequest) GetOrderId

func (x *DeleteOrderRequest) GetOrderId() string

func (*DeleteOrderRequest) ProtoMessage

func (*DeleteOrderRequest) ProtoMessage()

func (*DeleteOrderRequest) ProtoReflect

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

func (*DeleteOrderRequest) Reset

func (x *DeleteOrderRequest) Reset()

func (*DeleteOrderRequest) String

func (x *DeleteOrderRequest) String() string

type DeleteOrderResponse

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

func (*DeleteOrderResponse) Descriptor deprecated

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

Deprecated: Use DeleteOrderResponse.ProtoReflect.Descriptor instead.

func (*DeleteOrderResponse) ProtoMessage

func (*DeleteOrderResponse) ProtoMessage()

func (*DeleteOrderResponse) ProtoReflect

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

func (*DeleteOrderResponse) Reset

func (x *DeleteOrderResponse) Reset()

func (*DeleteOrderResponse) String

func (x *DeleteOrderResponse) String() string

type GetOrderCreationResourcesRequest

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

func (*GetOrderCreationResourcesRequest) Descriptor deprecated

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

Deprecated: Use GetOrderCreationResourcesRequest.ProtoReflect.Descriptor instead.

func (*GetOrderCreationResourcesRequest) ProtoMessage

func (*GetOrderCreationResourcesRequest) ProtoMessage()

func (*GetOrderCreationResourcesRequest) ProtoReflect

func (*GetOrderCreationResourcesRequest) Reset

func (*GetOrderCreationResourcesRequest) String

type GetOrderCreationResourcesResponse

type GetOrderCreationResourcesResponse struct {
	Customers []*Customer    `protobuf:"bytes,1,rep,name=customers,proto3" json:"customers,omitempty"`
	Items     []*CatalogItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*GetOrderCreationResourcesResponse) Descriptor deprecated

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

Deprecated: Use GetOrderCreationResourcesResponse.ProtoReflect.Descriptor instead.

func (*GetOrderCreationResourcesResponse) GetCustomers

func (x *GetOrderCreationResourcesResponse) GetCustomers() []*Customer

func (*GetOrderCreationResourcesResponse) GetItems

func (*GetOrderCreationResourcesResponse) ProtoMessage

func (*GetOrderCreationResourcesResponse) ProtoMessage()

func (*GetOrderCreationResourcesResponse) ProtoReflect

func (*GetOrderCreationResourcesResponse) Reset

func (*GetOrderCreationResourcesResponse) String

type ListOrdersRequest

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

func (*ListOrdersRequest) Descriptor deprecated

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

Deprecated: Use ListOrdersRequest.ProtoReflect.Descriptor instead.

func (*ListOrdersRequest) ProtoMessage

func (*ListOrdersRequest) ProtoMessage()

func (*ListOrdersRequest) ProtoReflect

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

func (*ListOrdersRequest) Reset

func (x *ListOrdersRequest) Reset()

func (*ListOrdersRequest) String

func (x *ListOrdersRequest) String() string

type ListOrdersResponse

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

func (*ListOrdersResponse) Descriptor deprecated

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

Deprecated: Use ListOrdersResponse.ProtoReflect.Descriptor instead.

func (*ListOrdersResponse) GetOrders

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

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 Order

type Order struct {
	Id         string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Customer   *Customer              `protobuf:"bytes,2,opt,name=customer,proto3" json:"customer,omitempty"`
	OrderDate  *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=order_date,json=orderDate,proto3" json:"order_date,omitempty"`
	OrderLines []*OrderLine           `protobuf:"bytes,4,rep,name=orderLines,proto3" json:"orderLines,omitempty"`
	TotalPrice float64                `protobuf:"fixed64,5,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"`
	// contains filtered or unexported fields
}

func (*Order) Descriptor deprecated

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

Deprecated: Use Order.ProtoReflect.Descriptor instead.

func (*Order) GetCustomer

func (x *Order) GetCustomer() *Customer

func (*Order) GetId

func (x *Order) GetId() string

func (*Order) GetOrderDate

func (x *Order) GetOrderDate() *timestamppb.Timestamp

func (*Order) GetOrderLines

func (x *Order) GetOrderLines() []*OrderLine

func (*Order) GetTotalPrice

func (x *Order) GetTotalPrice() float64

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) ProtoReflect

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

func (*Order) Reset

func (x *Order) Reset()

func (*Order) String

func (x *Order) String() string

type OrderLine

type OrderLine struct {
	Count int32        `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	Item  *CatalogItem `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderLine) Descriptor deprecated

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

Deprecated: Use OrderLine.ProtoReflect.Descriptor instead.

func (*OrderLine) GetCount

func (x *OrderLine) GetCount() int32

func (*OrderLine) GetItem

func (x *OrderLine) GetItem() *CatalogItem

func (*OrderLine) ProtoMessage

func (*OrderLine) ProtoMessage()

func (*OrderLine) ProtoReflect

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

func (*OrderLine) Reset

func (x *OrderLine) Reset()

func (*OrderLine) String

func (x *OrderLine) String() string

type OrderServiceClient

type OrderServiceClient interface {
	ListOrders(ctx context.Context, in *ListOrdersRequest, opts ...grpc.CallOption) (*ListOrdersResponse, error)
	GetOrderCreationResources(ctx context.Context, in *GetOrderCreationResourcesRequest, opts ...grpc.CallOption) (*GetOrderCreationResourcesResponse, error)
	CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error)
	DeleteOrder(ctx context.Context, in *DeleteOrderRequest, opts ...grpc.CallOption) (*DeleteOrderResponse, 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 {
	ListOrders(context.Context, *ListOrdersRequest) (*ListOrdersResponse, error)
	GetOrderCreationResources(context.Context, *GetOrderCreationResourcesRequest) (*GetOrderCreationResourcesResponse, error)
	CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
	DeleteOrder(context.Context, *DeleteOrderRequest) (*DeleteOrderResponse, error)
	// contains filtered or unexported methods
}

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

type UnimplementedOrderServiceServer

type UnimplementedOrderServiceServer struct{}

UnimplementedOrderServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedOrderServiceServer) CreateOrder

func (UnimplementedOrderServiceServer) DeleteOrder

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