Documentation ¶
Index ¶
- Variables
- func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
- type CreateProductRequest
- type CreateProductResponse
- type GetProductByIdRequest
- func (*GetProductByIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetProductByIdRequest) GetId() int32
- func (*GetProductByIdRequest) ProtoMessage()
- func (x *GetProductByIdRequest) ProtoReflect() protoreflect.Message
- func (x *GetProductByIdRequest) Reset()
- func (x *GetProductByIdRequest) String() string
- type GetProductByIdResponse
- func (*GetProductByIdResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetProductByIdResponse) GetId() int32
- func (x *GetProductByIdResponse) GetResult() *Product
- func (*GetProductByIdResponse) ProtoMessage()
- func (x *GetProductByIdResponse) ProtoReflect() protoreflect.Message
- func (x *GetProductByIdResponse) Reset()
- func (x *GetProductByIdResponse) String() string
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetCreatedAt() *timestamppb.Timestamp
- func (x *Product) GetId() string
- func (x *Product) GetModifiedAt() *timestamppb.Timestamp
- func (x *Product) GetName() string
- func (x *Product) GetTestMoney() *money.Money
- 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) CreateProduct(context.Context, *CreateProductRequest) (*CreateProductResponse, error)
- func (UnimplementedProductServiceServer) GetProductById(context.Context, *GetProductByIdRequest) (*GetProductByIdResponse, error)
- func (UnimplementedProductServiceServer) UpdateProduct(context.Context, *UpdateProductRequest) (*UpdateProductResponse, error)
- type UnsafeProductServiceServer
- type UpdateProductRequest
- type UpdateProductResponse
Constants ¶
This section is empty.
Variables ¶
var File_trple_product_v1_product_proto protoreflect.FileDescriptor
var ProductService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "trple.product.v1.ProductService", HandlerType: (*ProductServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetProductById", Handler: _ProductService_GetProductById_Handler, }, { MethodName: "UpdateProduct", Handler: _ProductService_UpdateProduct_Handler, }, { MethodName: "CreateProduct", Handler: _ProductService_CreateProduct_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "trple/product/v1/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 CreateProductRequest ¶
type CreateProductRequest struct {
// contains filtered or unexported fields
}
func (*CreateProductRequest) Descriptor
deprecated
func (*CreateProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateProductRequest.ProtoReflect.Descriptor instead.
func (*CreateProductRequest) ProtoMessage ¶
func (*CreateProductRequest) ProtoMessage()
func (*CreateProductRequest) ProtoReflect ¶
func (x *CreateProductRequest) ProtoReflect() protoreflect.Message
func (*CreateProductRequest) Reset ¶
func (x *CreateProductRequest) Reset()
func (*CreateProductRequest) String ¶
func (x *CreateProductRequest) String() string
type CreateProductResponse ¶
type CreateProductResponse struct {
// contains filtered or unexported fields
}
func (*CreateProductResponse) Descriptor
deprecated
func (*CreateProductResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateProductResponse.ProtoReflect.Descriptor instead.
func (*CreateProductResponse) ProtoMessage ¶
func (*CreateProductResponse) ProtoMessage()
func (*CreateProductResponse) ProtoReflect ¶
func (x *CreateProductResponse) ProtoReflect() protoreflect.Message
func (*CreateProductResponse) Reset ¶
func (x *CreateProductResponse) Reset()
func (*CreateProductResponse) String ¶
func (x *CreateProductResponse) String() string
type GetProductByIdRequest ¶
type GetProductByIdRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetProductByIdRequest) Descriptor
deprecated
func (*GetProductByIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetProductByIdRequest.ProtoReflect.Descriptor instead.
func (*GetProductByIdRequest) GetId ¶
func (x *GetProductByIdRequest) GetId() int32
func (*GetProductByIdRequest) ProtoMessage ¶
func (*GetProductByIdRequest) ProtoMessage()
func (*GetProductByIdRequest) ProtoReflect ¶
func (x *GetProductByIdRequest) ProtoReflect() protoreflect.Message
func (*GetProductByIdRequest) Reset ¶
func (x *GetProductByIdRequest) Reset()
func (*GetProductByIdRequest) String ¶
func (x *GetProductByIdRequest) String() string
type GetProductByIdResponse ¶
type GetProductByIdResponse struct { Result *Product `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetProductByIdResponse) Descriptor
deprecated
func (*GetProductByIdResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetProductByIdResponse.ProtoReflect.Descriptor instead.
func (*GetProductByIdResponse) GetId ¶
func (x *GetProductByIdResponse) GetId() int32
func (*GetProductByIdResponse) GetResult ¶
func (x *GetProductByIdResponse) GetResult() *Product
func (*GetProductByIdResponse) ProtoMessage ¶
func (*GetProductByIdResponse) ProtoMessage()
func (*GetProductByIdResponse) ProtoReflect ¶
func (x *GetProductByIdResponse) ProtoReflect() protoreflect.Message
func (*GetProductByIdResponse) Reset ¶
func (x *GetProductByIdResponse) Reset()
func (*GetProductByIdResponse) String ¶
func (x *GetProductByIdResponse) String() string
type Product ¶
type Product struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,omitempty"` Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` TestMoney *money.Money `protobuf:"bytes,5,opt,name=test_money,json=testMoney,proto3" json:"test_money,omitempty"` // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) GetCreatedAt ¶
func (x *Product) GetCreatedAt() *timestamppb.Timestamp
func (*Product) GetModifiedAt ¶
func (x *Product) GetModifiedAt() *timestamppb.Timestamp
func (*Product) GetTestMoney ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductServiceClient ¶
type ProductServiceClient interface { GetProductById(ctx context.Context, in *GetProductByIdRequest, opts ...grpc.CallOption) (*GetProductByIdResponse, error) UpdateProduct(ctx context.Context, in *UpdateProductRequest, opts ...grpc.CallOption) (*UpdateProductResponse, error) CreateProduct(ctx context.Context, in *CreateProductRequest, opts ...grpc.CallOption) (*CreateProductResponse, 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 { GetProductById(context.Context, *GetProductByIdRequest) (*GetProductByIdResponse, error) UpdateProduct(context.Context, *UpdateProductRequest) (*UpdateProductResponse, error) CreateProduct(context.Context, *CreateProductRequest) (*CreateProductResponse, error) }
ProductServiceServer is the server API for ProductService service. All implementations should embed UnimplementedProductServiceServer for forward compatibility
type UnimplementedProductServiceServer ¶
type UnimplementedProductServiceServer struct { }
UnimplementedProductServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedProductServiceServer) CreateProduct ¶
func (UnimplementedProductServiceServer) CreateProduct(context.Context, *CreateProductRequest) (*CreateProductResponse, error)
func (UnimplementedProductServiceServer) GetProductById ¶
func (UnimplementedProductServiceServer) GetProductById(context.Context, *GetProductByIdRequest) (*GetProductByIdResponse, error)
func (UnimplementedProductServiceServer) UpdateProduct ¶
func (UnimplementedProductServiceServer) UpdateProduct(context.Context, *UpdateProductRequest) (*UpdateProductResponse, 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 UpdateProductRequest ¶
type UpdateProductRequest struct {
// contains filtered or unexported fields
}
func (*UpdateProductRequest) Descriptor
deprecated
func (*UpdateProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateProductRequest.ProtoReflect.Descriptor instead.
func (*UpdateProductRequest) ProtoMessage ¶
func (*UpdateProductRequest) ProtoMessage()
func (*UpdateProductRequest) ProtoReflect ¶
func (x *UpdateProductRequest) ProtoReflect() protoreflect.Message
func (*UpdateProductRequest) Reset ¶
func (x *UpdateProductRequest) Reset()
func (*UpdateProductRequest) String ¶
func (x *UpdateProductRequest) String() string
type UpdateProductResponse ¶
type UpdateProductResponse struct {
// contains filtered or unexported fields
}
func (*UpdateProductResponse) Descriptor
deprecated
func (*UpdateProductResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateProductResponse.ProtoReflect.Descriptor instead.
func (*UpdateProductResponse) ProtoMessage ¶
func (*UpdateProductResponse) ProtoMessage()
func (*UpdateProductResponse) ProtoReflect ¶
func (x *UpdateProductResponse) ProtoReflect() protoreflect.Message
func (*UpdateProductResponse) Reset ¶
func (x *UpdateProductResponse) Reset()
func (*UpdateProductResponse) String ¶
func (x *UpdateProductResponse) String() string