product

package
v0.0.48 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_product_product_proto protoreflect.FileDescriptor
View Source
var ProductService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "product.ProductService",
	HandlerType: (*ProductServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _ProductService_Create_Handler,
		},
		{
			MethodName: "List",
			Handler:    _ProductService_List_Handler,
		},
		{
			MethodName: "Product",
			Handler:    _ProductService_Product_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _ProductService_Update_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "product/product.proto",
}

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

Functions

func RegisterProductServiceServer

func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)

Types

type CreateRequest

type CreateRequest struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetDescription

func (x *CreateRequest) GetDescription() string

func (*CreateRequest) GetName

func (x *CreateRequest) GetName() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

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

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetId

func (x *CreateResponse) GetId() int32

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

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

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type ListRequest added in v0.0.31

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

func (*ListRequest) Descriptor deprecated added in v0.0.31

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) ProtoMessage added in v0.0.31

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect added in v0.0.31

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

func (*ListRequest) Reset added in v0.0.31

func (x *ListRequest) Reset()

func (*ListRequest) String added in v0.0.31

func (x *ListRequest) String() string

type ListResponse added in v0.0.31

type ListResponse struct {
	Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated added in v0.0.31

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetProducts added in v0.0.31

func (x *ListResponse) GetProducts() []*Product

func (*ListResponse) ProtoMessage added in v0.0.31

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect added in v0.0.31

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

func (*ListResponse) Reset added in v0.0.31

func (x *ListResponse) Reset()

func (*ListResponse) String added in v0.0.31

func (x *ListResponse) String() string

type Product

type Product struct {
	Id          int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,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() int32

func (*Product) GetName

func (x *Product) GetName() 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 ProductRequest added in v0.0.36

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

func (*ProductRequest) Descriptor deprecated added in v0.0.36

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

Deprecated: Use ProductRequest.ProtoReflect.Descriptor instead.

func (*ProductRequest) GetId added in v0.0.36

func (x *ProductRequest) GetId() int32

func (*ProductRequest) ProtoMessage added in v0.0.36

func (*ProductRequest) ProtoMessage()

func (*ProductRequest) ProtoReflect added in v0.0.36

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

func (*ProductRequest) Reset added in v0.0.36

func (x *ProductRequest) Reset()

func (*ProductRequest) String added in v0.0.36

func (x *ProductRequest) String() string

type ProductResponse added in v0.0.36

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

func (*ProductResponse) Descriptor deprecated added in v0.0.36

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

Deprecated: Use ProductResponse.ProtoReflect.Descriptor instead.

func (*ProductResponse) GetProduct added in v0.0.36

func (x *ProductResponse) GetProduct() *Product

func (*ProductResponse) ProtoMessage added in v0.0.36

func (*ProductResponse) ProtoMessage()

func (*ProductResponse) ProtoReflect added in v0.0.36

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

func (*ProductResponse) Reset added in v0.0.36

func (x *ProductResponse) Reset()

func (*ProductResponse) String added in v0.0.36

func (x *ProductResponse) String() string

type ProductServiceClient

type ProductServiceClient interface {
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	Product(ctx context.Context, in *ProductRequest, opts ...grpc.CallOption) (*ProductResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
}

ProductServiceClient is the client API for ProductService 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 ProductServiceServer

type ProductServiceServer interface {
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	List(context.Context, *ListRequest) (*ListResponse, error)
	Product(context.Context, *ProductRequest) (*ProductResponse, error)
	Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
	// contains filtered or unexported methods
}

ProductServiceServer is the server API for ProductService service. All implementations must embed UnimplementedProductServiceServer for forward compatibility

type UnimplementedProductServiceServer

type UnimplementedProductServiceServer struct {
}

UnimplementedProductServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedProductServiceServer) Create

func (UnimplementedProductServiceServer) List added in v0.0.31

func (UnimplementedProductServiceServer) Product added in v0.0.36

func (UnimplementedProductServiceServer) Update added in v0.0.35

type UnsafeProductServiceServer

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

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

type UpdateRequest added in v0.0.35

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

func (*UpdateRequest) Descriptor deprecated added in v0.0.35

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetProduct added in v0.0.36

func (x *UpdateRequest) GetProduct() *Product

func (*UpdateRequest) ProtoMessage added in v0.0.35

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect added in v0.0.35

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

func (*UpdateRequest) Reset added in v0.0.35

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String added in v0.0.35

func (x *UpdateRequest) String() string

type UpdateResponse added in v0.0.35

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

func (*UpdateResponse) Descriptor deprecated added in v0.0.35

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

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) GetId added in v0.0.35

func (x *UpdateResponse) GetId() int32

func (*UpdateResponse) ProtoMessage added in v0.0.35

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect added in v0.0.35

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

func (*UpdateResponse) Reset added in v0.0.35

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String added in v0.0.35

func (x *UpdateResponse) String() string

Jump to

Keyboard shortcuts

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