Files
EdgeCommon/pkg/rpc/pb/service_http_rewrite_rule.pb.go

570 lines
22 KiB
Go
Raw Normal View History

2020-09-28 16:25:49 +08:00
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.12.3
// source: service_http_rewrite_rule.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"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = 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
// 创建重写规则
type CreateHTTPRewriteRuleRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"`
Replace string `protobuf:"bytes,2,opt,name=replace,proto3" json:"replace,omitempty"`
Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"`
RedirectStatus int32 `protobuf:"varint,4,opt,name=redirectStatus,proto3" json:"redirectStatus,omitempty"`
IsBreak bool `protobuf:"varint,5,opt,name=isBreak,proto3" json:"isBreak,omitempty"`
ProxyHost string `protobuf:"bytes,6,opt,name=proxyHost,proto3" json:"proxyHost,omitempty"`
IsOn bool `protobuf:"varint,7,opt,name=isOn,proto3" json:"isOn,omitempty"`
2020-09-28 18:22:37 +08:00
WithQuery bool `protobuf:"varint,8,opt,name=withQuery,proto3" json:"withQuery,omitempty"`
2020-09-28 16:25:49 +08:00
}
func (x *CreateHTTPRewriteRuleRequest) Reset() {
*x = CreateHTTPRewriteRuleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_rewrite_rule_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateHTTPRewriteRuleRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateHTTPRewriteRuleRequest) ProtoMessage() {}
func (x *CreateHTTPRewriteRuleRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_http_rewrite_rule_proto_msgTypes[0]
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 CreateHTTPRewriteRuleRequest.ProtoReflect.Descriptor instead.
func (*CreateHTTPRewriteRuleRequest) Descriptor() ([]byte, []int) {
return file_service_http_rewrite_rule_proto_rawDescGZIP(), []int{0}
}
func (x *CreateHTTPRewriteRuleRequest) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *CreateHTTPRewriteRuleRequest) GetReplace() string {
if x != nil {
return x.Replace
}
return ""
}
func (x *CreateHTTPRewriteRuleRequest) GetMode() string {
if x != nil {
return x.Mode
}
return ""
}
func (x *CreateHTTPRewriteRuleRequest) GetRedirectStatus() int32 {
if x != nil {
return x.RedirectStatus
}
return 0
}
func (x *CreateHTTPRewriteRuleRequest) GetIsBreak() bool {
if x != nil {
return x.IsBreak
}
return false
}
func (x *CreateHTTPRewriteRuleRequest) GetProxyHost() string {
if x != nil {
return x.ProxyHost
}
return ""
}
func (x *CreateHTTPRewriteRuleRequest) GetIsOn() bool {
if x != nil {
return x.IsOn
}
return false
}
2020-09-28 18:22:37 +08:00
func (x *CreateHTTPRewriteRuleRequest) GetWithQuery() bool {
if x != nil {
return x.WithQuery
}
return false
}
2020-09-28 16:25:49 +08:00
type CreateHTTPRewriteRuleResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RewriteRuleId int64 `protobuf:"varint,1,opt,name=rewriteRuleId,proto3" json:"rewriteRuleId,omitempty"`
}
func (x *CreateHTTPRewriteRuleResponse) Reset() {
*x = CreateHTTPRewriteRuleResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_rewrite_rule_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateHTTPRewriteRuleResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateHTTPRewriteRuleResponse) ProtoMessage() {}
func (x *CreateHTTPRewriteRuleResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_http_rewrite_rule_proto_msgTypes[1]
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 CreateHTTPRewriteRuleResponse.ProtoReflect.Descriptor instead.
func (*CreateHTTPRewriteRuleResponse) Descriptor() ([]byte, []int) {
return file_service_http_rewrite_rule_proto_rawDescGZIP(), []int{1}
}
func (x *CreateHTTPRewriteRuleResponse) GetRewriteRuleId() int64 {
if x != nil {
return x.RewriteRuleId
}
return 0
}
// 修改重写规则
type UpdateHTTPRewriteRuleRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RewriteRuleId int64 `protobuf:"varint,1,opt,name=rewriteRuleId,proto3" json:"rewriteRuleId,omitempty"`
Pattern string `protobuf:"bytes,2,opt,name=pattern,proto3" json:"pattern,omitempty"`
Replace string `protobuf:"bytes,3,opt,name=replace,proto3" json:"replace,omitempty"`
Mode string `protobuf:"bytes,4,opt,name=mode,proto3" json:"mode,omitempty"`
RedirectStatus int32 `protobuf:"varint,5,opt,name=redirectStatus,proto3" json:"redirectStatus,omitempty"`
IsBreak bool `protobuf:"varint,6,opt,name=isBreak,proto3" json:"isBreak,omitempty"`
ProxyHost string `protobuf:"bytes,7,opt,name=proxyHost,proto3" json:"proxyHost,omitempty"`
IsOn bool `protobuf:"varint,8,opt,name=isOn,proto3" json:"isOn,omitempty"`
2020-09-28 18:22:37 +08:00
WithQuery bool `protobuf:"varint,9,opt,name=withQuery,proto3" json:"withQuery,omitempty"`
2020-09-28 16:25:49 +08:00
}
func (x *UpdateHTTPRewriteRuleRequest) Reset() {
*x = UpdateHTTPRewriteRuleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_rewrite_rule_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateHTTPRewriteRuleRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateHTTPRewriteRuleRequest) ProtoMessage() {}
func (x *UpdateHTTPRewriteRuleRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_http_rewrite_rule_proto_msgTypes[2]
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 UpdateHTTPRewriteRuleRequest.ProtoReflect.Descriptor instead.
func (*UpdateHTTPRewriteRuleRequest) Descriptor() ([]byte, []int) {
return file_service_http_rewrite_rule_proto_rawDescGZIP(), []int{2}
}
func (x *UpdateHTTPRewriteRuleRequest) GetRewriteRuleId() int64 {
if x != nil {
return x.RewriteRuleId
}
return 0
}
func (x *UpdateHTTPRewriteRuleRequest) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *UpdateHTTPRewriteRuleRequest) GetReplace() string {
if x != nil {
return x.Replace
}
return ""
}
func (x *UpdateHTTPRewriteRuleRequest) GetMode() string {
if x != nil {
return x.Mode
}
return ""
}
func (x *UpdateHTTPRewriteRuleRequest) GetRedirectStatus() int32 {
if x != nil {
return x.RedirectStatus
}
return 0
}
func (x *UpdateHTTPRewriteRuleRequest) GetIsBreak() bool {
if x != nil {
return x.IsBreak
}
return false
}
func (x *UpdateHTTPRewriteRuleRequest) GetProxyHost() string {
if x != nil {
return x.ProxyHost
}
return ""
}
func (x *UpdateHTTPRewriteRuleRequest) GetIsOn() bool {
if x != nil {
return x.IsOn
}
return false
}
2020-09-28 18:22:37 +08:00
func (x *UpdateHTTPRewriteRuleRequest) GetWithQuery() bool {
if x != nil {
return x.WithQuery
}
return false
}
2020-09-28 16:25:49 +08:00
var File_service_http_rewrite_rule_proto protoreflect.FileDescriptor
var file_service_http_rewrite_rule_proto_rawDesc = []byte{
0x0a, 0x1f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72,
0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x12, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
2020-09-28 18:22:37 +08:00
0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x01, 0x0a, 0x1c, 0x43, 0x72,
2020-09-28 16:25:49 +08:00
0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61,
0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74,
0x74, 0x65, 0x72, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f,
0x64, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x65, 0x64, 0x69,
0x72, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73,
0x42, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x42,
0x72, 0x65, 0x61, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x48, 0x6f, 0x73,
0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x48, 0x6f,
0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08,
2020-09-28 18:22:37 +08:00
0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x51, 0x75,
0x65, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x51,
0x75, 0x65, 0x72, 0x79, 0x22, 0x45, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65,
0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65,
0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x9e, 0x02, 0x0a, 0x1c,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74,
0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d,
0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x18, 0x0a, 0x07,
0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72,
0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65,
0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0e, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74,
0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x06, 0x20,
0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x1c, 0x0a, 0x09,
0x70, 0x72, 0x6f, 0x78, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73,
0x4f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c,
0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28,
0x08, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0xc7, 0x01, 0x0a,
0x16, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50,
0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x20,
0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65,
0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
2020-09-28 16:25:49 +08:00
}
var (
file_service_http_rewrite_rule_proto_rawDescOnce sync.Once
file_service_http_rewrite_rule_proto_rawDescData = file_service_http_rewrite_rule_proto_rawDesc
)
func file_service_http_rewrite_rule_proto_rawDescGZIP() []byte {
file_service_http_rewrite_rule_proto_rawDescOnce.Do(func() {
file_service_http_rewrite_rule_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_http_rewrite_rule_proto_rawDescData)
})
return file_service_http_rewrite_rule_proto_rawDescData
}
var file_service_http_rewrite_rule_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_service_http_rewrite_rule_proto_goTypes = []interface{}{
(*CreateHTTPRewriteRuleRequest)(nil), // 0: pb.CreateHTTPRewriteRuleRequest
(*CreateHTTPRewriteRuleResponse)(nil), // 1: pb.CreateHTTPRewriteRuleResponse
(*UpdateHTTPRewriteRuleRequest)(nil), // 2: pb.UpdateHTTPRewriteRuleRequest
(*RPCUpdateSuccess)(nil), // 3: pb.RPCUpdateSuccess
}
var file_service_http_rewrite_rule_proto_depIdxs = []int32{
0, // 0: pb.HTTPRewriteRuleService.createHTTPRewriteRule:input_type -> pb.CreateHTTPRewriteRuleRequest
2, // 1: pb.HTTPRewriteRuleService.updateHTTPRewriteRule:input_type -> pb.UpdateHTTPRewriteRuleRequest
1, // 2: pb.HTTPRewriteRuleService.createHTTPRewriteRule:output_type -> pb.CreateHTTPRewriteRuleResponse
3, // 3: pb.HTTPRewriteRuleService.updateHTTPRewriteRule:output_type -> pb.RPCUpdateSuccess
2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_service_http_rewrite_rule_proto_init() }
func file_service_http_rewrite_rule_proto_init() {
if File_service_http_rewrite_rule_proto != nil {
return
}
file_rpc_messages_proto_init()
if !protoimpl.UnsafeEnabled {
file_service_http_rewrite_rule_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateHTTPRewriteRuleRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_http_rewrite_rule_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateHTTPRewriteRuleResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_http_rewrite_rule_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateHTTPRewriteRuleRequest); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_http_rewrite_rule_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_service_http_rewrite_rule_proto_goTypes,
DependencyIndexes: file_service_http_rewrite_rule_proto_depIdxs,
MessageInfos: file_service_http_rewrite_rule_proto_msgTypes,
}.Build()
File_service_http_rewrite_rule_proto = out.File
file_service_http_rewrite_rule_proto_rawDesc = nil
file_service_http_rewrite_rule_proto_goTypes = nil
file_service_http_rewrite_rule_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
// HTTPRewriteRuleServiceClient is the client API for HTTPRewriteRuleService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type HTTPRewriteRuleServiceClient interface {
// 创建重写规则
CreateHTTPRewriteRule(ctx context.Context, in *CreateHTTPRewriteRuleRequest, opts ...grpc.CallOption) (*CreateHTTPRewriteRuleResponse, error)
// 修改重写规则
UpdateHTTPRewriteRule(ctx context.Context, in *UpdateHTTPRewriteRuleRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error)
}
type hTTPRewriteRuleServiceClient struct {
cc grpc.ClientConnInterface
}
func NewHTTPRewriteRuleServiceClient(cc grpc.ClientConnInterface) HTTPRewriteRuleServiceClient {
return &hTTPRewriteRuleServiceClient{cc}
}
func (c *hTTPRewriteRuleServiceClient) CreateHTTPRewriteRule(ctx context.Context, in *CreateHTTPRewriteRuleRequest, opts ...grpc.CallOption) (*CreateHTTPRewriteRuleResponse, error) {
out := new(CreateHTTPRewriteRuleResponse)
err := c.cc.Invoke(ctx, "/pb.HTTPRewriteRuleService/createHTTPRewriteRule", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPRewriteRuleServiceClient) UpdateHTTPRewriteRule(ctx context.Context, in *UpdateHTTPRewriteRuleRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) {
out := new(RPCUpdateSuccess)
err := c.cc.Invoke(ctx, "/pb.HTTPRewriteRuleService/updateHTTPRewriteRule", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HTTPRewriteRuleServiceServer is the server API for HTTPRewriteRuleService service.
type HTTPRewriteRuleServiceServer interface {
// 创建重写规则
CreateHTTPRewriteRule(context.Context, *CreateHTTPRewriteRuleRequest) (*CreateHTTPRewriteRuleResponse, error)
// 修改重写规则
UpdateHTTPRewriteRule(context.Context, *UpdateHTTPRewriteRuleRequest) (*RPCUpdateSuccess, error)
}
// UnimplementedHTTPRewriteRuleServiceServer can be embedded to have forward compatible implementations.
type UnimplementedHTTPRewriteRuleServiceServer struct {
}
func (*UnimplementedHTTPRewriteRuleServiceServer) CreateHTTPRewriteRule(context.Context, *CreateHTTPRewriteRuleRequest) (*CreateHTTPRewriteRuleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateHTTPRewriteRule not implemented")
}
func (*UnimplementedHTTPRewriteRuleServiceServer) UpdateHTTPRewriteRule(context.Context, *UpdateHTTPRewriteRuleRequest) (*RPCUpdateSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPRewriteRule not implemented")
}
func RegisterHTTPRewriteRuleServiceServer(s *grpc.Server, srv HTTPRewriteRuleServiceServer) {
s.RegisterService(&_HTTPRewriteRuleService_serviceDesc, srv)
}
func _HTTPRewriteRuleService_CreateHTTPRewriteRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateHTTPRewriteRuleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPRewriteRuleServiceServer).CreateHTTPRewriteRule(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPRewriteRuleService/CreateHTTPRewriteRule",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPRewriteRuleServiceServer).CreateHTTPRewriteRule(ctx, req.(*CreateHTTPRewriteRuleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPRewriteRuleService_UpdateHTTPRewriteRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateHTTPRewriteRuleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPRewriteRuleServiceServer).UpdateHTTPRewriteRule(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPRewriteRuleService/UpdateHTTPRewriteRule",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPRewriteRuleServiceServer).UpdateHTTPRewriteRule(ctx, req.(*UpdateHTTPRewriteRuleRequest))
}
return interceptor(ctx, in, info, handler)
}
var _HTTPRewriteRuleService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.HTTPRewriteRuleService",
HandlerType: (*HTTPRewriteRuleServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "createHTTPRewriteRule",
Handler: _HTTPRewriteRuleService_CreateHTTPRewriteRule_Handler,
},
{
MethodName: "updateHTTPRewriteRule",
Handler: _HTTPRewriteRuleService_UpdateHTTPRewriteRule_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_http_rewrite_rule.proto",
}