2025-03-12 14:05:38 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v3.19.4
// source: generate/protobuf/product.proto
package product
import (
2025-04-08 00:51:58 +00:00
context "context"
2025-03-12 14:05:38 +00:00
grpc "google.golang.org/grpc"
2025-04-08 00:51:58 +00:00
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
2025-03-12 14:05:38 +00:00
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
2025-04-08 00:51:58 +00:00
const (
Product_CreateCategory_FullMethodName = "/product.Product/CreateCategory"
2025-04-08 02:06:40 +00:00
Product_ModifyCategory_FullMethodName = "/product.Product/ModifyCategory"
Product_DeleteCategory_FullMethodName = "/product.Product/DeleteCategory"
Product_GetCategory_FullMethodName = "/product.Product/GetCategory"
Product_ListCategory_FullMethodName = "/product.Product/ListCategory"
2025-04-08 03:49:07 +00:00
Product_CreateTags_FullMethodName = "/product.Product/CreateTags"
Product_ModifyTags_FullMethodName = "/product.Product/ModifyTags"
Product_DeleteTags_FullMethodName = "/product.Product/DeleteTags"
Product_GetTags_FullMethodName = "/product.Product/GetTags"
Product_ListTags_FullMethodName = "/product.Product/ListTags"
2025-04-08 00:51:58 +00:00
)
2025-03-12 14:05:38 +00:00
// ProductClient is the client API for Product 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 ProductClient interface {
2025-04-08 02:06:40 +00:00
// ====================== Category Service Start ======================
2025-04-08 00:51:58 +00:00
// CreateCategory 建立 product 分類
CreateCategory ( ctx context . Context , in * CreateCategoryReq , opts ... grpc . CallOption ) ( * OKResp , error )
2025-04-08 02:06:40 +00:00
// ModifyCategory 修改 product 分類名稱
ModifyCategory ( ctx context . Context , in * ModifyCategoryReq , opts ... grpc . CallOption ) ( * OKResp , error )
// DeleteCategory 刪除 product 分類
DeleteCategory ( ctx context . Context , in * CategoryReq , opts ... grpc . CallOption ) ( * OKResp , error )
// GetCategory 取得 product 分類
GetCategory ( ctx context . Context , in * CategoryReq , opts ... grpc . CallOption ) ( * Category , error )
2025-04-08 03:49:07 +00:00
// ListCategory 建立 product 分類
2025-04-08 02:06:40 +00:00
ListCategory ( ctx context . Context , in * ListCategoryReq , opts ... grpc . CallOption ) ( * ListCategoryResp , error )
2025-04-08 03:49:07 +00:00
// ====================== Category Service End ======================
// ====================== Tags Service Start ======================
// CreateTags 建立 tags
CreateTags ( ctx context . Context , in * CreateTagsReq , opts ... grpc . CallOption ) ( * OKResp , error )
// ModifyTags 修改 tags
ModifyTags ( ctx context . Context , in * ModifyTagsReq , opts ... grpc . CallOption ) ( * OKResp , error )
// DeleteTags 刪除tags
DeleteTags ( ctx context . Context , in * TagsReq , opts ... grpc . CallOption ) ( * OKResp , error )
// GetTags 取得 tags
GetTags ( ctx context . Context , in * TagsReq , opts ... grpc . CallOption ) ( * Tags , error )
// ListTags 建立 tags
ListTags ( ctx context . Context , in * ListTagsReq , opts ... grpc . CallOption ) ( * ListTagsResp , error )
2025-03-12 14:05:38 +00:00
}
type productClient struct {
cc grpc . ClientConnInterface
}
func NewProductClient ( cc grpc . ClientConnInterface ) ProductClient {
return & productClient { cc }
}
2025-04-08 00:51:58 +00:00
func ( c * productClient ) CreateCategory ( ctx context . Context , in * CreateCategoryReq , opts ... grpc . CallOption ) ( * OKResp , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( OKResp )
err := c . cc . Invoke ( ctx , Product_CreateCategory_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2025-04-08 02:06:40 +00:00
func ( c * productClient ) ModifyCategory ( ctx context . Context , in * ModifyCategoryReq , opts ... grpc . CallOption ) ( * OKResp , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( OKResp )
err := c . cc . Invoke ( ctx , Product_ModifyCategory_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * productClient ) DeleteCategory ( ctx context . Context , in * CategoryReq , opts ... grpc . CallOption ) ( * OKResp , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( OKResp )
err := c . cc . Invoke ( ctx , Product_DeleteCategory_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * productClient ) GetCategory ( ctx context . Context , in * CategoryReq , opts ... grpc . CallOption ) ( * Category , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( Category )
err := c . cc . Invoke ( ctx , Product_GetCategory_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * productClient ) ListCategory ( ctx context . Context , in * ListCategoryReq , opts ... grpc . CallOption ) ( * ListCategoryResp , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( ListCategoryResp )
err := c . cc . Invoke ( ctx , Product_ListCategory_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2025-04-08 03:49:07 +00:00
func ( c * productClient ) CreateTags ( ctx context . Context , in * CreateTagsReq , opts ... grpc . CallOption ) ( * OKResp , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( OKResp )
err := c . cc . Invoke ( ctx , Product_CreateTags_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * productClient ) ModifyTags ( ctx context . Context , in * ModifyTagsReq , opts ... grpc . CallOption ) ( * OKResp , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( OKResp )
err := c . cc . Invoke ( ctx , Product_ModifyTags_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * productClient ) DeleteTags ( ctx context . Context , in * TagsReq , opts ... grpc . CallOption ) ( * OKResp , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( OKResp )
err := c . cc . Invoke ( ctx , Product_DeleteTags_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * productClient ) GetTags ( ctx context . Context , in * TagsReq , opts ... grpc . CallOption ) ( * Tags , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( Tags )
err := c . cc . Invoke ( ctx , Product_GetTags_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * productClient ) ListTags ( ctx context . Context , in * ListTagsReq , opts ... grpc . CallOption ) ( * ListTagsResp , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( ListTagsResp )
err := c . cc . Invoke ( ctx , Product_ListTags_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2025-03-12 14:05:38 +00:00
// ProductServer is the server API for Product service.
// All implementations must embed UnimplementedProductServer
// for forward compatibility.
type ProductServer interface {
2025-04-08 02:06:40 +00:00
// ====================== Category Service Start ======================
2025-04-08 00:51:58 +00:00
// CreateCategory 建立 product 分類
CreateCategory ( context . Context , * CreateCategoryReq ) ( * OKResp , error )
2025-04-08 02:06:40 +00:00
// ModifyCategory 修改 product 分類名稱
ModifyCategory ( context . Context , * ModifyCategoryReq ) ( * OKResp , error )
// DeleteCategory 刪除 product 分類
DeleteCategory ( context . Context , * CategoryReq ) ( * OKResp , error )
// GetCategory 取得 product 分類
GetCategory ( context . Context , * CategoryReq ) ( * Category , error )
2025-04-08 03:49:07 +00:00
// ListCategory 建立 product 分類
2025-04-08 02:06:40 +00:00
ListCategory ( context . Context , * ListCategoryReq ) ( * ListCategoryResp , error )
2025-04-08 03:49:07 +00:00
// ====================== Category Service End ======================
// ====================== Tags Service Start ======================
// CreateTags 建立 tags
CreateTags ( context . Context , * CreateTagsReq ) ( * OKResp , error )
// ModifyTags 修改 tags
ModifyTags ( context . Context , * ModifyTagsReq ) ( * OKResp , error )
// DeleteTags 刪除tags
DeleteTags ( context . Context , * TagsReq ) ( * OKResp , error )
// GetTags 取得 tags
GetTags ( context . Context , * TagsReq ) ( * Tags , error )
// ListTags 建立 tags
ListTags ( context . Context , * ListTagsReq ) ( * ListTagsResp , error )
2025-03-12 14:05:38 +00:00
mustEmbedUnimplementedProductServer ( )
}
// UnimplementedProductServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedProductServer struct { }
2025-04-08 00:51:58 +00:00
func ( UnimplementedProductServer ) CreateCategory ( context . Context , * CreateCategoryReq ) ( * OKResp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method CreateCategory not implemented" )
}
2025-04-08 02:06:40 +00:00
func ( UnimplementedProductServer ) ModifyCategory ( context . Context , * ModifyCategoryReq ) ( * OKResp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ModifyCategory not implemented" )
}
func ( UnimplementedProductServer ) DeleteCategory ( context . Context , * CategoryReq ) ( * OKResp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method DeleteCategory not implemented" )
}
func ( UnimplementedProductServer ) GetCategory ( context . Context , * CategoryReq ) ( * Category , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetCategory not implemented" )
}
func ( UnimplementedProductServer ) ListCategory ( context . Context , * ListCategoryReq ) ( * ListCategoryResp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ListCategory not implemented" )
}
2025-04-08 03:49:07 +00:00
func ( UnimplementedProductServer ) CreateTags ( context . Context , * CreateTagsReq ) ( * OKResp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method CreateTags not implemented" )
}
func ( UnimplementedProductServer ) ModifyTags ( context . Context , * ModifyTagsReq ) ( * OKResp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ModifyTags not implemented" )
}
func ( UnimplementedProductServer ) DeleteTags ( context . Context , * TagsReq ) ( * OKResp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method DeleteTags not implemented" )
}
func ( UnimplementedProductServer ) GetTags ( context . Context , * TagsReq ) ( * Tags , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetTags not implemented" )
}
func ( UnimplementedProductServer ) ListTags ( context . Context , * ListTagsReq ) ( * ListTagsResp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ListTags not implemented" )
}
2025-03-12 14:05:38 +00:00
func ( UnimplementedProductServer ) mustEmbedUnimplementedProductServer ( ) { }
func ( UnimplementedProductServer ) testEmbeddedByValue ( ) { }
// UnsafeProductServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ProductServer will
// result in compilation errors.
type UnsafeProductServer interface {
mustEmbedUnimplementedProductServer ( )
}
func RegisterProductServer ( s grpc . ServiceRegistrar , srv ProductServer ) {
// If the following call pancis, it indicates UnimplementedProductServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t , ok := srv . ( interface { testEmbeddedByValue ( ) } ) ; ok {
t . testEmbeddedByValue ( )
}
s . RegisterService ( & Product_ServiceDesc , srv )
}
2025-04-08 00:51:58 +00:00
func _Product_CreateCategory_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CreateCategoryReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProductServer ) . CreateCategory ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Product_CreateCategory_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProductServer ) . CreateCategory ( ctx , req . ( * CreateCategoryReq ) )
}
return interceptor ( ctx , in , info , handler )
}
2025-04-08 02:06:40 +00:00
func _Product_ModifyCategory_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ModifyCategoryReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProductServer ) . ModifyCategory ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Product_ModifyCategory_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProductServer ) . ModifyCategory ( ctx , req . ( * ModifyCategoryReq ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Product_DeleteCategory_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CategoryReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProductServer ) . DeleteCategory ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Product_DeleteCategory_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProductServer ) . DeleteCategory ( ctx , req . ( * CategoryReq ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Product_GetCategory_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CategoryReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProductServer ) . GetCategory ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Product_GetCategory_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProductServer ) . GetCategory ( ctx , req . ( * CategoryReq ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Product_ListCategory_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ListCategoryReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProductServer ) . ListCategory ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Product_ListCategory_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProductServer ) . ListCategory ( ctx , req . ( * ListCategoryReq ) )
}
return interceptor ( ctx , in , info , handler )
}
2025-04-08 03:49:07 +00:00
func _Product_CreateTags_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CreateTagsReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProductServer ) . CreateTags ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Product_CreateTags_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProductServer ) . CreateTags ( ctx , req . ( * CreateTagsReq ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Product_ModifyTags_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ModifyTagsReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProductServer ) . ModifyTags ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Product_ModifyTags_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProductServer ) . ModifyTags ( ctx , req . ( * ModifyTagsReq ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Product_DeleteTags_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( TagsReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProductServer ) . DeleteTags ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Product_DeleteTags_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProductServer ) . DeleteTags ( ctx , req . ( * TagsReq ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Product_GetTags_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( TagsReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProductServer ) . GetTags ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Product_GetTags_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProductServer ) . GetTags ( ctx , req . ( * TagsReq ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Product_ListTags_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ListTagsReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProductServer ) . ListTags ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Product_ListTags_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProductServer ) . ListTags ( ctx , req . ( * ListTagsReq ) )
}
return interceptor ( ctx , in , info , handler )
}
2025-03-12 14:05:38 +00:00
// Product_ServiceDesc is the grpc.ServiceDesc for Product service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Product_ServiceDesc = grpc . ServiceDesc {
ServiceName : "product.Product" ,
HandlerType : ( * ProductServer ) ( nil ) ,
2025-04-08 00:51:58 +00:00
Methods : [ ] grpc . MethodDesc {
{
MethodName : "CreateCategory" ,
Handler : _Product_CreateCategory_Handler ,
} ,
2025-04-08 02:06:40 +00:00
{
MethodName : "ModifyCategory" ,
Handler : _Product_ModifyCategory_Handler ,
} ,
{
MethodName : "DeleteCategory" ,
Handler : _Product_DeleteCategory_Handler ,
} ,
{
MethodName : "GetCategory" ,
Handler : _Product_GetCategory_Handler ,
} ,
{
MethodName : "ListCategory" ,
Handler : _Product_ListCategory_Handler ,
} ,
2025-04-08 03:49:07 +00:00
{
MethodName : "CreateTags" ,
Handler : _Product_CreateTags_Handler ,
} ,
{
MethodName : "ModifyTags" ,
Handler : _Product_ModifyTags_Handler ,
} ,
{
MethodName : "DeleteTags" ,
Handler : _Product_DeleteTags_Handler ,
} ,
{
MethodName : "GetTags" ,
Handler : _Product_GetTags_Handler ,
} ,
{
MethodName : "ListTags" ,
Handler : _Product_ListTags_Handler ,
} ,
2025-04-08 00:51:58 +00:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "generate/protobuf/product.proto" ,
2025-03-12 14:05:38 +00:00
}