cart

package
v0.0.0-...-6907fd9 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AddItemReq

type AddItemReq struct {
	UserId uint32    `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Item   *CartItem `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*AddItemReq) Descriptor deprecated

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

Deprecated: Use AddItemReq.ProtoReflect.Descriptor instead.

func (*AddItemReq) FastRead

func (x *AddItemReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*AddItemReq) FastWrite

func (x *AddItemReq) FastWrite(buf []byte) (offset int)

func (*AddItemReq) GetItem

func (x *AddItemReq) GetItem() *CartItem

func (*AddItemReq) GetUserId

func (x *AddItemReq) GetUserId() uint32

func (*AddItemReq) ProtoMessage

func (*AddItemReq) ProtoMessage()

func (*AddItemReq) ProtoReflect

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

func (*AddItemReq) Reset

func (x *AddItemReq) Reset()

func (*AddItemReq) Size

func (x *AddItemReq) Size() (n int)

func (*AddItemReq) String

func (x *AddItemReq) String() string

type AddItemResp

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

func (*AddItemResp) Descriptor deprecated

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

Deprecated: Use AddItemResp.ProtoReflect.Descriptor instead.

func (*AddItemResp) FastRead

func (x *AddItemResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*AddItemResp) FastWrite

func (x *AddItemResp) FastWrite(buf []byte) (offset int)

func (*AddItemResp) ProtoMessage

func (*AddItemResp) ProtoMessage()

func (*AddItemResp) ProtoReflect

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

func (*AddItemResp) Reset

func (x *AddItemResp) Reset()

func (*AddItemResp) Size

func (x *AddItemResp) Size() (n int)

func (*AddItemResp) String

func (x *AddItemResp) String() string

type Cart

type Cart struct {
	UserId uint32      `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Items  []*CartItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*Cart) Descriptor deprecated

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

Deprecated: Use Cart.ProtoReflect.Descriptor instead.

func (*Cart) FastRead

func (x *Cart) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*Cart) FastWrite

func (x *Cart) FastWrite(buf []byte) (offset int)

func (*Cart) GetItems

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

func (*Cart) GetUserId

func (x *Cart) GetUserId() uint32

func (*Cart) ProtoMessage

func (*Cart) ProtoMessage()

func (*Cart) ProtoReflect

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

func (*Cart) Reset

func (x *Cart) Reset()

func (*Cart) Size

func (x *Cart) Size() (n int)

func (*Cart) String

func (x *Cart) String() string

type CartItem

type CartItem struct {
	ProductId uint32 `protobuf:"varint,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	Quantity  int32  `protobuf:"varint,2,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) FastRead

func (x *CartItem) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*CartItem) FastWrite

func (x *CartItem) FastWrite(buf []byte) (offset int)

func (*CartItem) GetProductId

func (x *CartItem) GetProductId() uint32

func (*CartItem) GetQuantity

func (x *CartItem) GetQuantity() int32

func (*CartItem) ProtoMessage

func (*CartItem) ProtoMessage()

func (*CartItem) ProtoReflect

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

func (*CartItem) Reset

func (x *CartItem) Reset()

func (*CartItem) Size

func (x *CartItem) Size() (n int)

func (*CartItem) String

func (x *CartItem) String() string

type CartService

type CartService interface {
	AddItem(ctx context.Context, req *AddItemReq) (res *AddItemResp, err error)
	GetCart(ctx context.Context, req *GetCartReq) (res *GetCartResp, err error)
	EmptyCart(ctx context.Context, req *EmptyCartReq) (res *EmptyCartResp, err error)
}

type EmptyCartReq

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

func (*EmptyCartReq) Descriptor deprecated

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

Deprecated: Use EmptyCartReq.ProtoReflect.Descriptor instead.

func (*EmptyCartReq) FastRead

func (x *EmptyCartReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*EmptyCartReq) FastWrite

func (x *EmptyCartReq) FastWrite(buf []byte) (offset int)

func (*EmptyCartReq) GetUserId

func (x *EmptyCartReq) GetUserId() uint32

func (*EmptyCartReq) ProtoMessage

func (*EmptyCartReq) ProtoMessage()

func (*EmptyCartReq) ProtoReflect

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

func (*EmptyCartReq) Reset

func (x *EmptyCartReq) Reset()

func (*EmptyCartReq) Size

func (x *EmptyCartReq) Size() (n int)

func (*EmptyCartReq) String

func (x *EmptyCartReq) String() string

type EmptyCartResp

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

func (*EmptyCartResp) Descriptor deprecated

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

Deprecated: Use EmptyCartResp.ProtoReflect.Descriptor instead.

func (*EmptyCartResp) FastRead

func (x *EmptyCartResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*EmptyCartResp) FastWrite

func (x *EmptyCartResp) FastWrite(buf []byte) (offset int)

func (*EmptyCartResp) ProtoMessage

func (*EmptyCartResp) ProtoMessage()

func (*EmptyCartResp) ProtoReflect

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

func (*EmptyCartResp) Reset

func (x *EmptyCartResp) Reset()

func (*EmptyCartResp) Size

func (x *EmptyCartResp) Size() (n int)

func (*EmptyCartResp) String

func (x *EmptyCartResp) String() string

type GetCartReq

type GetCartReq struct {
	UserId uint32 `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) FastRead

func (x *GetCartReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*GetCartReq) FastWrite

func (x *GetCartReq) FastWrite(buf []byte) (offset int)

func (*GetCartReq) GetUserId

func (x *GetCartReq) GetUserId() uint32

func (*GetCartReq) ProtoMessage

func (*GetCartReq) ProtoMessage()

func (*GetCartReq) ProtoReflect

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

func (*GetCartReq) Reset

func (x *GetCartReq) Reset()

func (*GetCartReq) Size

func (x *GetCartReq) Size() (n int)

func (*GetCartReq) String

func (x *GetCartReq) String() string

type GetCartResp

type GetCartResp struct {
	Cart *Cart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCartResp) Descriptor deprecated

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

Deprecated: Use GetCartResp.ProtoReflect.Descriptor instead.

func (*GetCartResp) FastRead

func (x *GetCartResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*GetCartResp) FastWrite

func (x *GetCartResp) FastWrite(buf []byte) (offset int)

func (*GetCartResp) GetCart

func (x *GetCartResp) GetCart() *Cart

func (*GetCartResp) ProtoMessage

func (*GetCartResp) ProtoMessage()

func (*GetCartResp) ProtoReflect

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

func (*GetCartResp) Reset

func (x *GetCartResp) Reset()

func (*GetCartResp) Size

func (x *GetCartResp) Size() (n int)

func (*GetCartResp) String

func (x *GetCartResp) String() string

Directories

Path Synopsis
Code generated by Kitex v0.8.0.
Code generated by Kitex v0.8.0.

Jump to

Keyboard shortcuts

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