Documentation ¶
Index ¶
- Variables
- func RegisterCartServer(s grpc.ServiceRegistrar, srv CartServer)
- type AddItemReply
- type AddItemRequest
- func (*AddItemRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddItemRequest) GetItemId() int64
- func (x *AddItemRequest) GetQuantity() int64
- func (x *AddItemRequest) GetUid() int64
- func (*AddItemRequest) ProtoMessage()
- func (x *AddItemRequest) ProtoReflect() protoreflect.Message
- func (x *AddItemRequest) Reset()
- func (x *AddItemRequest) String() string
- type CartClient
- type CartServer
- type DeleteCartReply
- type DeleteCartRequest
- type DeleteItemReply
- type DeleteItemRequest
- func (*DeleteItemRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteItemRequest) GetItemId() int64
- func (x *DeleteItemRequest) GetUid() int64
- func (*DeleteItemRequest) ProtoMessage()
- func (x *DeleteItemRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteItemRequest) Reset()
- func (x *DeleteItemRequest) String() string
- type GetCartReply
- type GetCartRequest
- type Item
- type UnimplementedCartServer
- func (UnimplementedCartServer) AddItem(context.Context, *AddItemRequest) (*AddItemReply, error)
- func (UnimplementedCartServer) DeleteCart(context.Context, *DeleteCartRequest) (*DeleteCartReply, error)
- func (UnimplementedCartServer) DeleteItem(context.Context, *DeleteItemRequest) (*DeleteItemReply, error)
- func (UnimplementedCartServer) GetCart(context.Context, *GetCartRequest) (*GetCartReply, error)
- func (UnimplementedCartServer) UpdateItem(context.Context, *UpdateItemRequest) (*UpdateItemReply, error)
- type UnsafeCartServer
- type UpdateItemReply
- type UpdateItemRequest
- func (*UpdateItemRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateItemRequest) GetItemId() int64
- func (x *UpdateItemRequest) GetQuantity() int64
- func (x *UpdateItemRequest) GetUid() int64
- func (*UpdateItemRequest) ProtoMessage()
- func (x *UpdateItemRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateItemRequest) Reset()
- func (x *UpdateItemRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var Cart_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.cart.service.v1.Cart", HandlerType: (*CartServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetCart", Handler: _Cart_GetCart_Handler, }, { MethodName: "DeleteCart", Handler: _Cart_DeleteCart_Handler, }, { MethodName: "AddItem", Handler: _Cart_AddItem_Handler, }, { MethodName: "UpdateItem", Handler: _Cart_UpdateItem_Handler, }, { MethodName: "DeleteItem", Handler: _Cart_DeleteItem_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/cart/service/v1/cart.proto", }
Cart_ServiceDesc is the grpc.ServiceDesc for Cart service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_cart_service_v1_cart_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCartServer ¶
func RegisterCartServer(s grpc.ServiceRegistrar, srv CartServer)
Types ¶
type AddItemReply ¶
type AddItemReply struct { Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*AddItemReply) Descriptor
deprecated
func (*AddItemReply) Descriptor() ([]byte, []int)
Deprecated: Use AddItemReply.ProtoReflect.Descriptor instead.
func (*AddItemReply) GetItems ¶
func (x *AddItemReply) GetItems() []*Item
func (*AddItemReply) ProtoMessage ¶
func (*AddItemReply) ProtoMessage()
func (*AddItemReply) ProtoReflect ¶
func (x *AddItemReply) ProtoReflect() protoreflect.Message
func (*AddItemReply) Reset ¶
func (x *AddItemReply) Reset()
func (*AddItemReply) String ¶
func (x *AddItemReply) String() string
type AddItemRequest ¶
type AddItemRequest struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` ItemId int64 `protobuf:"varint,2,opt,name=itemId,proto3" json:"itemId,omitempty"` Quantity int64 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*AddItemRequest) Descriptor
deprecated
func (*AddItemRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddItemRequest.ProtoReflect.Descriptor instead.
func (*AddItemRequest) GetItemId ¶
func (x *AddItemRequest) GetItemId() int64
func (*AddItemRequest) GetQuantity ¶
func (x *AddItemRequest) GetQuantity() int64
func (*AddItemRequest) GetUid ¶
func (x *AddItemRequest) GetUid() int64
func (*AddItemRequest) ProtoMessage ¶
func (*AddItemRequest) ProtoMessage()
func (*AddItemRequest) ProtoReflect ¶
func (x *AddItemRequest) ProtoReflect() protoreflect.Message
func (*AddItemRequest) Reset ¶
func (x *AddItemRequest) Reset()
func (*AddItemRequest) String ¶
func (x *AddItemRequest) String() string
type CartClient ¶
type CartClient interface { GetCart(ctx context.Context, in *GetCartRequest, opts ...grpc.CallOption) (*GetCartReply, error) DeleteCart(ctx context.Context, in *DeleteCartRequest, opts ...grpc.CallOption) (*DeleteCartReply, error) AddItem(ctx context.Context, in *AddItemRequest, opts ...grpc.CallOption) (*AddItemReply, error) UpdateItem(ctx context.Context, in *UpdateItemRequest, opts ...grpc.CallOption) (*UpdateItemReply, error) DeleteItem(ctx context.Context, in *DeleteItemRequest, opts ...grpc.CallOption) (*DeleteItemReply, error) }
CartClient is the client API for Cart 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 NewCartClient ¶
func NewCartClient(cc grpc.ClientConnInterface) CartClient
type CartServer ¶
type CartServer interface { GetCart(context.Context, *GetCartRequest) (*GetCartReply, error) DeleteCart(context.Context, *DeleteCartRequest) (*DeleteCartReply, error) AddItem(context.Context, *AddItemRequest) (*AddItemReply, error) UpdateItem(context.Context, *UpdateItemRequest) (*UpdateItemReply, error) DeleteItem(context.Context, *DeleteItemRequest) (*DeleteItemReply, error) // contains filtered or unexported methods }
CartServer is the server API for Cart service. All implementations must embed UnimplementedCartServer for forward compatibility
type DeleteCartReply ¶
type DeleteCartReply struct {
// contains filtered or unexported fields
}
func (*DeleteCartReply) Descriptor
deprecated
func (*DeleteCartReply) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCartReply.ProtoReflect.Descriptor instead.
func (*DeleteCartReply) ProtoMessage ¶
func (*DeleteCartReply) ProtoMessage()
func (*DeleteCartReply) ProtoReflect ¶
func (x *DeleteCartReply) ProtoReflect() protoreflect.Message
func (*DeleteCartReply) Reset ¶
func (x *DeleteCartReply) Reset()
func (*DeleteCartReply) String ¶
func (x *DeleteCartReply) String() string
type DeleteCartRequest ¶
type DeleteCartRequest struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
func (*DeleteCartRequest) Descriptor
deprecated
func (*DeleteCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCartRequest.ProtoReflect.Descriptor instead.
func (*DeleteCartRequest) GetUid ¶
func (x *DeleteCartRequest) GetUid() int64
func (*DeleteCartRequest) ProtoMessage ¶
func (*DeleteCartRequest) ProtoMessage()
func (*DeleteCartRequest) ProtoReflect ¶
func (x *DeleteCartRequest) ProtoReflect() protoreflect.Message
func (*DeleteCartRequest) Reset ¶
func (x *DeleteCartRequest) Reset()
func (*DeleteCartRequest) String ¶
func (x *DeleteCartRequest) String() string
type DeleteItemReply ¶
type DeleteItemReply struct { Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*DeleteItemReply) Descriptor
deprecated
func (*DeleteItemReply) Descriptor() ([]byte, []int)
Deprecated: Use DeleteItemReply.ProtoReflect.Descriptor instead.
func (*DeleteItemReply) GetItems ¶
func (x *DeleteItemReply) GetItems() []*Item
func (*DeleteItemReply) ProtoMessage ¶
func (*DeleteItemReply) ProtoMessage()
func (*DeleteItemReply) ProtoReflect ¶
func (x *DeleteItemReply) ProtoReflect() protoreflect.Message
func (*DeleteItemReply) Reset ¶
func (x *DeleteItemReply) Reset()
func (*DeleteItemReply) String ¶
func (x *DeleteItemReply) String() string
type DeleteItemRequest ¶
type DeleteItemRequest struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` ItemId int64 `protobuf:"varint,2,opt,name=itemId,proto3" json:"itemId,omitempty"` // contains filtered or unexported fields }
func (*DeleteItemRequest) Descriptor
deprecated
func (*DeleteItemRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteItemRequest.ProtoReflect.Descriptor instead.
func (*DeleteItemRequest) GetItemId ¶
func (x *DeleteItemRequest) GetItemId() int64
func (*DeleteItemRequest) GetUid ¶
func (x *DeleteItemRequest) GetUid() int64
func (*DeleteItemRequest) ProtoMessage ¶
func (*DeleteItemRequest) ProtoMessage()
func (*DeleteItemRequest) ProtoReflect ¶
func (x *DeleteItemRequest) ProtoReflect() protoreflect.Message
func (*DeleteItemRequest) Reset ¶
func (x *DeleteItemRequest) Reset()
func (*DeleteItemRequest) String ¶
func (x *DeleteItemRequest) String() string
type GetCartReply ¶
type GetCartReply struct { Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*GetCartReply) Descriptor
deprecated
func (*GetCartReply) Descriptor() ([]byte, []int)
Deprecated: Use GetCartReply.ProtoReflect.Descriptor instead.
func (*GetCartReply) GetItems ¶
func (x *GetCartReply) GetItems() []*Item
func (*GetCartReply) ProtoMessage ¶
func (*GetCartReply) ProtoMessage()
func (*GetCartReply) ProtoReflect ¶
func (x *GetCartReply) ProtoReflect() protoreflect.Message
func (*GetCartReply) Reset ¶
func (x *GetCartReply) Reset()
func (*GetCartReply) String ¶
func (x *GetCartReply) String() string
type GetCartRequest ¶
type GetCartRequest struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
func (*GetCartRequest) Descriptor
deprecated
func (*GetCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCartRequest.ProtoReflect.Descriptor instead.
func (*GetCartRequest) GetUid ¶
func (x *GetCartRequest) GetUid() int64
func (*GetCartRequest) ProtoMessage ¶
func (*GetCartRequest) ProtoMessage()
func (*GetCartRequest) ProtoReflect ¶
func (x *GetCartRequest) ProtoReflect() protoreflect.Message
func (*GetCartRequest) Reset ¶
func (x *GetCartRequest) Reset()
func (*GetCartRequest) String ¶
func (x *GetCartRequest) String() string
type Item ¶
type Item struct { ItemId int64 `protobuf:"varint,1,opt,name=itemId,proto3" json:"itemId,omitempty"` Quantity int64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) GetQuantity ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type UnimplementedCartServer ¶
type UnimplementedCartServer struct { }
UnimplementedCartServer must be embedded to have forward compatible implementations.
func (UnimplementedCartServer) AddItem ¶
func (UnimplementedCartServer) AddItem(context.Context, *AddItemRequest) (*AddItemReply, error)
func (UnimplementedCartServer) DeleteCart ¶
func (UnimplementedCartServer) DeleteCart(context.Context, *DeleteCartRequest) (*DeleteCartReply, error)
func (UnimplementedCartServer) DeleteItem ¶
func (UnimplementedCartServer) DeleteItem(context.Context, *DeleteItemRequest) (*DeleteItemReply, error)
func (UnimplementedCartServer) GetCart ¶
func (UnimplementedCartServer) GetCart(context.Context, *GetCartRequest) (*GetCartReply, error)
func (UnimplementedCartServer) UpdateItem ¶
func (UnimplementedCartServer) UpdateItem(context.Context, *UpdateItemRequest) (*UpdateItemReply, error)
type UnsafeCartServer ¶
type UnsafeCartServer interface {
// contains filtered or unexported methods
}
UnsafeCartServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CartServer will result in compilation errors.
type UpdateItemReply ¶
type UpdateItemReply struct { Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*UpdateItemReply) Descriptor
deprecated
func (*UpdateItemReply) Descriptor() ([]byte, []int)
Deprecated: Use UpdateItemReply.ProtoReflect.Descriptor instead.
func (*UpdateItemReply) GetItems ¶
func (x *UpdateItemReply) GetItems() []*Item
func (*UpdateItemReply) ProtoMessage ¶
func (*UpdateItemReply) ProtoMessage()
func (*UpdateItemReply) ProtoReflect ¶
func (x *UpdateItemReply) ProtoReflect() protoreflect.Message
func (*UpdateItemReply) Reset ¶
func (x *UpdateItemReply) Reset()
func (*UpdateItemReply) String ¶
func (x *UpdateItemReply) String() string
type UpdateItemRequest ¶
type UpdateItemRequest struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` ItemId int64 `protobuf:"varint,2,opt,name=itemId,proto3" json:"itemId,omitempty"` Quantity int64 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*UpdateItemRequest) Descriptor
deprecated
func (*UpdateItemRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateItemRequest.ProtoReflect.Descriptor instead.
func (*UpdateItemRequest) GetItemId ¶
func (x *UpdateItemRequest) GetItemId() int64
func (*UpdateItemRequest) GetQuantity ¶
func (x *UpdateItemRequest) GetQuantity() int64
func (*UpdateItemRequest) GetUid ¶
func (x *UpdateItemRequest) GetUid() int64
func (*UpdateItemRequest) ProtoMessage ¶
func (*UpdateItemRequest) ProtoMessage()
func (*UpdateItemRequest) ProtoReflect ¶
func (x *UpdateItemRequest) ProtoReflect() protoreflect.Message
func (*UpdateItemRequest) Reset ¶
func (x *UpdateItemRequest) Reset()
func (*UpdateItemRequest) String ¶
func (x *UpdateItemRequest) String() string