1 Star 0 Fork 0

jason-laf/common

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
brand_grpc.pb.go 9.08 KB
一键复制 编辑 原始数据 按行查看 历史
jason-laf 提交于 2025-06-08 19:36 +08:00 . u
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.19.4
// source: proto/goods/brand.proto
package brand
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Brand_GetBrandFilterList_FullMethodName = "/brand.Brand/GetBrandFilterList"
Brand_CreateBrand_FullMethodName = "/brand.Brand/CreateBrand"
Brand_UpdateBrand_FullMethodName = "/brand.Brand/UpdateBrand"
Brand_DeleteBrand_FullMethodName = "/brand.Brand/DeleteBrand"
Brand_Ping_FullMethodName = "/brand.Brand/Ping"
)
// BrandClient is the client API for Brand 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 BrandClient interface {
// 品牌接口
GetBrandFilterList(ctx context.Context, in *GetBrandFilterListRequest, opts ...grpc.CallOption) (*BrandListResponse, error)
CreateBrand(ctx context.Context, in *CreateBrandRequest, opts ...grpc.CallOption) (*BrandInfoResponse, error)
UpdateBrand(ctx context.Context, in *UpdateBrandRequest, opts ...grpc.CallOption) (*Empty, error)
DeleteBrand(ctx context.Context, in *DeleteBrandRequest, opts ...grpc.CallOption) (*Empty, error)
Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
}
type brandClient struct {
cc grpc.ClientConnInterface
}
func NewBrandClient(cc grpc.ClientConnInterface) BrandClient {
return &brandClient{cc}
}
func (c *brandClient) GetBrandFilterList(ctx context.Context, in *GetBrandFilterListRequest, opts ...grpc.CallOption) (*BrandListResponse, error) {
out := new(BrandListResponse)
err := c.cc.Invoke(ctx, Brand_GetBrandFilterList_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *brandClient) CreateBrand(ctx context.Context, in *CreateBrandRequest, opts ...grpc.CallOption) (*BrandInfoResponse, error) {
out := new(BrandInfoResponse)
err := c.cc.Invoke(ctx, Brand_CreateBrand_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *brandClient) UpdateBrand(ctx context.Context, in *UpdateBrandRequest, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := c.cc.Invoke(ctx, Brand_UpdateBrand_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *brandClient) DeleteBrand(ctx context.Context, in *DeleteBrandRequest, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := c.cc.Invoke(ctx, Brand_DeleteBrand_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *brandClient) Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := c.cc.Invoke(ctx, Brand_Ping_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// BrandServer is the server API for Brand service.
// All implementations must embed UnimplementedBrandServer
// for forward compatibility
type BrandServer interface {
// 品牌接口
GetBrandFilterList(context.Context, *GetBrandFilterListRequest) (*BrandListResponse, error)
CreateBrand(context.Context, *CreateBrandRequest) (*BrandInfoResponse, error)
UpdateBrand(context.Context, *UpdateBrandRequest) (*Empty, error)
DeleteBrand(context.Context, *DeleteBrandRequest) (*Empty, error)
Ping(context.Context, *Empty) (*Empty, error)
mustEmbedUnimplementedBrandServer()
}
// UnimplementedBrandServer must be embedded to have forward compatible implementations.
type UnimplementedBrandServer struct {
}
func (UnimplementedBrandServer) GetBrandFilterList(context.Context, *GetBrandFilterListRequest) (*BrandListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBrandFilterList not implemented")
}
func (UnimplementedBrandServer) CreateBrand(context.Context, *CreateBrandRequest) (*BrandInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateBrand not implemented")
}
func (UnimplementedBrandServer) UpdateBrand(context.Context, *UpdateBrandRequest) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateBrand not implemented")
}
func (UnimplementedBrandServer) DeleteBrand(context.Context, *DeleteBrandRequest) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteBrand not implemented")
}
func (UnimplementedBrandServer) Ping(context.Context, *Empty) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
}
func (UnimplementedBrandServer) mustEmbedUnimplementedBrandServer() {}
// UnsafeBrandServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BrandServer will
// result in compilation errors.
type UnsafeBrandServer interface {
mustEmbedUnimplementedBrandServer()
}
func RegisterBrandServer(s grpc.ServiceRegistrar, srv BrandServer) {
s.RegisterService(&Brand_ServiceDesc, srv)
}
func _Brand_GetBrandFilterList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBrandFilterListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BrandServer).GetBrandFilterList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Brand_GetBrandFilterList_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BrandServer).GetBrandFilterList(ctx, req.(*GetBrandFilterListRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Brand_CreateBrand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateBrandRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BrandServer).CreateBrand(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Brand_CreateBrand_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BrandServer).CreateBrand(ctx, req.(*CreateBrandRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Brand_UpdateBrand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateBrandRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BrandServer).UpdateBrand(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Brand_UpdateBrand_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BrandServer).UpdateBrand(ctx, req.(*UpdateBrandRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Brand_DeleteBrand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteBrandRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BrandServer).DeleteBrand(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Brand_DeleteBrand_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BrandServer).DeleteBrand(ctx, req.(*DeleteBrandRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Brand_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BrandServer).Ping(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Brand_Ping_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BrandServer).Ping(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
// Brand_ServiceDesc is the grpc.ServiceDesc for Brand service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Brand_ServiceDesc = grpc.ServiceDesc{
ServiceName: "brand.Brand",
HandlerType: (*BrandServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetBrandFilterList",
Handler: _Brand_GetBrandFilterList_Handler,
},
{
MethodName: "CreateBrand",
Handler: _Brand_CreateBrand_Handler,
},
{
MethodName: "UpdateBrand",
Handler: _Brand_UpdateBrand_Handler,
},
{
MethodName: "DeleteBrand",
Handler: _Brand_DeleteBrand_Handler,
},
{
MethodName: "Ping",
Handler: _Brand_Ping_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/goods/brand.proto",
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/jason-laf/common.git
git@gitee.com:jason-laf/common.git
jason-laf
common
common
86f108f6c1c8

搜索帮助