go_micro_service_cart

package
v0.0.0-...-b91a56b Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package go_micro_service_cart is a generated protocol buffer package.

It is generated from these files:

proto/cart/cart.proto

It has these top-level messages:

CartInfo
ResponseAdd
Clean
Response
Item
CartId
CartFindAll
CartAll

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCartEndpoints

func NewCartEndpoints() []*api.Endpoint

func RegisterCartHandler

func RegisterCartHandler(s server.Server, hdlr CartHandler, opts ...server.HandlerOption) error

Types

type CartAll

type CartAll struct {
	CartInfo []*CartInfo `protobuf:"bytes,1,rep,name=cart_info,json=cartInfo" json:"cart_info,omitempty"`
}

func (*CartAll) Descriptor

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

func (*CartAll) GetCartInfo

func (m *CartAll) GetCartInfo() []*CartInfo

func (*CartAll) ProtoMessage

func (*CartAll) ProtoMessage()

func (*CartAll) Reset

func (m *CartAll) Reset()

func (*CartAll) String

func (m *CartAll) String() string

type CartFindAll

type CartFindAll struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
}

func (*CartFindAll) Descriptor

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

func (*CartFindAll) GetUserId

func (m *CartFindAll) GetUserId() int64

func (*CartFindAll) ProtoMessage

func (*CartFindAll) ProtoMessage()

func (*CartFindAll) Reset

func (m *CartFindAll) Reset()

func (*CartFindAll) String

func (m *CartFindAll) String() string

type CartHandler

type CartHandler interface {
	AddCart(context.Context, *CartInfo, *ResponseAdd) error
	CleanCart(context.Context, *Clean, *Response) error
	Incr(context.Context, *Item, *Response) error
	Decr(context.Context, *Item, *Response) error
	DeleteItemById(context.Context, *CartId, *Response) error
	GetAll(context.Context, *CartFindAll, *CartAll) error
}

type CartId

type CartId struct {
	Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}

func (*CartId) Descriptor

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

func (*CartId) GetId

func (m *CartId) GetId() int64

func (*CartId) ProtoMessage

func (*CartId) ProtoMessage()

func (*CartId) Reset

func (m *CartId) Reset()

func (*CartId) String

func (m *CartId) String() string

type CartInfo

type CartInfo struct {
	Id        int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	UserId    int64 `protobuf:"varint,2,opt,name=user_id,json=userId" json:"user_id,omitempty"`
	ProductId int64 `protobuf:"varint,3,opt,name=product_id,json=productId" json:"product_id,omitempty"`
	SizeId    int64 `protobuf:"varint,4,opt,name=size_id,json=sizeId" json:"size_id,omitempty"`
	Num       int64 `protobuf:"varint,5,opt,name=num" json:"num,omitempty"`
}

func (*CartInfo) Descriptor

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

func (*CartInfo) GetId

func (m *CartInfo) GetId() int64

func (*CartInfo) GetNum

func (m *CartInfo) GetNum() int64

func (*CartInfo) GetProductId

func (m *CartInfo) GetProductId() int64

func (*CartInfo) GetSizeId

func (m *CartInfo) GetSizeId() int64

func (*CartInfo) GetUserId

func (m *CartInfo) GetUserId() int64

func (*CartInfo) ProtoMessage

func (*CartInfo) ProtoMessage()

func (*CartInfo) Reset

func (m *CartInfo) Reset()

func (*CartInfo) String

func (m *CartInfo) String() string

type CartService

type CartService interface {
	AddCart(ctx context.Context, in *CartInfo, opts ...client.CallOption) (*ResponseAdd, error)
	CleanCart(ctx context.Context, in *Clean, opts ...client.CallOption) (*Response, error)
	Incr(ctx context.Context, in *Item, opts ...client.CallOption) (*Response, error)
	Decr(ctx context.Context, in *Item, opts ...client.CallOption) (*Response, error)
	DeleteItemById(ctx context.Context, in *CartId, opts ...client.CallOption) (*Response, error)
	GetAll(ctx context.Context, in *CartFindAll, opts ...client.CallOption) (*CartAll, error)
}

func NewCartService

func NewCartService(name string, c client.Client) CartService

type Clean

type Clean struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
}

func (*Clean) Descriptor

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

func (*Clean) GetUserId

func (m *Clean) GetUserId() int64

func (*Clean) ProtoMessage

func (*Clean) ProtoMessage()

func (*Clean) Reset

func (m *Clean) Reset()

func (*Clean) String

func (m *Clean) String() string

type Item

type Item struct {
	Id        int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	ChangeNum int64 `protobuf:"varint,2,opt,name=change_num,json=changeNum" json:"change_num,omitempty"`
}

func (*Item) Descriptor

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

func (*Item) GetChangeNum

func (m *Item) GetChangeNum() int64

func (*Item) GetId

func (m *Item) GetId() int64

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) Reset

func (m *Item) Reset()

func (*Item) String

func (m *Item) String() string

type Response

type Response struct {
	Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
}

func (*Response) Descriptor

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

func (*Response) GetMsg

func (m *Response) GetMsg() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

type ResponseAdd

type ResponseAdd struct {
	CartId int64  `protobuf:"varint,1,opt,name=cart_id,json=cartId" json:"cart_id,omitempty"`
	Msg    string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
}

func (*ResponseAdd) Descriptor

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

func (*ResponseAdd) GetCartId

func (m *ResponseAdd) GetCartId() int64

func (*ResponseAdd) GetMsg

func (m *ResponseAdd) GetMsg() string

func (*ResponseAdd) ProtoMessage

func (*ResponseAdd) ProtoMessage()

func (*ResponseAdd) Reset

func (m *ResponseAdd) Reset()

func (*ResponseAdd) String

func (m *ResponseAdd) String() string

Jump to

Keyboard shortcuts

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