Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
- func RegisterShopServiceServer(s grpc.ServiceRegistrar, srv ShopServiceServer)
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type AllShop
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetId() int32
- func (x *Product) GetName() string
- func (x *Product) GetPrice() int32
- func (x *Product) GetShopId() int32
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductServiceClient
- type ProductServiceServer
- type ReqAllShop
- type ReqShopProducts
- type ReqUser
- type ResUser
- type Shop
- type ShopByID
- type ShopByOwnerId
- type ShopProducts
- type ShopServiceClient
- type ShopServiceServer
- type UnimplementedProductServiceServer
- type UnimplementedShopServiceServer
- type UnimplementedUserServiceServer
- type UnsafeProductServiceServer
- type UnsafeShopServiceServer
- type UnsafeUserServiceServer
- type UserServiceClient
- type UserServiceServer
Constants ¶
const (
ProductService_GetShopProductsByShopId_FullMethodName = "/proto.ProductService/GetShopProductsByShopId"
)
const (
ShopService_GetShopByOwnerId_FullMethodName = "/proto.ShopService/GetShopByOwnerId"
)
const (
UserService_GetUser_FullMethodName = "/proto.UserService/GetUser"
)
Variables ¶
var File_proto_product_service_proto protoreflect.FileDescriptor
var File_proto_shop_service_proto protoreflect.FileDescriptor
var File_proto_user_service_proto protoreflect.FileDescriptor
var ProductService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.ProductService", HandlerType: (*ProductServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetShopProductsByShopId", Handler: _ProductService_GetShopProductsByShopId_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/product_service.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)
var ShopService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.ShopService", HandlerType: (*ShopServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetShopByOwnerId", Handler: _ShopService_GetShopByOwnerId_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/shop_service.proto", }
ShopService_ServiceDesc is the grpc.ServiceDesc for ShopService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/user_service.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService 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)
func RegisterShopServiceServer ¶
func RegisterShopServiceServer(s grpc.ServiceRegistrar, srv ShopServiceServer)
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type AllShop ¶
type AllShop struct { Shop []*Shop `protobuf:"bytes,1,rep,name=Shop,proto3" json:"Shop,omitempty"` // contains filtered or unexported fields }
func (*AllShop) Descriptor
deprecated
func (*AllShop) ProtoMessage ¶
func (*AllShop) ProtoMessage()
func (*AllShop) ProtoReflect ¶
func (x *AllShop) ProtoReflect() protoreflect.Message
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"` Price int32 `protobuf:"varint,3,opt,name=Price,proto3" json:"Price,omitempty"` ShopId int32 `protobuf:"varint,4,opt,name=ShopId,proto3" json:"ShopId,omitempty"` // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductServiceClient ¶
type ProductServiceClient interface {
GetShopProductsByShopId(ctx context.Context, in *ReqShopProducts, opts ...grpc.CallOption) (*ShopProducts, 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 { GetShopProductsByShopId(context.Context, *ReqShopProducts) (*ShopProducts, error) // contains filtered or unexported methods }
ProductServiceServer is the server API for ProductService service. All implementations must embed UnimplementedProductServiceServer for forward compatibility
type ReqAllShop ¶
type ReqAllShop struct {
// contains filtered or unexported fields
}
func (*ReqAllShop) Descriptor
deprecated
func (*ReqAllShop) Descriptor() ([]byte, []int)
Deprecated: Use ReqAllShop.ProtoReflect.Descriptor instead.
func (*ReqAllShop) ProtoMessage ¶
func (*ReqAllShop) ProtoMessage()
func (*ReqAllShop) ProtoReflect ¶
func (x *ReqAllShop) ProtoReflect() protoreflect.Message
func (*ReqAllShop) Reset ¶
func (x *ReqAllShop) Reset()
func (*ReqAllShop) String ¶
func (x *ReqAllShop) String() string
type ReqShopProducts ¶
type ReqShopProducts struct { ShopId int32 `protobuf:"varint,1,opt,name=ShopId,proto3" json:"ShopId,omitempty"` // contains filtered or unexported fields }
func (*ReqShopProducts) Descriptor
deprecated
func (*ReqShopProducts) Descriptor() ([]byte, []int)
Deprecated: Use ReqShopProducts.ProtoReflect.Descriptor instead.
func (*ReqShopProducts) GetShopId ¶
func (x *ReqShopProducts) GetShopId() int32
func (*ReqShopProducts) ProtoMessage ¶
func (*ReqShopProducts) ProtoMessage()
func (*ReqShopProducts) ProtoReflect ¶
func (x *ReqShopProducts) ProtoReflect() protoreflect.Message
func (*ReqShopProducts) Reset ¶
func (x *ReqShopProducts) Reset()
func (*ReqShopProducts) String ¶
func (x *ReqShopProducts) String() string
type ReqUser ¶
type ReqUser struct { Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // contains filtered or unexported fields }
func (*ReqUser) Descriptor
deprecated
func (*ReqUser) ProtoMessage ¶
func (*ReqUser) ProtoMessage()
func (*ReqUser) ProtoReflect ¶
func (x *ReqUser) ProtoReflect() protoreflect.Message
type ResUser ¶
type ResUser 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"` // contains filtered or unexported fields }
func (*ResUser) Descriptor
deprecated
func (*ResUser) ProtoMessage ¶
func (*ResUser) ProtoMessage()
func (*ResUser) ProtoReflect ¶
func (x *ResUser) ProtoReflect() protoreflect.Message
type Shop ¶
type Shop 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"` OwnerId int32 `protobuf:"varint,3,opt,name=OwnerId,proto3" json:"OwnerId,omitempty"` // contains filtered or unexported fields }
func (*Shop) Descriptor
deprecated
func (*Shop) GetOwnerId ¶
func (*Shop) ProtoMessage ¶
func (*Shop) ProtoMessage()
func (*Shop) ProtoReflect ¶
func (x *Shop) ProtoReflect() protoreflect.Message
type ShopByID ¶
type ShopByID struct { ShopId int32 `protobuf:"varint,1,opt,name=ShopId,proto3" json:"ShopId,omitempty"` // contains filtered or unexported fields }
func (*ShopByID) Descriptor
deprecated
func (*ShopByID) ProtoMessage ¶
func (*ShopByID) ProtoMessage()
func (*ShopByID) ProtoReflect ¶
func (x *ShopByID) ProtoReflect() protoreflect.Message
type ShopByOwnerId ¶
type ShopByOwnerId struct { OwnerId int32 `protobuf:"varint,1,opt,name=OwnerId,proto3" json:"OwnerId,omitempty"` // contains filtered or unexported fields }
func (*ShopByOwnerId) Descriptor
deprecated
func (*ShopByOwnerId) Descriptor() ([]byte, []int)
Deprecated: Use ShopByOwnerId.ProtoReflect.Descriptor instead.
func (*ShopByOwnerId) GetOwnerId ¶
func (x *ShopByOwnerId) GetOwnerId() int32
func (*ShopByOwnerId) ProtoMessage ¶
func (*ShopByOwnerId) ProtoMessage()
func (*ShopByOwnerId) ProtoReflect ¶
func (x *ShopByOwnerId) ProtoReflect() protoreflect.Message
func (*ShopByOwnerId) Reset ¶
func (x *ShopByOwnerId) Reset()
func (*ShopByOwnerId) String ¶
func (x *ShopByOwnerId) String() string
type ShopProducts ¶
type ShopProducts struct { Products []*Product `protobuf:"bytes,1,rep,name=Products,proto3" json:"Products,omitempty"` // contains filtered or unexported fields }
func (*ShopProducts) Descriptor
deprecated
func (*ShopProducts) Descriptor() ([]byte, []int)
Deprecated: Use ShopProducts.ProtoReflect.Descriptor instead.
func (*ShopProducts) GetProducts ¶
func (x *ShopProducts) GetProducts() []*Product
func (*ShopProducts) ProtoMessage ¶
func (*ShopProducts) ProtoMessage()
func (*ShopProducts) ProtoReflect ¶
func (x *ShopProducts) ProtoReflect() protoreflect.Message
func (*ShopProducts) Reset ¶
func (x *ShopProducts) Reset()
func (*ShopProducts) String ¶
func (x *ShopProducts) String() string
type ShopServiceClient ¶
type ShopServiceClient interface {
GetShopByOwnerId(ctx context.Context, in *ShopByOwnerId, opts ...grpc.CallOption) (*AllShop, error)
}
ShopServiceClient is the client API for ShopService 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 NewShopServiceClient ¶
func NewShopServiceClient(cc grpc.ClientConnInterface) ShopServiceClient
type ShopServiceServer ¶
type ShopServiceServer interface { GetShopByOwnerId(context.Context, *ShopByOwnerId) (*AllShop, error) // contains filtered or unexported methods }
ShopServiceServer is the server API for ShopService service. All implementations must embed UnimplementedShopServiceServer for forward compatibility
type UnimplementedProductServiceServer ¶
type UnimplementedProductServiceServer struct { }
UnimplementedProductServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedProductServiceServer) GetShopProductsByShopId ¶
func (UnimplementedProductServiceServer) GetShopProductsByShopId(context.Context, *ReqShopProducts) (*ShopProducts, error)
type UnimplementedShopServiceServer ¶
type UnimplementedShopServiceServer struct { }
UnimplementedShopServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedShopServiceServer) GetShopByOwnerId ¶
func (UnimplementedShopServiceServer) GetShopByOwnerId(context.Context, *ShopByOwnerId) (*AllShop, error)
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
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 UnsafeShopServiceServer ¶
type UnsafeShopServiceServer interface {
// contains filtered or unexported methods
}
UnsafeShopServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShopServiceServer will result in compilation errors.
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UserServiceClient ¶
type UserServiceClient interface {
GetUser(ctx context.Context, in *ReqUser, opts ...grpc.CallOption) (*ResUser, error)
}
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { GetUser(context.Context, *ReqUser) (*ResUser, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility