proto

package
v0.0.0-...-d38871e Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CartService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "CartService",
	HandlerType: (*CartServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddToCart",
			Handler:    _CartService_AddToCart_Handler,
		},
		{
			MethodName: "GetUserCart",
			Handler:    _CartService_GetUserCart_Handler,
		},
		{
			MethodName: "RemoveItemsFromCart",
			Handler:    _CartService_RemoveItemsFromCart_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cart.proto",
}

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

Functions

func RegisterCartServiceServer

func RegisterCartServiceServer(s grpc.ServiceRegistrar, srv CartServiceServer)

Types

type CartItem

type CartItem struct {
	Id         string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ProductSku string `protobuf:"bytes,2,opt,name=productSku,proto3" json:"productSku,omitempty"`
	UserId     string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"`
	Quantity   int32  `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*CartItem) Descriptor deprecated

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

Deprecated: Use CartItem.ProtoReflect.Descriptor instead.

func (*CartItem) GetId

func (x *CartItem) GetId() string

func (*CartItem) GetProductSku

func (x *CartItem) GetProductSku() string

func (*CartItem) GetQuantity

func (x *CartItem) GetQuantity() int32

func (*CartItem) GetUserId

func (x *CartItem) GetUserId() string

func (*CartItem) ProtoMessage

func (*CartItem) ProtoMessage()

func (*CartItem) ProtoReflect

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

func (*CartItem) Reset

func (x *CartItem) Reset()

func (*CartItem) String

func (x *CartItem) String() string

type CartServiceClient

type CartServiceClient interface {
	AddToCart(ctx context.Context, in *NewCartItem, opts ...grpc.CallOption) (*CartItem, error)
	GetUserCart(ctx context.Context, in *GetUserCartInput, opts ...grpc.CallOption) (*GetUserCartResponse, error)
	RemoveItemsFromCart(ctx context.Context, in *RemoveItemsFromCartInput, opts ...grpc.CallOption) (*RemoveItemsFromCartResponse, error)
}

CartServiceClient is the client API for CartService 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 CartServiceServer

type CartServiceServer interface {
	AddToCart(context.Context, *NewCartItem) (*CartItem, error)
	GetUserCart(context.Context, *GetUserCartInput) (*GetUserCartResponse, error)
	RemoveItemsFromCart(context.Context, *RemoveItemsFromCartInput) (*RemoveItemsFromCartResponse, error)
	// contains filtered or unexported methods
}

CartServiceServer is the server API for CartService service. All implementations must embed UnimplementedCartServiceServer for forward compatibility

type GetUserCartInput

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

func (*GetUserCartInput) Descriptor deprecated

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

Deprecated: Use GetUserCartInput.ProtoReflect.Descriptor instead.

func (*GetUserCartInput) GetUserId

func (x *GetUserCartInput) GetUserId() string

func (*GetUserCartInput) ProtoMessage

func (*GetUserCartInput) ProtoMessage()

func (*GetUserCartInput) ProtoReflect

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

func (*GetUserCartInput) Reset

func (x *GetUserCartInput) Reset()

func (*GetUserCartInput) String

func (x *GetUserCartInput) String() string

type GetUserCartResponse

type GetUserCartResponse struct {
	Items []*CartItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserCartResponse) Descriptor deprecated

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

Deprecated: Use GetUserCartResponse.ProtoReflect.Descriptor instead.

func (*GetUserCartResponse) GetItems

func (x *GetUserCartResponse) GetItems() []*CartItem

func (*GetUserCartResponse) ProtoMessage

func (*GetUserCartResponse) ProtoMessage()

func (*GetUserCartResponse) ProtoReflect

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

func (*GetUserCartResponse) Reset

func (x *GetUserCartResponse) Reset()

func (*GetUserCartResponse) String

func (x *GetUserCartResponse) String() string

type NewCartItem

type NewCartItem struct {
	ProductSku string `protobuf:"bytes,1,opt,name=productSku,proto3" json:"productSku,omitempty"`
	UserId     string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`
	Quantity   int32  `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*NewCartItem) Descriptor deprecated

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

Deprecated: Use NewCartItem.ProtoReflect.Descriptor instead.

func (*NewCartItem) GetProductSku

func (x *NewCartItem) GetProductSku() string

func (*NewCartItem) GetQuantity

func (x *NewCartItem) GetQuantity() int32

func (*NewCartItem) GetUserId

func (x *NewCartItem) GetUserId() string

func (*NewCartItem) ProtoMessage

func (*NewCartItem) ProtoMessage()

func (*NewCartItem) ProtoReflect

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

func (*NewCartItem) Reset

func (x *NewCartItem) Reset()

func (*NewCartItem) String

func (x *NewCartItem) String() string

type RemoveItemsFromCartInput

type RemoveItemsFromCartInput struct {
	UserId  string   `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
	ItemIds []string `protobuf:"bytes,2,rep,name=itemIds,proto3" json:"itemIds,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveItemsFromCartInput) Descriptor deprecated

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

Deprecated: Use RemoveItemsFromCartInput.ProtoReflect.Descriptor instead.

func (*RemoveItemsFromCartInput) GetItemIds

func (x *RemoveItemsFromCartInput) GetItemIds() []string

func (*RemoveItemsFromCartInput) GetUserId

func (x *RemoveItemsFromCartInput) GetUserId() string

func (*RemoveItemsFromCartInput) ProtoMessage

func (*RemoveItemsFromCartInput) ProtoMessage()

func (*RemoveItemsFromCartInput) ProtoReflect

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

func (*RemoveItemsFromCartInput) Reset

func (x *RemoveItemsFromCartInput) Reset()

func (*RemoveItemsFromCartInput) String

func (x *RemoveItemsFromCartInput) String() string

type RemoveItemsFromCartResponse

type RemoveItemsFromCartResponse struct {
	Items []*CartItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveItemsFromCartResponse) Descriptor deprecated

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

Deprecated: Use RemoveItemsFromCartResponse.ProtoReflect.Descriptor instead.

func (*RemoveItemsFromCartResponse) GetItems

func (x *RemoveItemsFromCartResponse) GetItems() []*CartItem

func (*RemoveItemsFromCartResponse) ProtoMessage

func (*RemoveItemsFromCartResponse) ProtoMessage()

func (*RemoveItemsFromCartResponse) ProtoReflect

func (*RemoveItemsFromCartResponse) Reset

func (x *RemoveItemsFromCartResponse) Reset()

func (*RemoveItemsFromCartResponse) String

func (x *RemoveItemsFromCartResponse) String() string

type UnimplementedCartServiceServer

type UnimplementedCartServiceServer struct {
}

UnimplementedCartServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCartServiceServer) AddToCart

func (UnimplementedCartServiceServer) GetUserCart

func (UnimplementedCartServiceServer) RemoveItemsFromCart

type UnsafeCartServiceServer

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

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

Jump to

Keyboard shortcuts

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