Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCategoryCommandServer(s grpc.ServiceRegistrar, srv CategoryCommandServer)
- func RegisterCategoryQueryServer(s grpc.ServiceRegistrar, srv CategoryQueryServer)
- func RegisterProductCommandServer(s grpc.ServiceRegistrar, srv ProductCommandServer)
- func RegisterProductQueryServer(s grpc.ServiceRegistrar, srv ProductQueryServer)
- type CRUD
- type CategoriesResult
- func (*CategoriesResult) Descriptor() ([]byte, []int)deprecated
- func (x *CategoriesResult) GetCategories() []*Category
- func (x *CategoriesResult) GetError() *Error
- func (x *CategoriesResult) GetTimestamp() *timestamppb.Timestamp
- func (*CategoriesResult) ProtoMessage()
- func (x *CategoriesResult) ProtoReflect() protoreflect.Message
- func (x *CategoriesResult) Reset()
- func (x *CategoriesResult) String() string
- type Category
- type CategoryCommandClient
- type CategoryCommandServer
- type CategoryParam
- type CategoryQueryClient
- type CategoryQueryServer
- type CategoryResult
- func (*CategoryResult) Descriptor() ([]byte, []int)deprecated
- func (x *CategoryResult) GetCategory() *Category
- func (x *CategoryResult) GetError() *Error
- func (m *CategoryResult) GetResult() isCategoryResult_Result
- func (x *CategoryResult) GetTimestamp() *timestamppb.Timestamp
- func (*CategoryResult) ProtoMessage()
- func (x *CategoryResult) ProtoReflect() protoreflect.Message
- func (x *CategoryResult) Reset()
- func (x *CategoryResult) String() string
- type CategoryResult_Category
- type CategoryResult_Error
- type CategoryUpParam
- func (*CategoryUpParam) Descriptor() ([]byte, []int)deprecated
- func (x *CategoryUpParam) GetCrud() CRUD
- func (x *CategoryUpParam) GetId() string
- func (x *CategoryUpParam) GetName() string
- func (*CategoryUpParam) ProtoMessage()
- func (x *CategoryUpParam) ProtoReflect() protoreflect.Message
- func (x *CategoryUpParam) Reset()
- func (x *CategoryUpParam) String() string
- type CategoryUpResult
- func (*CategoryUpResult) Descriptor() ([]byte, []int)deprecated
- func (x *CategoryUpResult) GetCategory() *Category
- func (x *CategoryUpResult) GetError() *Error
- func (x *CategoryUpResult) GetTimestamp() *timestamppb.Timestamp
- func (*CategoryUpResult) ProtoMessage()
- func (x *CategoryUpResult) ProtoReflect() protoreflect.Message
- func (x *CategoryUpResult) Reset()
- func (x *CategoryUpResult) String() string
- type Error
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetCategory() *Category
- func (x *Product) GetId() string
- func (x *Product) GetName() string
- func (x *Product) GetPrice() int32
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductCommandClient
- type ProductCommandServer
- type ProductParam
- func (*ProductParam) Descriptor() ([]byte, []int)deprecated
- func (x *ProductParam) GetId() string
- func (x *ProductParam) GetKeyword() string
- func (*ProductParam) ProtoMessage()
- func (x *ProductParam) ProtoReflect() protoreflect.Message
- func (x *ProductParam) Reset()
- func (x *ProductParam) String() string
- type ProductQueryClient
- type ProductQueryServer
- type ProductQuery_ListStreamClient
- type ProductQuery_ListStreamServer
- type ProductResult
- func (*ProductResult) Descriptor() ([]byte, []int)deprecated
- func (x *ProductResult) GetError() *Error
- func (x *ProductResult) GetProduct() *Product
- func (m *ProductResult) GetResult() isProductResult_Result
- func (x *ProductResult) GetTimestamp() *timestamppb.Timestamp
- func (*ProductResult) ProtoMessage()
- func (x *ProductResult) ProtoReflect() protoreflect.Message
- func (x *ProductResult) Reset()
- func (x *ProductResult) String() string
- type ProductResult_Error
- type ProductResult_Product
- type ProductUpParam
- func (*ProductUpParam) Descriptor() ([]byte, []int)deprecated
- func (x *ProductUpParam) GetCategoryId() string
- func (x *ProductUpParam) GetCrud() CRUD
- func (x *ProductUpParam) GetId() string
- func (x *ProductUpParam) GetName() string
- func (x *ProductUpParam) GetPrice() int32
- func (*ProductUpParam) ProtoMessage()
- func (x *ProductUpParam) ProtoReflect() protoreflect.Message
- func (x *ProductUpParam) Reset()
- func (x *ProductUpParam) String() string
- type ProductUpResult
- func (*ProductUpResult) Descriptor() ([]byte, []int)deprecated
- func (x *ProductUpResult) GetError() *Error
- func (x *ProductUpResult) GetProduct() *Product
- func (x *ProductUpResult) GetTimestamp() *timestamppb.Timestamp
- func (*ProductUpResult) ProtoMessage()
- func (x *ProductUpResult) ProtoReflect() protoreflect.Message
- func (x *ProductUpResult) Reset()
- func (x *ProductUpResult) String() string
- type ProductsResult
- func (*ProductsResult) Descriptor() ([]byte, []int)deprecated
- func (x *ProductsResult) GetError() *Error
- func (x *ProductsResult) GetProducts() []*Product
- func (x *ProductsResult) GetTimestamp() *timestamppb.Timestamp
- func (*ProductsResult) ProtoMessage()
- func (x *ProductsResult) ProtoReflect() protoreflect.Message
- func (x *ProductsResult) Reset()
- func (x *ProductsResult) String() string
- type UnimplementedCategoryCommandServer
- func (UnimplementedCategoryCommandServer) Create(context.Context, *CategoryUpParam) (*CategoryUpResult, error)
- func (UnimplementedCategoryCommandServer) Delete(context.Context, *CategoryUpParam) (*CategoryUpResult, error)
- func (UnimplementedCategoryCommandServer) Update(context.Context, *CategoryUpParam) (*CategoryUpResult, error)
- type UnimplementedCategoryQueryServer
- type UnimplementedProductCommandServer
- func (UnimplementedProductCommandServer) Create(context.Context, *ProductUpParam) (*ProductUpResult, error)
- func (UnimplementedProductCommandServer) Delete(context.Context, *ProductUpParam) (*ProductUpResult, error)
- func (UnimplementedProductCommandServer) Update(context.Context, *ProductUpParam) (*ProductUpResult, error)
- type UnimplementedProductQueryServer
- func (UnimplementedProductQueryServer) ById(context.Context, *ProductParam) (*ProductResult, error)
- func (UnimplementedProductQueryServer) ByKeyword(context.Context, *ProductParam) (*ProductsResult, error)
- func (UnimplementedProductQueryServer) List(context.Context, *emptypb.Empty) (*ProductsResult, error)
- func (UnimplementedProductQueryServer) ListStream(*emptypb.Empty, ProductQuery_ListStreamServer) error
- type UnsafeCategoryCommandServer
- type UnsafeCategoryQueryServer
- type UnsafeProductCommandServer
- type UnsafeProductQueryServer
Constants ¶
const ( CategoryCommand_Create_FullMethodName = "/proto.CategoryCommand/Create" CategoryCommand_Update_FullMethodName = "/proto.CategoryCommand/Update" CategoryCommand_Delete_FullMethodName = "/proto.CategoryCommand/Delete" )
const ( ProductCommand_Create_FullMethodName = "/proto.ProductCommand/Create" ProductCommand_Update_FullMethodName = "/proto.ProductCommand/Update" ProductCommand_Delete_FullMethodName = "/proto.ProductCommand/Delete" )
const ( CategoryQuery_List_FullMethodName = "/proto.CategoryQuery/List" CategoryQuery_ById_FullMethodName = "/proto.CategoryQuery/ById" )
const ( ProductQuery_ListStream_FullMethodName = "/proto.ProductQuery/ListStream" ProductQuery_List_FullMethodName = "/proto.ProductQuery/List" ProductQuery_ById_FullMethodName = "/proto.ProductQuery/ById" ProductQuery_ByKeyword_FullMethodName = "/proto.ProductQuery/ByKeyword" )
Variables ¶
var ( CRUD_name = map[int32]string{ 0: "UNKNOWN", 1: "INSERT", 2: "UPDATE", 3: "DELETE", } CRUD_value = map[string]int32{ "UNKNOWN": 0, "INSERT": 1, "UPDATE": 2, "DELETE": 3, } )
Enum value maps for CRUD.
var CategoryCommand_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.CategoryCommand", HandlerType: (*CategoryCommandServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _CategoryCommand_Create_Handler, }, { MethodName: "Update", Handler: _CategoryCommand_Update_Handler, }, { MethodName: "Delete", Handler: _CategoryCommand_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/command.proto", }
CategoryCommand_ServiceDesc is the grpc.ServiceDesc for CategoryCommand service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var CategoryQuery_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.CategoryQuery", HandlerType: (*CategoryQueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _CategoryQuery_List_Handler, }, { MethodName: "ById", Handler: _CategoryQuery_ById_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/query.proto", }
CategoryQuery_ServiceDesc is the grpc.ServiceDesc for CategoryQuery service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_command_proto protoreflect.FileDescriptor
var File_proto_error_proto protoreflect.FileDescriptor
var File_proto_models_proto protoreflect.FileDescriptor
var File_proto_query_proto protoreflect.FileDescriptor
var ProductCommand_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.ProductCommand", HandlerType: (*ProductCommandServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _ProductCommand_Create_Handler, }, { MethodName: "Update", Handler: _ProductCommand_Update_Handler, }, { MethodName: "Delete", Handler: _ProductCommand_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/command.proto", }
ProductCommand_ServiceDesc is the grpc.ServiceDesc for ProductCommand service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ProductQuery_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.ProductQuery", HandlerType: (*ProductQueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _ProductQuery_List_Handler, }, { MethodName: "ById", Handler: _ProductQuery_ById_Handler, }, { MethodName: "ByKeyword", Handler: _ProductQuery_ByKeyword_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListStream", Handler: _ProductQuery_ListStream_Handler, ServerStreams: true, }, }, Metadata: "proto/query.proto", }
ProductQuery_ServiceDesc is the grpc.ServiceDesc for ProductQuery service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterCategoryCommandServer ¶
func RegisterCategoryCommandServer(s grpc.ServiceRegistrar, srv CategoryCommandServer)
func RegisterCategoryQueryServer ¶
func RegisterCategoryQueryServer(s grpc.ServiceRegistrar, srv CategoryQueryServer)
func RegisterProductCommandServer ¶
func RegisterProductCommandServer(s grpc.ServiceRegistrar, srv ProductCommandServer)
func RegisterProductQueryServer ¶
func RegisterProductQueryServer(s grpc.ServiceRegistrar, srv ProductQueryServer)
Types ¶
type CRUD ¶
type CRUD int32
更新の種類
func (CRUD) Descriptor ¶
func (CRUD) Descriptor() protoreflect.EnumDescriptor
func (CRUD) EnumDescriptor
deprecated
func (CRUD) Number ¶
func (x CRUD) Number() protoreflect.EnumNumber
func (CRUD) Type ¶
func (CRUD) Type() protoreflect.EnumType
type CategoriesResult ¶
type CategoriesResult struct { Categories []*Category `protobuf:"bytes,1,rep,name=categories,proto3" json:"categories,omitempty"` // 商品カテゴリ複数 Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // エラー Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // タイムスタンプ // contains filtered or unexported fields }
商品カテゴリ複数件を返すResult型
func (*CategoriesResult) Descriptor
deprecated
func (*CategoriesResult) Descriptor() ([]byte, []int)
Deprecated: Use CategoriesResult.ProtoReflect.Descriptor instead.
func (*CategoriesResult) GetCategories ¶
func (x *CategoriesResult) GetCategories() []*Category
func (*CategoriesResult) GetError ¶
func (x *CategoriesResult) GetError() *Error
func (*CategoriesResult) GetTimestamp ¶
func (x *CategoriesResult) GetTimestamp() *timestamppb.Timestamp
func (*CategoriesResult) ProtoMessage ¶
func (*CategoriesResult) ProtoMessage()
func (*CategoriesResult) ProtoReflect ¶
func (x *CategoriesResult) ProtoReflect() protoreflect.Message
func (*CategoriesResult) Reset ¶
func (x *CategoriesResult) Reset()
func (*CategoriesResult) String ¶
func (x *CategoriesResult) String() string
type Category ¶
type Category 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"` // カテゴリ名 // contains filtered or unexported fields }
商品カテゴリ型の定義
func (*Category) Descriptor
deprecated
func (*Category) ProtoMessage ¶
func (*Category) ProtoMessage()
func (*Category) ProtoReflect ¶
func (x *Category) ProtoReflect() protoreflect.Message
type CategoryCommandClient ¶
type CategoryCommandClient interface { // 商品カテゴリを追加した結果を返す Create(ctx context.Context, in *CategoryUpParam, opts ...grpc.CallOption) (*CategoryUpResult, error) // 商品カテゴリを更新した結果を返す Update(ctx context.Context, in *CategoryUpParam, opts ...grpc.CallOption) (*CategoryUpResult, error) // 商品カテゴリを削除した結果を返す Delete(ctx context.Context, in *CategoryUpParam, opts ...grpc.CallOption) (*CategoryUpResult, error) }
CategoryCommandClient is the client API for CategoryCommand 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 NewCategoryCommandClient ¶
func NewCategoryCommandClient(cc grpc.ClientConnInterface) CategoryCommandClient
type CategoryCommandServer ¶
type CategoryCommandServer interface { // 商品カテゴリを追加した結果を返す Create(context.Context, *CategoryUpParam) (*CategoryUpResult, error) // 商品カテゴリを更新した結果を返す Update(context.Context, *CategoryUpParam) (*CategoryUpResult, error) // 商品カテゴリを削除した結果を返す Delete(context.Context, *CategoryUpParam) (*CategoryUpResult, error) // contains filtered or unexported methods }
CategoryCommandServer is the server API for CategoryCommand service. All implementations must embed UnimplementedCategoryCommandServer for forward compatibility
type CategoryParam ¶
type CategoryParam struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // カテゴリ番号 // contains filtered or unexported fields }
***************************************** 商品カテゴリ検索用param型とResult型の定義 *****************************************
カテゴリ検索用Param型
func (*CategoryParam) Descriptor
deprecated
func (*CategoryParam) Descriptor() ([]byte, []int)
Deprecated: Use CategoryParam.ProtoReflect.Descriptor instead.
func (*CategoryParam) GetId ¶
func (x *CategoryParam) GetId() string
func (*CategoryParam) ProtoMessage ¶
func (*CategoryParam) ProtoMessage()
func (*CategoryParam) ProtoReflect ¶
func (x *CategoryParam) ProtoReflect() protoreflect.Message
func (*CategoryParam) Reset ¶
func (x *CategoryParam) Reset()
func (*CategoryParam) String ¶
func (x *CategoryParam) String() string
type CategoryQueryClient ¶
type CategoryQueryClient interface { // すべてのカテゴリを取得して返す List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CategoriesResult, error) // 指定されたIDのカテゴリを取得して返す ById(ctx context.Context, in *CategoryParam, opts ...grpc.CallOption) (*CategoryResult, error) }
CategoryQueryClient is the client API for CategoryQuery 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 NewCategoryQueryClient ¶
func NewCategoryQueryClient(cc grpc.ClientConnInterface) CategoryQueryClient
type CategoryQueryServer ¶
type CategoryQueryServer interface { // すべてのカテゴリを取得して返す List(context.Context, *emptypb.Empty) (*CategoriesResult, error) // 指定されたIDのカテゴリを取得して返す ById(context.Context, *CategoryParam) (*CategoryResult, error) // contains filtered or unexported methods }
CategoryQueryServer is the server API for CategoryQuery service. All implementations must embed UnimplementedCategoryQueryServer for forward compatibility
type CategoryResult ¶
type CategoryResult struct { // エラーか検索結果のいずれかを返す // // Types that are assignable to Result: // // *CategoryResult_Category // *CategoryResult_Error Result isCategoryResult_Result `protobuf_oneof:"result"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // タイムスタンプ // contains filtered or unexported fields }
商品カテゴリ1件を返すResult型
func (*CategoryResult) Descriptor
deprecated
func (*CategoryResult) Descriptor() ([]byte, []int)
Deprecated: Use CategoryResult.ProtoReflect.Descriptor instead.
func (*CategoryResult) GetCategory ¶
func (x *CategoryResult) GetCategory() *Category
func (*CategoryResult) GetError ¶
func (x *CategoryResult) GetError() *Error
func (*CategoryResult) GetResult ¶
func (m *CategoryResult) GetResult() isCategoryResult_Result
func (*CategoryResult) GetTimestamp ¶
func (x *CategoryResult) GetTimestamp() *timestamppb.Timestamp
func (*CategoryResult) ProtoMessage ¶
func (*CategoryResult) ProtoMessage()
func (*CategoryResult) ProtoReflect ¶
func (x *CategoryResult) ProtoReflect() protoreflect.Message
func (*CategoryResult) Reset ¶
func (x *CategoryResult) Reset()
func (*CategoryResult) String ¶
func (x *CategoryResult) String() string
type CategoryResult_Category ¶
type CategoryResult_Category struct {
Category *Category `protobuf:"bytes,1,opt,name=category,proto3,oneof"` // 商品カテゴリ
}
type CategoryResult_Error ¶
type CategoryResult_Error struct {
Error *Error `protobuf:"bytes,2,opt,name=error,proto3,oneof"` // エラー
}
type CategoryUpParam ¶
type CategoryUpParam struct { Crud CRUD `protobuf:"varint,1,opt,name=crud,proto3,enum=proto.CRUD" json:"crud,omitempty"` // 更新の種類 Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // 商品カテゴリ番号 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 商品カテゴリ名 // contains filtered or unexported fields }
***************************************** 商品カテゴリ更新用param型とResult型の定義 *****************************************
商品カテゴリ更新Param型
func (*CategoryUpParam) Descriptor
deprecated
func (*CategoryUpParam) Descriptor() ([]byte, []int)
Deprecated: Use CategoryUpParam.ProtoReflect.Descriptor instead.
func (*CategoryUpParam) GetCrud ¶
func (x *CategoryUpParam) GetCrud() CRUD
func (*CategoryUpParam) GetId ¶
func (x *CategoryUpParam) GetId() string
func (*CategoryUpParam) GetName ¶
func (x *CategoryUpParam) GetName() string
func (*CategoryUpParam) ProtoMessage ¶
func (*CategoryUpParam) ProtoMessage()
func (*CategoryUpParam) ProtoReflect ¶
func (x *CategoryUpParam) ProtoReflect() protoreflect.Message
func (*CategoryUpParam) Reset ¶
func (x *CategoryUpParam) Reset()
func (*CategoryUpParam) String ¶
func (x *CategoryUpParam) String() string
type CategoryUpResult ¶
type CategoryUpResult struct { Category *Category `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` // 更新結果 Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // 更新エラー Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // タイムスタンプ // contains filtered or unexported fields }
商品カテゴリ更新Result型
func (*CategoryUpResult) Descriptor
deprecated
func (*CategoryUpResult) Descriptor() ([]byte, []int)
Deprecated: Use CategoryUpResult.ProtoReflect.Descriptor instead.
func (*CategoryUpResult) GetCategory ¶
func (x *CategoryUpResult) GetCategory() *Category
func (*CategoryUpResult) GetError ¶
func (x *CategoryUpResult) GetError() *Error
func (*CategoryUpResult) GetTimestamp ¶
func (x *CategoryUpResult) GetTimestamp() *timestamppb.Timestamp
func (*CategoryUpResult) ProtoMessage ¶
func (*CategoryUpResult) ProtoMessage()
func (*CategoryUpResult) ProtoReflect ¶
func (x *CategoryUpResult) ProtoReflect() protoreflect.Message
func (*CategoryUpResult) Reset ¶
func (x *CategoryUpResult) Reset()
func (*CategoryUpResult) String ¶
func (x *CategoryUpResult) String() string
type Error ¶
type Error struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // エラー種別 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // エラーメッセージ // contains filtered or unexported fields }
エラー型の定義
func (*Error) Descriptor
deprecated
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type Product ¶
type Product struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 商品Id Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 商品名 Price int32 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"` // 単価 Category *Category `protobuf:"bytes,4,opt,name=category,proto3,oneof" json:"category,omitempty"` // 商品カテゴリ // contains filtered or unexported fields }
商品型の定義
func (*Product) Descriptor
deprecated
func (*Product) GetCategory ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductCommandClient ¶
type ProductCommandClient interface { // 商品カテゴリを追加した結果を返す Create(ctx context.Context, in *ProductUpParam, opts ...grpc.CallOption) (*ProductUpResult, error) // 商品カテゴリを更新した結果を返す Update(ctx context.Context, in *ProductUpParam, opts ...grpc.CallOption) (*ProductUpResult, error) // 商品カテゴリを削除した結果を返す Delete(ctx context.Context, in *ProductUpParam, opts ...grpc.CallOption) (*ProductUpResult, error) }
ProductCommandClient is the client API for ProductCommand 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 NewProductCommandClient ¶
func NewProductCommandClient(cc grpc.ClientConnInterface) ProductCommandClient
type ProductCommandServer ¶
type ProductCommandServer interface { // 商品カテゴリを追加した結果を返す Create(context.Context, *ProductUpParam) (*ProductUpResult, error) // 商品カテゴリを更新した結果を返す Update(context.Context, *ProductUpParam) (*ProductUpResult, error) // 商品カテゴリを削除した結果を返す Delete(context.Context, *ProductUpParam) (*ProductUpResult, error) // contains filtered or unexported methods }
ProductCommandServer is the server API for ProductCommand service. All implementations must embed UnimplementedProductCommandServer for forward compatibility
type ProductParam ¶
type ProductParam struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 商品番号 Keyword string `protobuf:"bytes,2,opt,name=keyword,proto3" json:"keyword,omitempty"` // キーワード // contains filtered or unexported fields }
***************************************** 商品検索用param型とResult型の定義 *****************************************
商品検索用Param型
func (*ProductParam) Descriptor
deprecated
func (*ProductParam) Descriptor() ([]byte, []int)
Deprecated: Use ProductParam.ProtoReflect.Descriptor instead.
func (*ProductParam) GetId ¶
func (x *ProductParam) GetId() string
func (*ProductParam) GetKeyword ¶
func (x *ProductParam) GetKeyword() string
func (*ProductParam) ProtoMessage ¶
func (*ProductParam) ProtoMessage()
func (*ProductParam) ProtoReflect ¶
func (x *ProductParam) ProtoReflect() protoreflect.Message
func (*ProductParam) Reset ¶
func (x *ProductParam) Reset()
func (*ProductParam) String ¶
func (x *ProductParam) String() string
type ProductQueryClient ¶
type ProductQueryClient interface { // すべての商品を取得して返す(Server streaming RPC) ListStream(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (ProductQuery_ListStreamClient, error) // すべての商品を取得して返す List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ProductsResult, error) // 指定されたIDの商品を取得して返す ById(ctx context.Context, in *ProductParam, opts ...grpc.CallOption) (*ProductResult, error) // 指定されたキーワードの商品を取得して返す ByKeyword(ctx context.Context, in *ProductParam, opts ...grpc.CallOption) (*ProductsResult, error) }
ProductQueryClient is the client API for ProductQuery 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 NewProductQueryClient ¶
func NewProductQueryClient(cc grpc.ClientConnInterface) ProductQueryClient
type ProductQueryServer ¶
type ProductQueryServer interface { // すべての商品を取得して返す(Server streaming RPC) ListStream(*emptypb.Empty, ProductQuery_ListStreamServer) error // すべての商品を取得して返す List(context.Context, *emptypb.Empty) (*ProductsResult, error) // 指定されたIDの商品を取得して返す ById(context.Context, *ProductParam) (*ProductResult, error) // 指定されたキーワードの商品を取得して返す ByKeyword(context.Context, *ProductParam) (*ProductsResult, error) // contains filtered or unexported methods }
ProductQueryServer is the server API for ProductQuery service. All implementations must embed UnimplementedProductQueryServer for forward compatibility
type ProductQuery_ListStreamClient ¶
type ProductQuery_ListStreamClient interface { Recv() (*Product, error) grpc.ClientStream }
type ProductQuery_ListStreamServer ¶
type ProductQuery_ListStreamServer interface { Send(*Product) error grpc.ServerStream }
type ProductResult ¶
type ProductResult struct { // エラーか検索結果のいずれかを返す // // Types that are assignable to Result: // // *ProductResult_Product // *ProductResult_Error Result isProductResult_Result `protobuf_oneof:"result"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // タイムスタンプ // contains filtered or unexported fields }
商品1件を返すResult型
func (*ProductResult) Descriptor
deprecated
func (*ProductResult) Descriptor() ([]byte, []int)
Deprecated: Use ProductResult.ProtoReflect.Descriptor instead.
func (*ProductResult) GetError ¶
func (x *ProductResult) GetError() *Error
func (*ProductResult) GetProduct ¶
func (x *ProductResult) GetProduct() *Product
func (*ProductResult) GetResult ¶
func (m *ProductResult) GetResult() isProductResult_Result
func (*ProductResult) GetTimestamp ¶
func (x *ProductResult) GetTimestamp() *timestamppb.Timestamp
func (*ProductResult) ProtoMessage ¶
func (*ProductResult) ProtoMessage()
func (*ProductResult) ProtoReflect ¶
func (x *ProductResult) ProtoReflect() protoreflect.Message
func (*ProductResult) Reset ¶
func (x *ProductResult) Reset()
func (*ProductResult) String ¶
func (x *ProductResult) String() string
type ProductResult_Error ¶
type ProductResult_Error struct {
Error *Error `protobuf:"bytes,2,opt,name=error,proto3,oneof"` // 検索エラー
}
type ProductResult_Product ¶
type ProductResult_Product struct {
Product *Product `protobuf:"bytes,1,opt,name=product,proto3,oneof"` // 検索結果
}
type ProductUpParam ¶
type ProductUpParam struct { Crud CRUD `protobuf:"varint,1,opt,name=crud,proto3,enum=proto.CRUD" json:"crud,omitempty"` // 更新の種類 Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // 商品番号 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 商品名 Price int32 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` // 単価 CategoryId string `protobuf:"bytes,5,opt,name=categoryId,proto3" json:"categoryId,omitempty"` // 商品カテゴリ番号 // contains filtered or unexported fields }
商品更新Param型
func (*ProductUpParam) Descriptor
deprecated
func (*ProductUpParam) Descriptor() ([]byte, []int)
Deprecated: Use ProductUpParam.ProtoReflect.Descriptor instead.
func (*ProductUpParam) GetCategoryId ¶
func (x *ProductUpParam) GetCategoryId() string
func (*ProductUpParam) GetCrud ¶
func (x *ProductUpParam) GetCrud() CRUD
func (*ProductUpParam) GetId ¶
func (x *ProductUpParam) GetId() string
func (*ProductUpParam) GetName ¶
func (x *ProductUpParam) GetName() string
func (*ProductUpParam) GetPrice ¶
func (x *ProductUpParam) GetPrice() int32
func (*ProductUpParam) ProtoMessage ¶
func (*ProductUpParam) ProtoMessage()
func (*ProductUpParam) ProtoReflect ¶
func (x *ProductUpParam) ProtoReflect() protoreflect.Message
func (*ProductUpParam) Reset ¶
func (x *ProductUpParam) Reset()
func (*ProductUpParam) String ¶
func (x *ProductUpParam) String() string
type ProductUpResult ¶
type ProductUpResult struct { Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"` // 更新結果 Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // 更新エラー Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // タイムスタンプ // contains filtered or unexported fields }
商品更新Result型
func (*ProductUpResult) Descriptor
deprecated
func (*ProductUpResult) Descriptor() ([]byte, []int)
Deprecated: Use ProductUpResult.ProtoReflect.Descriptor instead.
func (*ProductUpResult) GetError ¶
func (x *ProductUpResult) GetError() *Error
func (*ProductUpResult) GetProduct ¶
func (x *ProductUpResult) GetProduct() *Product
func (*ProductUpResult) GetTimestamp ¶
func (x *ProductUpResult) GetTimestamp() *timestamppb.Timestamp
func (*ProductUpResult) ProtoMessage ¶
func (*ProductUpResult) ProtoMessage()
func (*ProductUpResult) ProtoReflect ¶
func (x *ProductUpResult) ProtoReflect() protoreflect.Message
func (*ProductUpResult) Reset ¶
func (x *ProductUpResult) Reset()
func (*ProductUpResult) String ¶
func (x *ProductUpResult) String() string
type ProductsResult ¶
type ProductsResult struct { Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` // 商品複数 Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // エラー Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // タイムスタンプ // contains filtered or unexported fields }
商品複数件を返すResult型
func (*ProductsResult) Descriptor
deprecated
func (*ProductsResult) Descriptor() ([]byte, []int)
Deprecated: Use ProductsResult.ProtoReflect.Descriptor instead.
func (*ProductsResult) GetError ¶
func (x *ProductsResult) GetError() *Error
func (*ProductsResult) GetProducts ¶
func (x *ProductsResult) GetProducts() []*Product
func (*ProductsResult) GetTimestamp ¶
func (x *ProductsResult) GetTimestamp() *timestamppb.Timestamp
func (*ProductsResult) ProtoMessage ¶
func (*ProductsResult) ProtoMessage()
func (*ProductsResult) ProtoReflect ¶
func (x *ProductsResult) ProtoReflect() protoreflect.Message
func (*ProductsResult) Reset ¶
func (x *ProductsResult) Reset()
func (*ProductsResult) String ¶
func (x *ProductsResult) String() string
type UnimplementedCategoryCommandServer ¶
type UnimplementedCategoryCommandServer struct { }
UnimplementedCategoryCommandServer must be embedded to have forward compatible implementations.
func (UnimplementedCategoryCommandServer) Create ¶
func (UnimplementedCategoryCommandServer) Create(context.Context, *CategoryUpParam) (*CategoryUpResult, error)
func (UnimplementedCategoryCommandServer) Delete ¶
func (UnimplementedCategoryCommandServer) Delete(context.Context, *CategoryUpParam) (*CategoryUpResult, error)
func (UnimplementedCategoryCommandServer) Update ¶
func (UnimplementedCategoryCommandServer) Update(context.Context, *CategoryUpParam) (*CategoryUpResult, error)
type UnimplementedCategoryQueryServer ¶
type UnimplementedCategoryQueryServer struct { }
UnimplementedCategoryQueryServer must be embedded to have forward compatible implementations.
func (UnimplementedCategoryQueryServer) ById ¶
func (UnimplementedCategoryQueryServer) ById(context.Context, *CategoryParam) (*CategoryResult, error)
func (UnimplementedCategoryQueryServer) List ¶
func (UnimplementedCategoryQueryServer) List(context.Context, *emptypb.Empty) (*CategoriesResult, error)
type UnimplementedProductCommandServer ¶
type UnimplementedProductCommandServer struct { }
UnimplementedProductCommandServer must be embedded to have forward compatible implementations.
func (UnimplementedProductCommandServer) Create ¶
func (UnimplementedProductCommandServer) Create(context.Context, *ProductUpParam) (*ProductUpResult, error)
func (UnimplementedProductCommandServer) Delete ¶
func (UnimplementedProductCommandServer) Delete(context.Context, *ProductUpParam) (*ProductUpResult, error)
func (UnimplementedProductCommandServer) Update ¶
func (UnimplementedProductCommandServer) Update(context.Context, *ProductUpParam) (*ProductUpResult, error)
type UnimplementedProductQueryServer ¶
type UnimplementedProductQueryServer struct { }
UnimplementedProductQueryServer must be embedded to have forward compatible implementations.
func (UnimplementedProductQueryServer) ById ¶
func (UnimplementedProductQueryServer) ById(context.Context, *ProductParam) (*ProductResult, error)
func (UnimplementedProductQueryServer) ByKeyword ¶
func (UnimplementedProductQueryServer) ByKeyword(context.Context, *ProductParam) (*ProductsResult, error)
func (UnimplementedProductQueryServer) List ¶
func (UnimplementedProductQueryServer) List(context.Context, *emptypb.Empty) (*ProductsResult, error)
func (UnimplementedProductQueryServer) ListStream ¶
func (UnimplementedProductQueryServer) ListStream(*emptypb.Empty, ProductQuery_ListStreamServer) error
type UnsafeCategoryCommandServer ¶
type UnsafeCategoryCommandServer interface {
// contains filtered or unexported methods
}
UnsafeCategoryCommandServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CategoryCommandServer will result in compilation errors.
type UnsafeCategoryQueryServer ¶
type UnsafeCategoryQueryServer interface {
// contains filtered or unexported methods
}
UnsafeCategoryQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CategoryQueryServer will result in compilation errors.
type UnsafeProductCommandServer ¶
type UnsafeProductCommandServer interface {
// contains filtered or unexported methods
}
UnsafeProductCommandServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProductCommandServer will result in compilation errors.
type UnsafeProductQueryServer ¶
type UnsafeProductQueryServer interface {
// contains filtered or unexported methods
}
UnsafeProductQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProductQueryServer will result in compilation errors.