productv1

package
v0.0.0-...-95dfbfb Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductInfo_GetProductInfo_FullMethodName = "/product.ProductInfo/GetProductInfo"
	ProductInfo_GetProductList_FullMethodName = "/product.ProductInfo/GetProductList"
	ProductInfo_AddProduct_FullMethodName     = "/product.ProductInfo/AddProduct"
	ProductInfo_UpdateProduct_FullMethodName  = "/product.ProductInfo/UpdateProduct"
	ProductInfo_DeleteProduct_FullMethodName  = "/product.ProductInfo/DeleteProduct"
)

Variables

View Source
var File_catalog_product_proto protoreflect.FileDescriptor
View Source
var ProductInfo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "product.ProductInfo",
	HandlerType: (*ProductInfoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetProductInfo",
			Handler:    _ProductInfo_GetProductInfo_Handler,
		},
		{
			MethodName: "GetProductList",
			Handler:    _ProductInfo_GetProductList_Handler,
		},
		{
			MethodName: "AddProduct",
			Handler:    _ProductInfo_AddProduct_Handler,
		},
		{
			MethodName: "UpdateProduct",
			Handler:    _ProductInfo_UpdateProduct_Handler,
		},
		{
			MethodName: "DeleteProduct",
			Handler:    _ProductInfo_DeleteProduct_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "catalog/product.proto",
}

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

Functions

func RegisterProductInfoServer

func RegisterProductInfoServer(s grpc.ServiceRegistrar, srv ProductInfoServer)

Types

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Product

type Product struct {
	Id          uint64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Sku         string  `protobuf:"bytes,3,opt,name=sku,proto3" json:"sku,omitempty"`
	Description string  `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Price       float32 `protobuf:"fixed32,5,opt,name=price,proto3" json:"price,omitempty"`
	Image       string  `protobuf:"bytes,6,opt,name=image,proto3" json:"image,omitempty"`
	// contains filtered or unexported fields
}

func (*Product) Descriptor deprecated

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

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetDescription

func (x *Product) GetDescription() string

func (*Product) GetId

func (x *Product) GetId() uint64

func (*Product) GetImage

func (x *Product) GetImage() string

func (*Product) GetName

func (x *Product) GetName() string

func (*Product) GetPrice

func (x *Product) GetPrice() float32

func (*Product) GetSku

func (x *Product) GetSku() string

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) ProtoReflect

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

func (*Product) Reset

func (x *Product) Reset()

func (*Product) String

func (x *Product) String() string

type ProductId

type ProductId struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*ProductId) Descriptor deprecated

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

Deprecated: Use ProductId.ProtoReflect.Descriptor instead.

func (*ProductId) GetId

func (x *ProductId) GetId() uint64

func (*ProductId) ProtoMessage

func (*ProductId) ProtoMessage()

func (*ProductId) ProtoReflect

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

func (*ProductId) Reset

func (x *ProductId) Reset()

func (*ProductId) String

func (x *ProductId) String() string

type ProductInfoClient

type ProductInfoClient interface {
	GetProductInfo(ctx context.Context, in *ProductId, opts ...grpc.CallOption) (*Product, error)
	GetProductList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ProductList, error)
	AddProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*ProductId, error)
	UpdateProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*Empty, error)
	DeleteProduct(ctx context.Context, in *ProductId, opts ...grpc.CallOption) (*Empty, error)
}

ProductInfoClient is the client API for ProductInfo service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ProductInfoServer

type ProductInfoServer interface {
	GetProductInfo(context.Context, *ProductId) (*Product, error)
	GetProductList(context.Context, *Empty) (*ProductList, error)
	AddProduct(context.Context, *Product) (*ProductId, error)
	UpdateProduct(context.Context, *Product) (*Empty, error)
	DeleteProduct(context.Context, *ProductId) (*Empty, error)
	// contains filtered or unexported methods
}

ProductInfoServer is the server API for ProductInfo service. All implementations must embed UnimplementedProductInfoServer for forward compatibility

type ProductList

type ProductList struct {
	Products map[uint64]*Product `` /* 158-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ProductList) Descriptor deprecated

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

Deprecated: Use ProductList.ProtoReflect.Descriptor instead.

func (*ProductList) GetProducts

func (x *ProductList) GetProducts() map[uint64]*Product

func (*ProductList) ProtoMessage

func (*ProductList) ProtoMessage()

func (*ProductList) ProtoReflect

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

func (*ProductList) Reset

func (x *ProductList) Reset()

func (*ProductList) String

func (x *ProductList) String() string

type UnimplementedProductInfoServer

type UnimplementedProductInfoServer struct {
}

UnimplementedProductInfoServer must be embedded to have forward compatible implementations.

func (UnimplementedProductInfoServer) AddProduct

func (UnimplementedProductInfoServer) DeleteProduct

func (UnimplementedProductInfoServer) GetProductInfo

func (UnimplementedProductInfoServer) GetProductList

func (UnimplementedProductInfoServer) UpdateProduct

type UnsafeProductInfoServer

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

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

Jump to

Keyboard shortcuts

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