阶段性提交

This commit is contained in:
GoEdgeLab
2020-09-16 09:09:31 +08:00
parent aa86446f4f
commit 1648192e73
24 changed files with 2156 additions and 317 deletions

View File

@@ -219,7 +219,7 @@ func (x *FindEnabledHTTPWebResponse) GetWeb() *HTTPWeb {
return nil
}
// 更Web配置
// 更Web配置
type UpdateHTTPWebRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -313,6 +313,100 @@ func (*UpdateHTTPWebResponse) Descriptor() ([]byte, []int) {
return file_service_http_web_proto_rawDescGZIP(), []int{5}
}
// 更改Gzip配置
type UpdateHTTPWebGzipRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
WebId int64 `protobuf:"varint,1,opt,name=webId,proto3" json:"webId,omitempty"`
GzipId int64 `protobuf:"varint,2,opt,name=gzipId,proto3" json:"gzipId,omitempty"`
}
func (x *UpdateHTTPWebGzipRequest) Reset() {
*x = UpdateHTTPWebGzipRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_web_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateHTTPWebGzipRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateHTTPWebGzipRequest) ProtoMessage() {}
func (x *UpdateHTTPWebGzipRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_http_web_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateHTTPWebGzipRequest.ProtoReflect.Descriptor instead.
func (*UpdateHTTPWebGzipRequest) Descriptor() ([]byte, []int) {
return file_service_http_web_proto_rawDescGZIP(), []int{6}
}
func (x *UpdateHTTPWebGzipRequest) GetWebId() int64 {
if x != nil {
return x.WebId
}
return 0
}
func (x *UpdateHTTPWebGzipRequest) GetGzipId() int64 {
if x != nil {
return x.GzipId
}
return 0
}
type UpdateHTTPWebGzipResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *UpdateHTTPWebGzipResponse) Reset() {
*x = UpdateHTTPWebGzipResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_web_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateHTTPWebGzipResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateHTTPWebGzipResponse) ProtoMessage() {}
func (x *UpdateHTTPWebGzipResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_http_web_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateHTTPWebGzipResponse.ProtoReflect.Descriptor instead.
func (*UpdateHTTPWebGzipResponse) Descriptor() ([]byte, []int) {
return file_service_http_web_proto_rawDescGZIP(), []int{7}
}
var File_service_http_web_proto protoreflect.FileDescriptor
var file_service_http_web_proto_rawDesc = []byte{
@@ -337,23 +431,35 @@ var file_service_http_web_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72,
0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22,
0x17, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf1, 0x01, 0x0a, 0x0e, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63,
0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70,
0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e,
0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x7a,
0x69, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x7a, 0x69, 0x70,
0x49, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32,
0xc3, 0x02, 0x0a, 0x0e, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x1d,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e,
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a,
0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18,
0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x47, 0x7a, 0x69, 0x70, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -368,7 +474,7 @@ func file_service_http_web_proto_rawDescGZIP() []byte {
return file_service_http_web_proto_rawDescData
}
var file_service_http_web_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_service_http_web_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_service_http_web_proto_goTypes = []interface{}{
(*CreateHTTPWebRequest)(nil), // 0: pb.CreateHTTPWebRequest
(*CreateHTTPWebResponse)(nil), // 1: pb.CreateHTTPWebResponse
@@ -376,18 +482,22 @@ var file_service_http_web_proto_goTypes = []interface{}{
(*FindEnabledHTTPWebResponse)(nil), // 3: pb.FindEnabledHTTPWebResponse
(*UpdateHTTPWebRequest)(nil), // 4: pb.UpdateHTTPWebRequest
(*UpdateHTTPWebResponse)(nil), // 5: pb.UpdateHTTPWebResponse
(*HTTPWeb)(nil), // 6: pb.HTTPWeb
(*UpdateHTTPWebGzipRequest)(nil), // 6: pb.UpdateHTTPWebGzipRequest
(*UpdateHTTPWebGzipResponse)(nil), // 7: pb.UpdateHTTPWebGzipResponse
(*HTTPWeb)(nil), // 8: pb.HTTPWeb
}
var file_service_http_web_proto_depIdxs = []int32{
6, // 0: pb.FindEnabledHTTPWebResponse.web:type_name -> pb.HTTPWeb
8, // 0: pb.FindEnabledHTTPWebResponse.web:type_name -> pb.HTTPWeb
0, // 1: pb.HTTPWebService.createHTTPWeb:input_type -> pb.CreateHTTPWebRequest
2, // 2: pb.HTTPWebService.findEnabledHTTPWeb:input_type -> pb.FindEnabledHTTPWebRequest
4, // 3: pb.HTTPWebService.updateHTTPWeb:input_type -> pb.UpdateHTTPWebRequest
1, // 4: pb.HTTPWebService.createHTTPWeb:output_type -> pb.CreateHTTPWebResponse
3, // 5: pb.HTTPWebService.findEnabledHTTPWeb:output_type -> pb.FindEnabledHTTPWebResponse
5, // 6: pb.HTTPWebService.updateHTTPWeb:output_type -> pb.UpdateHTTPWebResponse
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
6, // 4: pb.HTTPWebService.updateHTTPWebGzip:input_type -> pb.UpdateHTTPWebGzipRequest
1, // 5: pb.HTTPWebService.createHTTPWeb:output_type -> pb.CreateHTTPWebResponse
3, // 6: pb.HTTPWebService.findEnabledHTTPWeb:output_type -> pb.FindEnabledHTTPWebResponse
5, // 7: pb.HTTPWebService.updateHTTPWeb:output_type -> pb.UpdateHTTPWebResponse
7, // 8: pb.HTTPWebService.updateHTTPWebGzip:output_type -> pb.UpdateHTTPWebGzipResponse
5, // [5:9] is the sub-list for method output_type
1, // [1:5] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
@@ -472,6 +582,30 @@ func file_service_http_web_proto_init() {
return nil
}
}
file_service_http_web_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateHTTPWebGzipRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_http_web_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateHTTPWebGzipResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -479,7 +613,7 @@ func file_service_http_web_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_http_web_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
@@ -509,8 +643,10 @@ type HTTPWebServiceClient interface {
CreateHTTPWeb(ctx context.Context, in *CreateHTTPWebRequest, opts ...grpc.CallOption) (*CreateHTTPWebResponse, error)
// 查找Web配置
FindEnabledHTTPWeb(ctx context.Context, in *FindEnabledHTTPWebRequest, opts ...grpc.CallOption) (*FindEnabledHTTPWebResponse, error)
// 更Web配置
// 更Web配置
UpdateHTTPWeb(ctx context.Context, in *UpdateHTTPWebRequest, opts ...grpc.CallOption) (*UpdateHTTPWebResponse, error)
// 更改Gzip配置
UpdateHTTPWebGzip(ctx context.Context, in *UpdateHTTPWebGzipRequest, opts ...grpc.CallOption) (*UpdateHTTPWebGzipResponse, error)
}
type hTTPWebServiceClient struct {
@@ -548,14 +684,25 @@ func (c *hTTPWebServiceClient) UpdateHTTPWeb(ctx context.Context, in *UpdateHTTP
return out, nil
}
func (c *hTTPWebServiceClient) UpdateHTTPWebGzip(ctx context.Context, in *UpdateHTTPWebGzipRequest, opts ...grpc.CallOption) (*UpdateHTTPWebGzipResponse, error) {
out := new(UpdateHTTPWebGzipResponse)
err := c.cc.Invoke(ctx, "/pb.HTTPWebService/updateHTTPWebGzip", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HTTPWebServiceServer is the server API for HTTPWebService service.
type HTTPWebServiceServer interface {
// 创建Web配置
CreateHTTPWeb(context.Context, *CreateHTTPWebRequest) (*CreateHTTPWebResponse, error)
// 查找Web配置
FindEnabledHTTPWeb(context.Context, *FindEnabledHTTPWebRequest) (*FindEnabledHTTPWebResponse, error)
// 更Web配置
// 更Web配置
UpdateHTTPWeb(context.Context, *UpdateHTTPWebRequest) (*UpdateHTTPWebResponse, error)
// 更改Gzip配置
UpdateHTTPWebGzip(context.Context, *UpdateHTTPWebGzipRequest) (*UpdateHTTPWebGzipResponse, error)
}
// UnimplementedHTTPWebServiceServer can be embedded to have forward compatible implementations.
@@ -571,6 +718,9 @@ func (*UnimplementedHTTPWebServiceServer) FindEnabledHTTPWeb(context.Context, *F
func (*UnimplementedHTTPWebServiceServer) UpdateHTTPWeb(context.Context, *UpdateHTTPWebRequest) (*UpdateHTTPWebResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPWeb not implemented")
}
func (*UnimplementedHTTPWebServiceServer) UpdateHTTPWebGzip(context.Context, *UpdateHTTPWebGzipRequest) (*UpdateHTTPWebGzipResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPWebGzip not implemented")
}
func RegisterHTTPWebServiceServer(s *grpc.Server, srv HTTPWebServiceServer) {
s.RegisterService(&_HTTPWebService_serviceDesc, srv)
@@ -630,6 +780,24 @@ func _HTTPWebService_UpdateHTTPWeb_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
func _HTTPWebService_UpdateHTTPWebGzip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateHTTPWebGzipRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPWebServiceServer).UpdateHTTPWebGzip(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPWebService/UpdateHTTPWebGzip",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPWebServiceServer).UpdateHTTPWebGzip(ctx, req.(*UpdateHTTPWebGzipRequest))
}
return interceptor(ctx, in, info, handler)
}
var _HTTPWebService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.HTTPWebService",
HandlerType: (*HTTPWebServiceServer)(nil),
@@ -646,6 +814,10 @@ var _HTTPWebService_serviceDesc = grpc.ServiceDesc{
MethodName: "updateHTTPWeb",
Handler: _HTTPWebService_UpdateHTTPWeb_Handler,
},
{
MethodName: "updateHTTPWebGzip",
Handler: _HTTPWebService_UpdateHTTPWebGzip_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_http_web.proto",