proto

package
v0.0.0-...-10548b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductService_GetShopProductsByShopId_FullMethodName = "/proto.ProductService/GetShopProductsByShopId"
)
View Source
const (
	ShopService_GetShopByOwnerId_FullMethodName = "/proto.ShopService/GetShopByOwnerId"
)
View Source
const (
	UserService_GetUser_FullMethodName = "/proto.UserService/GetUser"
)

Variables

View Source
var File_proto_product_service_proto protoreflect.FileDescriptor
View Source
var File_proto_shop_service_proto protoreflect.FileDescriptor
View Source
var File_proto_user_service_proto protoreflect.FileDescriptor
View Source
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)

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use AllShop.ProtoReflect.Descriptor instead.

func (*AllShop) GetShop

func (x *AllShop) GetShop() []*Shop

func (*AllShop) ProtoMessage

func (*AllShop) ProtoMessage()

func (*AllShop) ProtoReflect

func (x *AllShop) ProtoReflect() protoreflect.Message

func (*AllShop) Reset

func (x *AllShop) Reset()

func (*AllShop) String

func (x *AllShop) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetId

func (x *Product) GetId() int32

func (*Product) GetName

func (x *Product) GetName() string

func (*Product) GetPrice

func (x *Product) GetPrice() int32

func (*Product) GetShopId

func (x *Product) GetShopId() int32

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) ProtoReflect

func (x *Product) ProtoReflect() protoreflect.Message

func (*Product) Reset

func (x *Product) Reset()

func (*Product) String

func (x *Product) String() string

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use ReqUser.ProtoReflect.Descriptor instead.

func (*ReqUser) GetId

func (x *ReqUser) GetId() int32

func (*ReqUser) ProtoMessage

func (*ReqUser) ProtoMessage()

func (*ReqUser) ProtoReflect

func (x *ReqUser) ProtoReflect() protoreflect.Message

func (*ReqUser) Reset

func (x *ReqUser) Reset()

func (*ReqUser) String

func (x *ReqUser) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use ResUser.ProtoReflect.Descriptor instead.

func (*ResUser) GetId

func (x *ResUser) GetId() int32

func (*ResUser) GetName

func (x *ResUser) GetName() string

func (*ResUser) ProtoMessage

func (*ResUser) ProtoMessage()

func (*ResUser) ProtoReflect

func (x *ResUser) ProtoReflect() protoreflect.Message

func (*ResUser) Reset

func (x *ResUser) Reset()

func (*ResUser) String

func (x *ResUser) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Shop.ProtoReflect.Descriptor instead.

func (*Shop) GetId

func (x *Shop) GetId() int32

func (*Shop) GetName

func (x *Shop) GetName() string

func (*Shop) GetOwnerId

func (x *Shop) GetOwnerId() int32

func (*Shop) ProtoMessage

func (*Shop) ProtoMessage()

func (*Shop) ProtoReflect

func (x *Shop) ProtoReflect() protoreflect.Message

func (*Shop) Reset

func (x *Shop) Reset()

func (*Shop) String

func (x *Shop) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use ShopByID.ProtoReflect.Descriptor instead.

func (*ShopByID) GetShopId

func (x *ShopByID) GetShopId() int32

func (*ShopByID) ProtoMessage

func (*ShopByID) ProtoMessage()

func (*ShopByID) ProtoReflect

func (x *ShopByID) ProtoReflect() protoreflect.Message

func (*ShopByID) Reset

func (x *ShopByID) Reset()

func (*ShopByID) String

func (x *ShopByID) String() string

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.

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

type UnimplementedShopServiceServer

type UnimplementedShopServiceServer struct {
}

UnimplementedShopServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedShopServiceServer) GetShopByOwnerId

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) GetUser

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.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL