382 lines
12 KiB
Go
382 lines
12 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v3.19.6
|
|
// source: service_http_rewrite_rule.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
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)
|
|
)
|
|
|
|
// 创建重写规则
|
|
type CreateHTTPRewriteRuleRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
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"`
|
|
WithQuery bool `protobuf:"varint,8,opt,name=withQuery,proto3" json:"withQuery,omitempty"`
|
|
CondsJSON []byte `protobuf:"bytes,9,opt,name=condsJSON,proto3" json:"condsJSON,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CreateHTTPRewriteRuleRequest) Reset() {
|
|
*x = CreateHTTPRewriteRuleRequest{}
|
|
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 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
|
|
}
|
|
|
|
func (x *CreateHTTPRewriteRuleRequest) GetWithQuery() bool {
|
|
if x != nil {
|
|
return x.WithQuery
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *CreateHTTPRewriteRuleRequest) GetCondsJSON() []byte {
|
|
if x != nil {
|
|
return x.CondsJSON
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type CreateHTTPRewriteRuleResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
RewriteRuleId int64 `protobuf:"varint,1,opt,name=rewriteRuleId,proto3" json:"rewriteRuleId,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CreateHTTPRewriteRuleResponse) Reset() {
|
|
*x = CreateHTTPRewriteRuleResponse{}
|
|
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 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 `protogen:"open.v1"`
|
|
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"`
|
|
WithQuery bool `protobuf:"varint,9,opt,name=withQuery,proto3" json:"withQuery,omitempty"`
|
|
CondsJSON []byte `protobuf:"bytes,10,opt,name=condsJSON,proto3" json:"condsJSON,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UpdateHTTPRewriteRuleRequest) Reset() {
|
|
*x = UpdateHTTPRewriteRuleRequest{}
|
|
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 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
|
|
}
|
|
|
|
func (x *UpdateHTTPRewriteRuleRequest) GetWithQuery() bool {
|
|
if x != nil {
|
|
return x.WithQuery
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *UpdateHTTPRewriteRuleRequest) GetCondsJSON() []byte {
|
|
if x != nil {
|
|
return x.CondsJSON
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_service_http_rewrite_rule_proto protoreflect.FileDescriptor
|
|
|
|
const file_service_http_rewrite_rule_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x1fservice_http_rewrite_rule.proto\x12\x02pb\x1a\x19models/rpc_messages.proto\"\x96\x02\n" +
|
|
"\x1cCreateHTTPRewriteRuleRequest\x12\x18\n" +
|
|
"\apattern\x18\x01 \x01(\tR\apattern\x12\x18\n" +
|
|
"\areplace\x18\x02 \x01(\tR\areplace\x12\x12\n" +
|
|
"\x04mode\x18\x03 \x01(\tR\x04mode\x12&\n" +
|
|
"\x0eredirectStatus\x18\x04 \x01(\x05R\x0eredirectStatus\x12\x18\n" +
|
|
"\aisBreak\x18\x05 \x01(\bR\aisBreak\x12\x1c\n" +
|
|
"\tproxyHost\x18\x06 \x01(\tR\tproxyHost\x12\x12\n" +
|
|
"\x04isOn\x18\a \x01(\bR\x04isOn\x12\x1c\n" +
|
|
"\twithQuery\x18\b \x01(\bR\twithQuery\x12\x1c\n" +
|
|
"\tcondsJSON\x18\t \x01(\fR\tcondsJSON\"E\n" +
|
|
"\x1dCreateHTTPRewriteRuleResponse\x12$\n" +
|
|
"\rrewriteRuleId\x18\x01 \x01(\x03R\rrewriteRuleId\"\xbc\x02\n" +
|
|
"\x1cUpdateHTTPRewriteRuleRequest\x12$\n" +
|
|
"\rrewriteRuleId\x18\x01 \x01(\x03R\rrewriteRuleId\x12\x18\n" +
|
|
"\apattern\x18\x02 \x01(\tR\apattern\x12\x18\n" +
|
|
"\areplace\x18\x03 \x01(\tR\areplace\x12\x12\n" +
|
|
"\x04mode\x18\x04 \x01(\tR\x04mode\x12&\n" +
|
|
"\x0eredirectStatus\x18\x05 \x01(\x05R\x0eredirectStatus\x12\x18\n" +
|
|
"\aisBreak\x18\x06 \x01(\bR\aisBreak\x12\x1c\n" +
|
|
"\tproxyHost\x18\a \x01(\tR\tproxyHost\x12\x12\n" +
|
|
"\x04isOn\x18\b \x01(\bR\x04isOn\x12\x1c\n" +
|
|
"\twithQuery\x18\t \x01(\bR\twithQuery\x12\x1c\n" +
|
|
"\tcondsJSON\x18\n" +
|
|
" \x01(\fR\tcondsJSON2\xc1\x01\n" +
|
|
"\x16HTTPRewriteRuleService\x12\\\n" +
|
|
"\x15createHTTPRewriteRule\x12 .pb.CreateHTTPRewriteRuleRequest\x1a!.pb.CreateHTTPRewriteRuleResponse\x12I\n" +
|
|
"\x15updateHTTPRewriteRule\x12 .pb.UpdateHTTPRewriteRuleRequest\x1a\x0e.pb.RPCSuccessB\x06Z\x04./pbb\x06proto3"
|
|
|
|
var (
|
|
file_service_http_rewrite_rule_proto_rawDescOnce sync.Once
|
|
file_service_http_rewrite_rule_proto_rawDescData []byte
|
|
)
|
|
|
|
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(unsafe.Slice(unsafe.StringData(file_service_http_rewrite_rule_proto_rawDesc), len(file_service_http_rewrite_rule_proto_rawDesc)))
|
|
})
|
|
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 = []any{
|
|
(*CreateHTTPRewriteRuleRequest)(nil), // 0: pb.CreateHTTPRewriteRuleRequest
|
|
(*CreateHTTPRewriteRuleResponse)(nil), // 1: pb.CreateHTTPRewriteRuleResponse
|
|
(*UpdateHTTPRewriteRuleRequest)(nil), // 2: pb.UpdateHTTPRewriteRuleRequest
|
|
(*RPCSuccess)(nil), // 3: pb.RPCSuccess
|
|
}
|
|
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.RPCSuccess
|
|
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_models_rpc_messages_proto_init()
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_http_rewrite_rule_proto_rawDesc), len(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_goTypes = nil
|
|
file_service_http_rewrite_rule_proto_depIdxs = nil
|
|
}
|