Documentation ¶
Index ¶
- Variables
- func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetDescription() string
- func (x *CreateRequest) GetName() string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type ListRequest
- type ListResponse
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetDescription() string
- func (x *Product) GetId() int32
- func (x *Product) GetName() string
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductServiceClient
- type ProductServiceServer
- type UnimplementedProductServiceServer
- func (UnimplementedProductServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedProductServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedProductServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UnsafeProductServiceServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetDescription() string
- func (x *UpdateRequest) GetId() int32
- func (x *UpdateRequest) GetName() string
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
var File_product_product_proto protoreflect.FileDescriptor
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: "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) GetDescription ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
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) 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.
func NewProductServiceClient ¶
func NewProductServiceClient(cc grpc.ClientConnInterface) ProductServiceClient
type ProductServiceServer ¶
type ProductServiceServer interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) List(context.Context, *ListRequest) (*ListResponse, 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) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedProductServiceServer) List ¶ added in v0.0.31
func (UnimplementedProductServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedProductServiceServer) Update ¶ added in v0.0.35
func (UnimplementedProductServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
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 { 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 (*UpdateRequest) Descriptor
deprecated
added in
v0.0.35
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetDescription ¶ added in v0.0.35
func (x *UpdateRequest) GetDescription() string
func (*UpdateRequest) GetId ¶ added in v0.0.35
func (x *UpdateRequest) GetId() int32
func (*UpdateRequest) GetName ¶ added in v0.0.35
func (x *UpdateRequest) GetName() string
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