productInfo

package
v0.0.0-...-ca7cb09 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_product_proto protoreflect.FileDescriptor
View Source
var ProductInfo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ecommerce.v1.ProductInfo",
	HandlerType: (*ProductInfoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "addProduct",
			Handler:    _ProductInfo_AddProduct_Handler,
		},
		{
			MethodName: "getProduct",
			Handler:    _ProductInfo_GetProduct_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/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 Product

type Product struct {
	Id    string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Price float32 `protobuf:"fixed32,3,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*Product) Descriptor deprecated

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

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetId

func (x *Product) GetId() string

func (*Product) GetName

func (x *Product) GetName() string

func (*Product) GetPrice

func (x *Product) GetPrice() float32

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 {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ProductID) Descriptor deprecated

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

Deprecated: Use ProductID.ProtoReflect.Descriptor instead.

func (*ProductID) GetValue

func (x *ProductID) GetValue() string

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 {
	AddProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*ProductID, error)
	GetProduct(ctx context.Context, in *ProductID, opts ...grpc.CallOption) (*Product, error)
}

ProductInfoClient is the client API for ProductInfo 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 ProductInfoServer

type ProductInfoServer interface {
	AddProduct(context.Context, *Product) (*ProductID, error)
	GetProduct(context.Context, *ProductID) (*Product, error)
	// contains filtered or unexported methods
}

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

type UnimplementedProductInfoServer

type UnimplementedProductInfoServer struct {
}

UnimplementedProductInfoServer must be embedded to have forward compatible implementations.

func (UnimplementedProductInfoServer) AddProduct

func (UnimplementedProductInfoServer) GetProduct

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