v1

package
v0.0.0-...-b12402e Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CartServiceErrorReason_name = map[int32]string{
		0: "UNKNOWN_ERROR",
	}
	CartServiceErrorReason_value = map[string]int32{
		"UNKNOWN_ERROR": 0,
	}
)

Enum value maps for CartServiceErrorReason.

View Source
var Cart_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "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: "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)

View Source
var File_v1_cart_error_proto protoreflect.FileDescriptor
View Source
var File_v1_cart_proto protoreflect.FileDescriptor

Functions

func ErrorUnknownError

func ErrorUnknownError(format string, args ...interface{}) *errors.Error

func IsUnknownError

func IsUnknownError(err error) bool

func RegisterCartServer

func RegisterCartServer(s grpc.ServiceRegistrar, srv CartServer)

Types

type AddItemReply

type AddItemReply struct {
	Items []*AddItemReply_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() []*AddItemReply_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 AddItemReply_Item

type AddItemReply_Item struct {
	ItemId   int64 `protobuf:"varint,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	Quantity int64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*AddItemReply_Item) Descriptor deprecated

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

Deprecated: Use AddItemReply_Item.ProtoReflect.Descriptor instead.

func (*AddItemReply_Item) GetItemId

func (x *AddItemReply_Item) GetItemId() int64

func (*AddItemReply_Item) GetQuantity

func (x *AddItemReply_Item) GetQuantity() int64

func (*AddItemReply_Item) ProtoMessage

func (*AddItemReply_Item) ProtoMessage()

func (*AddItemReply_Item) ProtoReflect

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

func (*AddItemReply_Item) Reset

func (x *AddItemReply_Item) Reset()

func (*AddItemReply_Item) String

func (x *AddItemReply_Item) String() string

type AddItemReq

type AddItemReq struct {
	UserId   int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ItemId   int64 `protobuf:"varint,2,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	Quantity int64 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*AddItemReq) Descriptor deprecated

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

Deprecated: Use AddItemReq.ProtoReflect.Descriptor instead.

func (*AddItemReq) GetItemId

func (x *AddItemReq) GetItemId() int64

func (*AddItemReq) GetQuantity

func (x *AddItemReq) GetQuantity() int64

func (*AddItemReq) GetUserId

func (x *AddItemReq) GetUserId() int64

func (*AddItemReq) ProtoMessage

func (*AddItemReq) ProtoMessage()

func (*AddItemReq) ProtoReflect

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

func (*AddItemReq) Reset

func (x *AddItemReq) Reset()

func (*AddItemReq) String

func (x *AddItemReq) String() string

type CartClient

type CartClient interface {
	GetCart(ctx context.Context, in *GetCartReq, opts ...grpc.CallOption) (*GetCartReply, error)
	DeleteCart(ctx context.Context, in *DeleteCartReq, opts ...grpc.CallOption) (*DeleteCartReply, error)
	AddItem(ctx context.Context, in *AddItemReq, opts ...grpc.CallOption) (*AddItemReply, error)
	UpdateItem(ctx context.Context, in *UpdateItemReq, opts ...grpc.CallOption) (*UpdateItemReply, error)
	DeleteItem(ctx context.Context, in *DeleteItemReq, 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, *GetCartReq) (*GetCartReply, error)
	DeleteCart(context.Context, *DeleteCartReq) (*DeleteCartReply, error)
	AddItem(context.Context, *AddItemReq) (*AddItemReply, error)
	UpdateItem(context.Context, *UpdateItemReq) (*UpdateItemReply, error)
	DeleteItem(context.Context, *DeleteItemReq) (*DeleteItemReply, error)
	// contains filtered or unexported methods
}

CartServer is the server API for Cart service. All implementations must embed UnimplementedCartServer for forward compatibility

type CartServiceErrorReason

type CartServiceErrorReason int32
const (
	CartServiceErrorReason_UNKNOWN_ERROR CartServiceErrorReason = 0
)

func (CartServiceErrorReason) Descriptor

func (CartServiceErrorReason) Enum

func (CartServiceErrorReason) EnumDescriptor deprecated

func (CartServiceErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use CartServiceErrorReason.Descriptor instead.

func (CartServiceErrorReason) Number

func (CartServiceErrorReason) String

func (x CartServiceErrorReason) String() string

func (CartServiceErrorReason) Type

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 DeleteCartReq

type DeleteCartReq struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteCartReq) Descriptor deprecated

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

Deprecated: Use DeleteCartReq.ProtoReflect.Descriptor instead.

func (*DeleteCartReq) GetUserId

func (x *DeleteCartReq) GetUserId() int64

func (*DeleteCartReq) ProtoMessage

func (*DeleteCartReq) ProtoMessage()

func (*DeleteCartReq) ProtoReflect

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

func (*DeleteCartReq) Reset

func (x *DeleteCartReq) Reset()

func (*DeleteCartReq) String

func (x *DeleteCartReq) String() string

type DeleteItemReply

type DeleteItemReply struct {
	Items []*DeleteItemReply_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() []*DeleteItemReply_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 DeleteItemReply_Item

type DeleteItemReply_Item struct {
	ItemId   int64 `protobuf:"varint,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	Quantity int64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteItemReply_Item) Descriptor deprecated

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

Deprecated: Use DeleteItemReply_Item.ProtoReflect.Descriptor instead.

func (*DeleteItemReply_Item) GetItemId

func (x *DeleteItemReply_Item) GetItemId() int64

func (*DeleteItemReply_Item) GetQuantity

func (x *DeleteItemReply_Item) GetQuantity() int64

func (*DeleteItemReply_Item) ProtoMessage

func (*DeleteItemReply_Item) ProtoMessage()

func (*DeleteItemReply_Item) ProtoReflect

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

func (*DeleteItemReply_Item) Reset

func (x *DeleteItemReply_Item) Reset()

func (*DeleteItemReply_Item) String

func (x *DeleteItemReply_Item) String() string

type DeleteItemReq

type DeleteItemReq struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ItemId int64 `protobuf:"varint,2,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteItemReq) Descriptor deprecated

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

Deprecated: Use DeleteItemReq.ProtoReflect.Descriptor instead.

func (*DeleteItemReq) GetItemId

func (x *DeleteItemReq) GetItemId() int64

func (*DeleteItemReq) GetUserId

func (x *DeleteItemReq) GetUserId() int64

func (*DeleteItemReq) ProtoMessage

func (*DeleteItemReq) ProtoMessage()

func (*DeleteItemReq) ProtoReflect

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

func (*DeleteItemReq) Reset

func (x *DeleteItemReq) Reset()

func (*DeleteItemReq) String

func (x *DeleteItemReq) String() string

type GetCartReply

type GetCartReply struct {
	Items []*GetCartReply_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() []*GetCartReply_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 GetCartReply_Item

type GetCartReply_Item struct {
	ItemId   int64 `protobuf:"varint,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	Quantity int64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCartReply_Item) Descriptor deprecated

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

Deprecated: Use GetCartReply_Item.ProtoReflect.Descriptor instead.

func (*GetCartReply_Item) GetItemId

func (x *GetCartReply_Item) GetItemId() int64

func (*GetCartReply_Item) GetQuantity

func (x *GetCartReply_Item) GetQuantity() int64

func (*GetCartReply_Item) ProtoMessage

func (*GetCartReply_Item) ProtoMessage()

func (*GetCartReply_Item) ProtoReflect

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

func (*GetCartReply_Item) Reset

func (x *GetCartReply_Item) Reset()

func (*GetCartReply_Item) String

func (x *GetCartReply_Item) String() string

type GetCartReq

type GetCartReq struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCartReq) Descriptor deprecated

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

Deprecated: Use GetCartReq.ProtoReflect.Descriptor instead.

func (*GetCartReq) GetUserId

func (x *GetCartReq) GetUserId() int64

func (*GetCartReq) ProtoMessage

func (*GetCartReq) ProtoMessage()

func (*GetCartReq) ProtoReflect

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

func (*GetCartReq) Reset

func (x *GetCartReq) Reset()

func (*GetCartReq) String

func (x *GetCartReq) String() string

type UnimplementedCartServer

type UnimplementedCartServer struct {
}

UnimplementedCartServer must be embedded to have forward compatible implementations.

func (UnimplementedCartServer) AddItem

func (UnimplementedCartServer) DeleteCart

func (UnimplementedCartServer) DeleteItem

func (UnimplementedCartServer) GetCart

func (UnimplementedCartServer) UpdateItem

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 []*UpdateItemReply_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() []*UpdateItemReply_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 UpdateItemReply_Item

type UpdateItemReply_Item struct {
	ItemId   int64 `protobuf:"varint,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	Quantity int64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateItemReply_Item) Descriptor deprecated

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

Deprecated: Use UpdateItemReply_Item.ProtoReflect.Descriptor instead.

func (*UpdateItemReply_Item) GetItemId

func (x *UpdateItemReply_Item) GetItemId() int64

func (*UpdateItemReply_Item) GetQuantity

func (x *UpdateItemReply_Item) GetQuantity() int64

func (*UpdateItemReply_Item) ProtoMessage

func (*UpdateItemReply_Item) ProtoMessage()

func (*UpdateItemReply_Item) ProtoReflect

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

func (*UpdateItemReply_Item) Reset

func (x *UpdateItemReply_Item) Reset()

func (*UpdateItemReply_Item) String

func (x *UpdateItemReply_Item) String() string

type UpdateItemReq

type UpdateItemReq struct {
	UserId   int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ItemId   int64 `protobuf:"varint,2,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	Quantity int64 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateItemReq) Descriptor deprecated

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

Deprecated: Use UpdateItemReq.ProtoReflect.Descriptor instead.

func (*UpdateItemReq) GetItemId

func (x *UpdateItemReq) GetItemId() int64

func (*UpdateItemReq) GetQuantity

func (x *UpdateItemReq) GetQuantity() int64

func (*UpdateItemReq) GetUserId

func (x *UpdateItemReq) GetUserId() int64

func (*UpdateItemReq) ProtoMessage

func (*UpdateItemReq) ProtoMessage()

func (*UpdateItemReq) ProtoReflect

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

func (*UpdateItemReq) Reset

func (x *UpdateItemReq) Reset()

func (*UpdateItemReq) String

func (x *UpdateItemReq) String() string

Jump to

Keyboard shortcuts

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