mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-13 12:10:32 +08:00
使用最新的protoc-gen-go和protoc-gen-go-grpc插件
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.19.4
|
||||
// source: service_http_gzip.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -25,10 +20,6 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 创建Gzip配置
|
||||
type CreateHTTPGzipRequest struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -515,161 +506,3 @@ func file_service_http_gzip_proto_init() {
|
||||
file_service_http_gzip_proto_goTypes = nil
|
||||
file_service_http_gzip_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// HTTPGzipServiceClient is the client API for HTTPGzipService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type HTTPGzipServiceClient interface {
|
||||
// 创建Gzip配置
|
||||
CreateHTTPGzip(ctx context.Context, in *CreateHTTPGzipRequest, opts ...grpc.CallOption) (*CreateHTTPGzipResponse, error)
|
||||
// 查找Gzip配置
|
||||
FindEnabledHTTPGzipConfig(ctx context.Context, in *FindEnabledGzipConfigRequest, opts ...grpc.CallOption) (*FindEnabledGzipConfigResponse, error)
|
||||
// 修改Gzip配置
|
||||
UpdateHTTPGzip(ctx context.Context, in *UpdateHTTPGzipRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
}
|
||||
|
||||
type hTTPGzipServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewHTTPGzipServiceClient(cc grpc.ClientConnInterface) HTTPGzipServiceClient {
|
||||
return &hTTPGzipServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *hTTPGzipServiceClient) CreateHTTPGzip(ctx context.Context, in *CreateHTTPGzipRequest, opts ...grpc.CallOption) (*CreateHTTPGzipResponse, error) {
|
||||
out := new(CreateHTTPGzipResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.HTTPGzipService/createHTTPGzip", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hTTPGzipServiceClient) FindEnabledHTTPGzipConfig(ctx context.Context, in *FindEnabledGzipConfigRequest, opts ...grpc.CallOption) (*FindEnabledGzipConfigResponse, error) {
|
||||
out := new(FindEnabledGzipConfigResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.HTTPGzipService/findEnabledHTTPGzipConfig", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hTTPGzipServiceClient) UpdateHTTPGzip(ctx context.Context, in *UpdateHTTPGzipRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.HTTPGzipService/updateHTTPGzip", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// HTTPGzipServiceServer is the server API for HTTPGzipService service.
|
||||
type HTTPGzipServiceServer interface {
|
||||
// 创建Gzip配置
|
||||
CreateHTTPGzip(context.Context, *CreateHTTPGzipRequest) (*CreateHTTPGzipResponse, error)
|
||||
// 查找Gzip配置
|
||||
FindEnabledHTTPGzipConfig(context.Context, *FindEnabledGzipConfigRequest) (*FindEnabledGzipConfigResponse, error)
|
||||
// 修改Gzip配置
|
||||
UpdateHTTPGzip(context.Context, *UpdateHTTPGzipRequest) (*RPCSuccess, error)
|
||||
}
|
||||
|
||||
// UnimplementedHTTPGzipServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedHTTPGzipServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedHTTPGzipServiceServer) CreateHTTPGzip(context.Context, *CreateHTTPGzipRequest) (*CreateHTTPGzipResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateHTTPGzip not implemented")
|
||||
}
|
||||
func (*UnimplementedHTTPGzipServiceServer) FindEnabledHTTPGzipConfig(context.Context, *FindEnabledGzipConfigRequest) (*FindEnabledGzipConfigResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledHTTPGzipConfig not implemented")
|
||||
}
|
||||
func (*UnimplementedHTTPGzipServiceServer) UpdateHTTPGzip(context.Context, *UpdateHTTPGzipRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPGzip not implemented")
|
||||
}
|
||||
|
||||
func RegisterHTTPGzipServiceServer(s *grpc.Server, srv HTTPGzipServiceServer) {
|
||||
s.RegisterService(&_HTTPGzipService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _HTTPGzipService_CreateHTTPGzip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateHTTPGzipRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HTTPGzipServiceServer).CreateHTTPGzip(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.HTTPGzipService/CreateHTTPGzip",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HTTPGzipServiceServer).CreateHTTPGzip(ctx, req.(*CreateHTTPGzipRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HTTPGzipService_FindEnabledHTTPGzipConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindEnabledGzipConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HTTPGzipServiceServer).FindEnabledHTTPGzipConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.HTTPGzipService/FindEnabledHTTPGzipConfig",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HTTPGzipServiceServer).FindEnabledHTTPGzipConfig(ctx, req.(*FindEnabledGzipConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HTTPGzipService_UpdateHTTPGzip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateHTTPGzipRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HTTPGzipServiceServer).UpdateHTTPGzip(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.HTTPGzipService/UpdateHTTPGzip",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HTTPGzipServiceServer).UpdateHTTPGzip(ctx, req.(*UpdateHTTPGzipRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _HTTPGzipService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.HTTPGzipService",
|
||||
HandlerType: (*HTTPGzipServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "createHTTPGzip",
|
||||
Handler: _HTTPGzipService_CreateHTTPGzip_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findEnabledHTTPGzipConfig",
|
||||
Handler: _HTTPGzipService_FindEnabledHTTPGzipConfig_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "updateHTTPGzip",
|
||||
Handler: _HTTPGzipService_UpdateHTTPGzip_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_http_gzip.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user