Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetCreatedAt() *timestamppb.Timestamp
- func (x *Product) GetDescription() string
- func (x *Product) GetId() string
- func (x *Product) GetName() string
- func (x *Product) GetPrice() int64
- func (x *Product) GetQuantity() int64
- func (x *Product) GetSellerId() string
- func (x *Product) GetUpdatedAt() *timestamppb.Timestamp
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductServiceClient
- type ProductServiceServer
- type SingleProductRequest
- func (*SingleProductRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SingleProductRequest) GetId() string
- func (*SingleProductRequest) ProtoMessage()
- func (x *SingleProductRequest) ProtoReflect() protoreflect.Message
- func (x *SingleProductRequest) Reset()
- func (x *SingleProductRequest) String() string
- type UnimplementedProductServiceServer
- type UnsafeProductServiceServer
- type UpdateProductRequest
- func (*UpdateProductRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateProductRequest) GetDescription() string
- func (x *UpdateProductRequest) GetId() string
- func (x *UpdateProductRequest) GetName() string
- func (x *UpdateProductRequest) GetPrice() int64
- func (x *UpdateProductRequest) GetQuantity() int64
- func (x *UpdateProductRequest) GetSellerId() string
- func (*UpdateProductRequest) ProtoMessage()
- func (x *UpdateProductRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateProductRequest) Reset()
- func (x *UpdateProductRequest) String() string
Constants ¶
const ( ProductService_Get_FullMethodName = "/tanshogyo.v1.ProductService/Get" ProductService_Update_FullMethodName = "/tanshogyo.v1.ProductService/Update" )
Variables ¶
var File_product_proto protoreflect.FileDescriptor
var ProductService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tanshogyo.v1.ProductService", HandlerType: (*ProductServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _ProductService_Get_Handler, }, { MethodName: "Update", Handler: _ProductService_Update_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "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 Product ¶
type Product struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` SellerId string `protobuf:"bytes,2,opt,name=seller_id,json=sellerId,proto3" json:"seller_id,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` Price int64 `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"` Quantity int64 `protobuf:"varint,6,opt,name=quantity,proto3" json:"quantity,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) GetCreatedAt ¶
func (x *Product) GetCreatedAt() *timestamppb.Timestamp
func (*Product) GetDescription ¶
func (*Product) GetQuantity ¶
func (*Product) GetSellerId ¶
func (*Product) GetUpdatedAt ¶
func (x *Product) GetUpdatedAt() *timestamppb.Timestamp
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductServiceClient ¶
type ProductServiceClient interface { Get(ctx context.Context, in *SingleProductRequest, opts ...grpc.CallOption) (*Product, error) Update(ctx context.Context, in *UpdateProductRequest, opts ...grpc.CallOption) (*Product, 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 { Get(context.Context, *SingleProductRequest) (*Product, error) Update(context.Context, *UpdateProductRequest) (*Product, error) // contains filtered or unexported methods }
ProductServiceServer is the server API for ProductService service. All implementations must embed UnimplementedProductServiceServer for forward compatibility
type SingleProductRequest ¶
type SingleProductRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*SingleProductRequest) Descriptor
deprecated
func (*SingleProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use SingleProductRequest.ProtoReflect.Descriptor instead.
func (*SingleProductRequest) GetId ¶
func (x *SingleProductRequest) GetId() string
func (*SingleProductRequest) ProtoMessage ¶
func (*SingleProductRequest) ProtoMessage()
func (*SingleProductRequest) ProtoReflect ¶
func (x *SingleProductRequest) ProtoReflect() protoreflect.Message
func (*SingleProductRequest) Reset ¶
func (x *SingleProductRequest) Reset()
func (*SingleProductRequest) String ¶
func (x *SingleProductRequest) String() string
type UnimplementedProductServiceServer ¶
type UnimplementedProductServiceServer struct { }
UnimplementedProductServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedProductServiceServer) Get ¶
func (UnimplementedProductServiceServer) Get(context.Context, *SingleProductRequest) (*Product, error)
func (UnimplementedProductServiceServer) Update ¶
func (UnimplementedProductServiceServer) Update(context.Context, *UpdateProductRequest) (*Product, 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 { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` SellerId string `protobuf:"bytes,2,opt,name=seller_id,json=sellerId,proto3" json:"seller_id,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` Price int64 `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"` Quantity int64 `protobuf:"varint,6,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*UpdateProductRequest) Descriptor
deprecated
func (*UpdateProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateProductRequest.ProtoReflect.Descriptor instead.
func (*UpdateProductRequest) GetDescription ¶
func (x *UpdateProductRequest) GetDescription() string
func (*UpdateProductRequest) GetId ¶
func (x *UpdateProductRequest) GetId() string
func (*UpdateProductRequest) GetName ¶
func (x *UpdateProductRequest) GetName() string
func (*UpdateProductRequest) GetPrice ¶
func (x *UpdateProductRequest) GetPrice() int64
func (*UpdateProductRequest) GetQuantity ¶
func (x *UpdateProductRequest) GetQuantity() int64
func (*UpdateProductRequest) GetSellerId ¶
func (x *UpdateProductRequest) GetSellerId() string
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