diff --git a/dto_proto/http_dto.proto b/dto_proto/http_dto.proto index ff21765..6498e7f 100644 --- a/dto_proto/http_dto.proto +++ b/dto_proto/http_dto.proto @@ -46,13 +46,6 @@ message ListBotResp{ repeated Bot bot_list = 1; } -//// 机器人登陆 /bot/login/v1/ -//message BotLoginAsyncReq{ -// int64 bot_id = 1; -//} -//message BotLoginAsyncResp{ -//} - // 处理验证码 /captcha/solve/v1/ message SolveCaptchaReq{ int64 bot_id = 1; @@ -88,12 +81,50 @@ message QRCodeLoginResp{ } +message Plugin{ + string name = 1; + bool disabled = 2; + bool json = 3; + repeated string urls = 4; + repeated int32 event_filter = 5; + repeated int32 api_filter = 6; + string regex_filter = 7; + string regex_replace = 8; + repeated Header extra_header = 9; + message Header{ + string key = 1; + repeated string value = 2; + } +} + +message ListPluginReq{ +} +message ListPluginResp{ + repeated Plugin plugins = 1; +} + +message SavePluginReq{ + Plugin plugin = 1; +} +message SavePluginResp{ +} + +message DeletePluginReq{ + string name = 1; +} +message DeletePluginResp{ +} + + service HttpService{ rpc CreateBot(CreateBotReq)returns (CreateBotResp); rpc DeleteBot(DeleteBotReq)returns (DeleteBotResp); rpc ListBot(ListBotReq)returns (ListBotResp); - // rpc BotLoginAsync(BotLoginAsyncReq)returns (BotLoginAsyncResp); rpc SolveCaptcha(SolveCaptchaReq)returns (SolveCaptchaResp); rpc FetchQRCode(FetchQRCodeReq)returns (QRCodeLoginResp); rpc QueryQRCodeStatus(QueryQRCodeStatusReq)returns (QRCodeLoginResp); + + rpc ListPlugin(ListPluginReq)returns (ListPluginResp); + rpc SavePlugin(SavePluginReq)returns (SavePluginResp); + rpc DeletePlugin(DeletePluginReq)returns (DeletePluginResp); } diff --git a/pkg/config/config.go b/pkg/config/config.go index a15d0f8..850da78 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1,5 +1,17 @@ package config +import ( + "bytes" + "encoding/json" + "fmt" + "github.com/ProtobufBot/Go-Mirai-Client/pkg/util" + log "github.com/sirupsen/logrus" + "io/ioutil" + "os" + "path" + "strings" +) + //go:generate go run github.com/a8m/syncmap -o "gen_plugin_map.go" -pkg config -name PluginMap "map[string]*Plugin" var ( Fragment = false // 是否分片 @@ -45,3 +57,83 @@ type Plugin struct { ExtraHeader map[string][]string `json:"extra_header"` // 自定义请求头 // TODO event filter, msg filter, regex filter, prefix filter, suffix filter } + +const pluginPath = "plugins" + +func LoadPlugins() { + if !util.PathExists(pluginPath) { + return + } + files, err := ioutil.ReadDir(pluginPath) + if err != nil { + log.Warnf("failed to read plugin dir: %s", err) + return + } + + if len(files) == 0 { + log.Warnf("plugin dir is empty") + return + } + + ClearPlugins(Plugins) + for _, file := range files { + if !strings.HasSuffix(file.Name(), ".json") { + continue + } + pluginName := strings.TrimSuffix(file.Name(), ".json") + filepath := path.Join(pluginPath, file.Name()) + b, err := os.ReadFile(filepath) + if err != nil { + log.Warnf("failed to read plugin file: %s %s", filepath, err) + continue + } + plugin := &Plugin{} + if err := json.NewDecoder(bytes.NewReader(b)).Decode(plugin); err != nil { + log.Warnf("failed to decode plugin file: %s %s", filepath, err) + continue + } + plugin.Name = pluginName + Plugins.Store(plugin.Name, plugin) + } +} + +func WritePlugins() { + if !util.PathExists(pluginPath) { + if err := os.MkdirAll(pluginPath, 0777); err != nil { + log.Warnf("failed to mkdir") + return + } + } + DeletePluginFiles() + Plugins.Range(func(key string, plugin *Plugin) bool { + pluginFilename := fmt.Sprintf("%s.json", plugin.Name) + filepath := path.Join(pluginPath, pluginFilename) + b, err := json.MarshalIndent(plugin, "", " ") + if err != nil { + log.Warnf("failed to marshal plugin, %s", plugin.Name) + return true + } + if err := os.WriteFile(filepath, b, 0777); err != nil { + log.Warnf("failed to write file, %s", pluginFilename) + return true + } + return true + }) +} + +func DeletePluginFiles() { + files, err := ioutil.ReadDir(pluginPath) + if err != nil { + log.Warnf("failed to read plugin dir: %s", err) + } + for _, file := range files { + if !strings.HasSuffix(file.Name(), ".json") { + continue + } + filepath := path.Join(pluginPath, file.Name()) + if err := os.Remove(filepath); err != nil { + log.Warnf("failed to remove plugin file: %s", filepath) + continue + } + } +} diff --git a/pkg/gmc/gmc.go b/pkg/gmc/gmc.go index a2e8688..c85bd23 100644 --- a/pkg/gmc/gmc.go +++ b/pkg/gmc/gmc.go @@ -1,11 +1,8 @@ package gmc import ( - "bytes" - "encoding/json" "flag" "fmt" - "io/ioutil" "net" "net/http" "os" @@ -92,10 +89,9 @@ func Start() { os.Exit(0) } - pluginPath := "plugins" - LoadPlugins(pluginPath) // 如果文件存在,从文件读取gmc config - LoadParamConfig() // 如果参数存在,从参数读取gmc config,并覆盖 - WritePlugins(pluginPath) // 内存中的gmc config写到文件 + config.LoadPlugins() // 如果文件存在,从文件读取gmc config + LoadParamConfig() // 如果参数存在,从参数读取gmc config,并覆盖 + config.WritePlugins() // 内存中的gmc config写到文件 config.Plugins.Range(func(key string, value *config.Plugin) bool { log.Infof("Plugin(%s): %s", value.Name, util.MustMarshal(value)) return true @@ -105,66 +101,6 @@ func Start() { InitGin() // 初始化GIN HTTP管理 } -func LoadPlugins(pluginPath string) { - if !util.PathExists(pluginPath) { - return - } - files, err := ioutil.ReadDir(pluginPath) - if err != nil { - log.Warnf("failed to read plugin dir: %s", err) - return - } - - if len(files) == 0 { - log.Warnf("plugin dir is empty") - return - } - - config.ClearPlugins(config.Plugins) - for _, file := range files { - if !strings.HasSuffix(file.Name(), ".json") { - continue - } - pluginName := strings.TrimSuffix(file.Name(), ".json") - filepath := path.Join(pluginPath, file.Name()) - b, err := os.ReadFile(filepath) - if err != nil { - log.Warnf("failed to read plugin file: %s %s", filepath, err) - continue - } - plugin := &config.Plugin{} - if err := json.NewDecoder(bytes.NewReader(b)).Decode(plugin); err != nil { - log.Warnf("failed to decode plugin file: %s %s", filepath, err) - continue - } - plugin.Name = pluginName - config.Plugins.Store(plugin.Name, plugin) - } -} - -func WritePlugins(pluginPath string) { - if !util.PathExists(pluginPath) { - if err := os.MkdirAll(pluginPath, 0777); err != nil { - log.Warnf("failed to mkdir") - return - } - } - config.Plugins.Range(func(key string, plugin *config.Plugin) bool { - pluginFilename := fmt.Sprintf("%s.json", plugin.Name) - filepath := path.Join(pluginPath, pluginFilename) - b, err := json.MarshalIndent(plugin, "", " ") - if err != nil { - log.Warnf("failed to marshal plugin, %s", plugin.Name) - return true - } - if err := os.WriteFile(filepath, b, 0777); err != nil { - log.Warnf("failed to write file, %s", pluginFilename) - return true - } - return true - }) -} - func LoadParamConfig() { // sms是true,如果本来是true,不变。如果本来是false,变true if sms { @@ -223,6 +159,9 @@ func InitGin() { router.POST("/captcha/solve/v1", handler.SolveCaptcha) router.POST("/qrcode/fetch/v1", handler.FetchQrCode) router.POST("/qrcode/query/v1", handler.QueryQRCodeStatus) + router.POST("/plugin/list/v1", handler.ListPlugin) + router.POST("/plugin/save/v1", handler.SavePlugin) + router.POST("/plugin/delete/v1", handler.DeletePlugin) realPort, err := RunGin(router, ":"+config.Port) if err != nil { util.FatalError(fmt.Errorf("failed to run gin, err: %+v", err)) diff --git a/pkg/gmc/handler/bot.go b/pkg/gmc/handler/bot.go index 122d8a6..02b710b 100644 --- a/pkg/gmc/handler/bot.go +++ b/pkg/gmc/handler/bot.go @@ -9,6 +9,7 @@ import ( "time" "github.com/ProtobufBot/Go-Mirai-Client/pkg/bot" + "github.com/ProtobufBot/Go-Mirai-Client/pkg/config" "github.com/ProtobufBot/Go-Mirai-Client/pkg/device" "github.com/ProtobufBot/Go-Mirai-Client/pkg/gmc/plugins" "github.com/ProtobufBot/Go-Mirai-Client/pkg/plugin" @@ -229,6 +230,98 @@ func QueryQRCodeStatus(c *gin.Context) { Return(c, resp) } +func ListPlugin(c *gin.Context) { + req := &dto.ListPluginReq{} + err := c.Bind(req) + if err != nil { + c.String(http.StatusBadRequest, "bad request") + return + } + var resp = &dto.ListPluginResp{ + Plugins: []*dto.Plugin{}, + } + config.Plugins.Range(func(key string, p *config.Plugin) bool { + resp.Plugins = append(resp.Plugins, &dto.Plugin{ + Name: p.Name, + Disabled: p.Disabled, + Json: p.Json, + Urls: p.Urls, + EventFilter: p.EventFilter, + ApiFilter: p.ApiFilter, + RegexFilter: p.RegexFilter, + RegexReplace: p.RegexReplace, + ExtraHeader: func() []*dto.Plugin_Header { + headers := make([]*dto.Plugin_Header, 0) + for k, v := range p.ExtraHeader { + headers = append(headers, &dto.Plugin_Header{ + Key: k, + Value: v, + }) + } + return headers + }(), + }) + return true + }) + Return(c, resp) +} + +func SavePlugin(c *gin.Context) { + req := &dto.SavePluginReq{} + err := c.Bind(req) + if err != nil { + c.String(http.StatusBadRequest, "bad request") + return + } + if req.Plugin == nil { + c.String(http.StatusBadRequest, "plugin is nil") + return + } + p := req.Plugin + if p.ApiFilter == nil { + p.ApiFilter = []int32{} + } + if p.EventFilter == nil { + p.EventFilter = []int32{} + } + if p.Urls == nil { + p.Urls = []string{} + } + config.Plugins.Store(p.Name, &config.Plugin{ + Name: p.Name, + Disabled: p.Disabled, + Json: p.Json, + Urls: p.Urls, + EventFilter: p.EventFilter, + ApiFilter: p.ApiFilter, + RegexFilter: p.RegexFilter, + RegexReplace: p.RegexReplace, + ExtraHeader: func() map[string][]string { + headers := map[string][]string{} + for _, h := range p.ExtraHeader { + headers[h.Key] = h.Value + } + return headers + }(), + }) + config.WritePlugins() + resp := &dto.SavePluginResp{} + Return(c, resp) +} + +func DeletePlugin(c *gin.Context) { + req := &dto.DeletePluginReq{} + err := c.Bind(req) + if err != nil { + c.String(http.StatusBadRequest, "bad request") + return + } + config.Plugins.Delete(req.Name) + config.WritePlugins() + resp := &dto.DeletePluginResp{} + Return(c, resp) +} + func Return(c *gin.Context, resp proto.Message) { var ( data []byte diff --git a/proto_gen/dto/http_dto.pb.go b/proto_gen/dto/http_dto.pb.go index be66e9a..b6935b5 100644 --- a/proto_gen/dto/http_dto.pb.go +++ b/proto_gen/dto/http_dto.pb.go @@ -816,6 +816,430 @@ func (m *QRCodeLoginResp) GetSig() []byte { return nil } +type Plugin struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Disabled bool `protobuf:"varint,2,opt,name=disabled,proto3" json:"disabled,omitempty"` + Json bool `protobuf:"varint,3,opt,name=json,proto3" json:"json,omitempty"` + Urls []string `protobuf:"bytes,4,rep,name=urls,proto3" json:"urls,omitempty"` + EventFilter []int32 `protobuf:"varint,5,rep,packed,name=event_filter,json=eventFilter,proto3" json:"event_filter,omitempty"` + ApiFilter []int32 `protobuf:"varint,6,rep,packed,name=api_filter,json=apiFilter,proto3" json:"api_filter,omitempty"` + RegexFilter string `protobuf:"bytes,7,opt,name=regex_filter,json=regexFilter,proto3" json:"regex_filter,omitempty"` + RegexReplace string `protobuf:"bytes,8,opt,name=regex_replace,json=regexReplace,proto3" json:"regex_replace,omitempty"` + ExtraHeader []*Plugin_Header `protobuf:"bytes,9,rep,name=extra_header,json=extraHeader,proto3" json:"extra_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Plugin) Reset() { *m = Plugin{} } +func (m *Plugin) String() string { return proto.CompactTextString(m) } +func (*Plugin) ProtoMessage() {} +func (*Plugin) Descriptor() ([]byte, []int) { + return fileDescriptor_3b5f7d4a2149a8d0, []int{12} +} +func (m *Plugin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Plugin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Plugin.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Plugin) XXX_Merge(src proto.Message) { + xxx_messageInfo_Plugin.Merge(m, src) +} +func (m *Plugin) XXX_Size() int { + return m.Size() +} +func (m *Plugin) XXX_DiscardUnknown() { + xxx_messageInfo_Plugin.DiscardUnknown(m) +} + +var xxx_messageInfo_Plugin proto.InternalMessageInfo + +func (m *Plugin) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Plugin) GetDisabled() bool { + if m != nil { + return m.Disabled + } + return false +} + +func (m *Plugin) GetJson() bool { + if m != nil { + return m.Json + } + return false +} + +func (m *Plugin) GetUrls() []string { + if m != nil { + return m.Urls + } + return nil +} + +func (m *Plugin) GetEventFilter() []int32 { + if m != nil { + return m.EventFilter + } + return nil +} + +func (m *Plugin) GetApiFilter() []int32 { + if m != nil { + return m.ApiFilter + } + return nil +} + +func (m *Plugin) GetRegexFilter() string { + if m != nil { + return m.RegexFilter + } + return "" +} + +func (m *Plugin) GetRegexReplace() string { + if m != nil { + return m.RegexReplace + } + return "" +} + +func (m *Plugin) GetExtraHeader() []*Plugin_Header { + if m != nil { + return m.ExtraHeader + } + return nil +} + +type Plugin_Header struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Plugin_Header) Reset() { *m = Plugin_Header{} } +func (m *Plugin_Header) String() string { return proto.CompactTextString(m) } +func (*Plugin_Header) ProtoMessage() {} +func (*Plugin_Header) Descriptor() ([]byte, []int) { + return fileDescriptor_3b5f7d4a2149a8d0, []int{12, 0} +} +func (m *Plugin_Header) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Plugin_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Plugin_Header.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Plugin_Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_Plugin_Header.Merge(m, src) +} +func (m *Plugin_Header) XXX_Size() int { + return m.Size() +} +func (m *Plugin_Header) XXX_DiscardUnknown() { + xxx_messageInfo_Plugin_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_Plugin_Header proto.InternalMessageInfo + +func (m *Plugin_Header) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Plugin_Header) GetValue() []string { + if m != nil { + return m.Value + } + return nil +} + +type ListPluginReq struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListPluginReq) Reset() { *m = ListPluginReq{} } +func (m *ListPluginReq) String() string { return proto.CompactTextString(m) } +func (*ListPluginReq) ProtoMessage() {} +func (*ListPluginReq) Descriptor() ([]byte, []int) { + return fileDescriptor_3b5f7d4a2149a8d0, []int{13} +} +func (m *ListPluginReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListPluginReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListPluginReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListPluginReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListPluginReq.Merge(m, src) +} +func (m *ListPluginReq) XXX_Size() int { + return m.Size() +} +func (m *ListPluginReq) XXX_DiscardUnknown() { + xxx_messageInfo_ListPluginReq.DiscardUnknown(m) +} + +var xxx_messageInfo_ListPluginReq proto.InternalMessageInfo + +type ListPluginResp struct { + Plugins []*Plugin `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListPluginResp) Reset() { *m = ListPluginResp{} } +func (m *ListPluginResp) String() string { return proto.CompactTextString(m) } +func (*ListPluginResp) ProtoMessage() {} +func (*ListPluginResp) Descriptor() ([]byte, []int) { + return fileDescriptor_3b5f7d4a2149a8d0, []int{14} +} +func (m *ListPluginResp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListPluginResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListPluginResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListPluginResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListPluginResp.Merge(m, src) +} +func (m *ListPluginResp) XXX_Size() int { + return m.Size() +} +func (m *ListPluginResp) XXX_DiscardUnknown() { + xxx_messageInfo_ListPluginResp.DiscardUnknown(m) +} + +var xxx_messageInfo_ListPluginResp proto.InternalMessageInfo + +func (m *ListPluginResp) GetPlugins() []*Plugin { + if m != nil { + return m.Plugins + } + return nil +} + +type SavePluginReq struct { + Plugin *Plugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SavePluginReq) Reset() { *m = SavePluginReq{} } +func (m *SavePluginReq) String() string { return proto.CompactTextString(m) } +func (*SavePluginReq) ProtoMessage() {} +func (*SavePluginReq) Descriptor() ([]byte, []int) { + return fileDescriptor_3b5f7d4a2149a8d0, []int{15} +} +func (m *SavePluginReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SavePluginReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SavePluginReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SavePluginReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SavePluginReq.Merge(m, src) +} +func (m *SavePluginReq) XXX_Size() int { + return m.Size() +} +func (m *SavePluginReq) XXX_DiscardUnknown() { + xxx_messageInfo_SavePluginReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SavePluginReq proto.InternalMessageInfo + +func (m *SavePluginReq) GetPlugin() *Plugin { + if m != nil { + return m.Plugin + } + return nil +} + +type SavePluginResp struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SavePluginResp) Reset() { *m = SavePluginResp{} } +func (m *SavePluginResp) String() string { return proto.CompactTextString(m) } +func (*SavePluginResp) ProtoMessage() {} +func (*SavePluginResp) Descriptor() ([]byte, []int) { + return fileDescriptor_3b5f7d4a2149a8d0, []int{16} +} +func (m *SavePluginResp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SavePluginResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SavePluginResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SavePluginResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SavePluginResp.Merge(m, src) +} +func (m *SavePluginResp) XXX_Size() int { + return m.Size() +} +func (m *SavePluginResp) XXX_DiscardUnknown() { + xxx_messageInfo_SavePluginResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SavePluginResp proto.InternalMessageInfo + +type DeletePluginReq struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeletePluginReq) Reset() { *m = DeletePluginReq{} } +func (m *DeletePluginReq) String() string { return proto.CompactTextString(m) } +func (*DeletePluginReq) ProtoMessage() {} +func (*DeletePluginReq) Descriptor() ([]byte, []int) { + return fileDescriptor_3b5f7d4a2149a8d0, []int{17} +} +func (m *DeletePluginReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeletePluginReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeletePluginReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DeletePluginReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeletePluginReq.Merge(m, src) +} +func (m *DeletePluginReq) XXX_Size() int { + return m.Size() +} +func (m *DeletePluginReq) XXX_DiscardUnknown() { + xxx_messageInfo_DeletePluginReq.DiscardUnknown(m) +} + +var xxx_messageInfo_DeletePluginReq proto.InternalMessageInfo + +func (m *DeletePluginReq) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type DeletePluginResp struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeletePluginResp) Reset() { *m = DeletePluginResp{} } +func (m *DeletePluginResp) String() string { return proto.CompactTextString(m) } +func (*DeletePluginResp) ProtoMessage() {} +func (*DeletePluginResp) Descriptor() ([]byte, []int) { + return fileDescriptor_3b5f7d4a2149a8d0, []int{18} +} +func (m *DeletePluginResp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeletePluginResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeletePluginResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DeletePluginResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeletePluginResp.Merge(m, src) +} +func (m *DeletePluginResp) XXX_Size() int { + return m.Size() +} +func (m *DeletePluginResp) XXX_DiscardUnknown() { + xxx_messageInfo_DeletePluginResp.DiscardUnknown(m) +} + +var xxx_messageInfo_DeletePluginResp proto.InternalMessageInfo + func init() { proto.RegisterEnum("dto.Bot_Captcha_CaptchaType", Bot_Captcha_CaptchaType_name, Bot_Captcha_CaptchaType_value) proto.RegisterEnum("dto.QRCodeLoginResp_QRCodeLoginState", QRCodeLoginResp_QRCodeLoginState_name, QRCodeLoginResp_QRCodeLoginState_value) @@ -832,61 +1256,87 @@ func init() { proto.RegisterType((*FetchQRCodeReq)(nil), "dto.FetchQRCodeReq") proto.RegisterType((*QueryQRCodeStatusReq)(nil), "dto.QueryQRCodeStatusReq") proto.RegisterType((*QRCodeLoginResp)(nil), "dto.QRCodeLoginResp") + proto.RegisterType((*Plugin)(nil), "dto.Plugin") + proto.RegisterType((*Plugin_Header)(nil), "dto.Plugin.Header") + proto.RegisterType((*ListPluginReq)(nil), "dto.ListPluginReq") + proto.RegisterType((*ListPluginResp)(nil), "dto.ListPluginResp") + proto.RegisterType((*SavePluginReq)(nil), "dto.SavePluginReq") + proto.RegisterType((*SavePluginResp)(nil), "dto.SavePluginResp") + proto.RegisterType((*DeletePluginReq)(nil), "dto.DeletePluginReq") + proto.RegisterType((*DeletePluginResp)(nil), "dto.DeletePluginResp") } func init() { proto.RegisterFile("http_dto.proto", fileDescriptor_3b5f7d4a2149a8d0) } var fileDescriptor_3b5f7d4a2149a8d0 = []byte{ - // 783 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xdd, 0x8e, 0xdb, 0x44, - 0x14, 0x8e, 0xed, 0xcd, 0xdf, 0xb1, 0x9b, 0xcc, 0x9e, 0xa6, 0x25, 0xa4, 0x10, 0x22, 0xa3, 0x8a, - 0x08, 0xa1, 0xbd, 0x08, 0x37, 0x48, 0x5c, 0x94, 0x8d, 0x93, 0x65, 0x23, 0x2d, 0xed, 0x76, 0xbc, - 0x2d, 0x02, 0x2e, 0x2c, 0xaf, 0x3d, 0x64, 0x2d, 0xbc, 0x1e, 0xe3, 0x99, 0xb4, 0xda, 0x67, 0xe0, - 0x05, 0x78, 0x04, 0xc4, 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 0xf2, 0x63, 0x94, 0x5d, 0x13, 0x03, 0x0f, 0xe1, 0x5e, 0xf1, 0xf1, - 0x22, 0xba, 0x66, 0x7c, 0x25, 0xc9, 0x01, 0xde, 0x5f, 0x5b, 0x50, 0xb2, 0x58, 0x48, 0xea, 0xf9, - 0x4b, 0x2b, 0x41, 0x3f, 0x09, 0x58, 0xcc, 0x42, 0xd2, 0x98, 0xbc, 0xd1, 0xc1, 0x3c, 0x95, 0x32, - 0x75, 0x59, 0x96, 0x5f, 0x15, 0x4e, 0xa0, 0xbd, 0x89, 0x2e, 0x1e, 0x2a, 0x9b, 0xaa, 0xef, 0x6a, - 0x80, 0xbb, 0x90, 0x48, 0xf3, 0x9e, 0x4d, 0x6c, 0xcb, 0x9e, 0x6a, 0xda, 0xcb, 0x9e, 0xad, 0x64, - 0xe3, 0x67, 0xd0, 0x2c, 0xb3, 0x8c, 0x5d, 0xf5, 0xf9, 0x6d, 0xce, 0x07, 0x64, 0x1b, 0x50, 0xd7, - 0x67, 0x55, 0x33, 0x88, 0x3d, 0xc5, 0xd8, 0x09, 0xf6, 0xe0, 0xc1, 0x1e, 0x54, 0xa4, 0xf8, 0x05, - 0x98, 0x95, 0xb0, 0xe2, 0x7d, 0xc5, 0xda, 0x8e, 0xef, 0xa0, 0xb7, 0x2f, 0x10, 0x38, 0x83, 0xc3, - 0xff, 0x44, 0x11, 0xdf, 0x2f, 0xa8, 0x7b, 0x22, 0xba, 0x5f, 0x65, 0x4a, 0xfe, 0xb8, 0x1d, 0x6a, - 0x7f, 0xde, 0x0e, 0xb5, 0x37, 0xb7, 0x43, 0xed, 0xd7, 0xbf, 0x87, 0xb5, 0xcb, 0x86, 0x7a, 0x02, - 0x9f, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x99, 0x4b, 0x1e, 0x2b, 0x28, 0x06, 0x00, 0x00, + // 1069 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0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86, 0x78, 0x22, 0x73, 0xe6, 0xce, 0x96, 0xe5, 0x14, 0x0d, 0x31, + 0xcb, 0x59, 0x30, 0x3f, 0xfc, 0x18, 0x6a, 0x99, 0xdd, 0x61, 0x4b, 0x2d, 0xdf, 0x58, 0x61, 0xd7, + 0x59, 0x04, 0xd4, 0x84, 0xdb, 0x45, 0x9b, 0xc2, 0xb6, 0x62, 0x2c, 0x79, 0x5f, 0xf7, 0xee, 0x0a, + 0x94, 0x27, 0xf8, 0x05, 0x58, 0x05, 0x3f, 0xc3, 0x0d, 0xc5, 0x5a, 0x74, 0xb8, 0x6e, 0x7b, 0x95, + 0x67, 0xe0, 0x3e, 0xdc, 0x79, 0xcb, 0xad, 0xf0, 0x5d, 0x4d, 0x5d, 0xe1, 0x62, 0xb7, 0x54, 0x79, + 0xa8, 0x7d, 0x3e, 0x1f, 0xc4, 0xf9, 0xe5, 0xe6, 0x8f, 0xd5, 0xdd, 0x78, 0x0b, 0xd3, 0x69, 0x37, + 0xcf, 0x9c, 0xa5, 0x2d, 0x74, 0x4b, 0x96, 0xb6, 0xd8, 0x0b, 0x52, 0xaa, 0xe2, 0x23, 0x67, 0x52, + 0x2d, 0xb5, 0x47, 0x26, 0xd5, 0x72, 0x37, 0xec, 0x39, 0xbf, 0x5d, 0x6f, 0x1a, 0xbf, 0x5f, 0x6f, + 0x1a, 0x7f, 0x5d, 0x6f, 0x1a, 0x3f, 0xff, 0xbd, 0xb9, 0x76, 0x56, 0x55, 0x86, 0xfe, 0xe9, 0xbf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xa2, 0xb5, 0x05, 0xf6, 0x08, 0x00, 0x00, } func (m *Bot) Marshal() (dAtA []byte, err error) { @@ -1410,156 +1860,523 @@ func (m *QRCodeLoginResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintHttpDto(dAtA []byte, offset int, v uint64) int { - offset -= sovHttpDto(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *Plugin) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *Bot) Size() (n int) { - if m == nil { - return 0 - } + +func (m *Plugin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Plugin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.BotId != 0 { - n += 1 + sovHttpDto(uint64(m.BotId)) - } - if m.IsOnline { - n += 2 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Captcha != nil { - l = m.Captcha.Size() - n += 1 + l + sovHttpDto(uint64(l)) + if len(m.ExtraHeader) > 0 { + for iNdEx := len(m.ExtraHeader) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExtraHeader[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHttpDto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if len(m.RegexReplace) > 0 { + i -= len(m.RegexReplace) + copy(dAtA[i:], m.RegexReplace) + i = encodeVarintHttpDto(dAtA, i, uint64(len(m.RegexReplace))) + i-- + dAtA[i] = 0x42 } - return n -} - -func (m *Bot_Captcha) Size() (n int) { - if m == nil { - return 0 + if len(m.RegexFilter) > 0 { + i -= len(m.RegexFilter) + copy(dAtA[i:], m.RegexFilter) + i = encodeVarintHttpDto(dAtA, i, uint64(len(m.RegexFilter))) + i-- + dAtA[i] = 0x3a + } + if len(m.ApiFilter) > 0 { + dAtA3 := make([]byte, len(m.ApiFilter)*10) + var j2 int + for _, num1 := range m.ApiFilter { + num := uint64(num1) + for num >= 1<<7 { + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j2++ + } + dAtA3[j2] = uint8(num) + j2++ + } + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintHttpDto(dAtA, i, uint64(j2)) + i-- + dAtA[i] = 0x32 + } + if len(m.EventFilter) > 0 { + dAtA5 := make([]byte, len(m.EventFilter)*10) + var j4 int + for _, num1 := range m.EventFilter { + num := uint64(num1) + for num >= 1<<7 { + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j4++ + } + dAtA5[j4] = uint8(num) + j4++ + } + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintHttpDto(dAtA, i, uint64(j4)) + i-- + dAtA[i] = 0x2a } - var l int - _ = l - if m.BotId != 0 { - n += 1 + sovHttpDto(uint64(m.BotId)) + if len(m.Urls) > 0 { + for iNdEx := len(m.Urls) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Urls[iNdEx]) + copy(dAtA[i:], m.Urls[iNdEx]) + i = encodeVarintHttpDto(dAtA, i, uint64(len(m.Urls[iNdEx]))) + i-- + dAtA[i] = 0x22 + } } - if m.CaptchaType != 0 { - n += 1 + sovHttpDto(uint64(m.CaptchaType)) + if m.Json { + i-- + if m.Json { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - if m.Data != nil { - n += m.Data.Size() + if m.Disabled { + i-- + if m.Disabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintHttpDto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *Bot_Captcha_Url) Size() (n int) { - if m == nil { - return 0 +func (m *Plugin_Header) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = len(m.Url) - n += 1 + l + sovHttpDto(uint64(l)) - return n + return dAtA[:n], nil } -func (m *Bot_Captcha_Image) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Image != nil { - l = len(m.Image) - n += 1 + l + sovHttpDto(uint64(l)) - } - return n + +func (m *Plugin_Header) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *CreateBotReq) Size() (n int) { - if m == nil { - return 0 - } + +func (m *Plugin_Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.BotId != 0 { - n += 1 + sovHttpDto(uint64(m.BotId)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovHttpDto(uint64(l)) - } - if m.DeviceSeed != 0 { - n += 1 + sovHttpDto(uint64(m.DeviceSeed)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.ClientProtocol != 0 { - n += 1 + sovHttpDto(uint64(m.ClientProtocol)) + if len(m.Value) > 0 { + for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Value[iNdEx]) + copy(dAtA[i:], m.Value[iNdEx]) + i = encodeVarintHttpDto(dAtA, i, uint64(len(m.Value[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintHttpDto(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *CreateBotResp) Size() (n int) { - if m == nil { - return 0 +func (m *ListPluginReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ListPluginReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListPluginReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return n + return len(dAtA) - i, nil } -func (m *DeleteBotReq) Size() (n int) { - if m == nil { - return 0 +func (m *ListPluginResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ListPluginResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListPluginResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.BotId != 0 { - n += 1 + sovHttpDto(uint64(m.BotId)) - } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return n + if len(m.Plugins) > 0 { + for iNdEx := len(m.Plugins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Plugins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHttpDto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } -func (m *DeleteBotResp) Size() (n int) { - if m == nil { - return 0 +func (m *SavePluginReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *SavePluginReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SavePluginReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return n + if m.Plugin != nil { + { + size, err := m.Plugin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHttpDto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *ListBotReq) Size() (n int) { - if m == nil { - return 0 +func (m *SavePluginResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *SavePluginResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SavePluginResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return n + return len(dAtA) - i, nil +} + +func (m *DeletePluginReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeletePluginReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeletePluginReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintHttpDto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeletePluginResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeletePluginResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeletePluginResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func encodeVarintHttpDto(dAtA []byte, offset int, v uint64) int { + offset -= sovHttpDto(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Bot) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BotId != 0 { + n += 1 + sovHttpDto(uint64(m.BotId)) + } + if m.IsOnline { + n += 2 + } + if m.Captcha != nil { + l = m.Captcha.Size() + n += 1 + l + sovHttpDto(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Bot_Captcha) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BotId != 0 { + n += 1 + sovHttpDto(uint64(m.BotId)) + } + if m.CaptchaType != 0 { + n += 1 + sovHttpDto(uint64(m.CaptchaType)) + } + if m.Data != nil { + n += m.Data.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Bot_Captcha_Url) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Url) + n += 1 + l + sovHttpDto(uint64(l)) + return n +} +func (m *Bot_Captcha_Image) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Image != nil { + l = len(m.Image) + n += 1 + l + sovHttpDto(uint64(l)) + } + return n +} +func (m *CreateBotReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BotId != 0 { + n += 1 + sovHttpDto(uint64(m.BotId)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovHttpDto(uint64(l)) + } + if m.DeviceSeed != 0 { + n += 1 + sovHttpDto(uint64(m.DeviceSeed)) + } + if m.ClientProtocol != 0 { + n += 1 + sovHttpDto(uint64(m.ClientProtocol)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CreateBotResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeleteBotReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BotId != 0 { + n += 1 + sovHttpDto(uint64(m.BotId)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeleteBotResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ListBotReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n } func (m *ListBotResp) Size() (n int) { @@ -1668,16 +2485,663 @@ func (m *QRCodeLoginResp) Size() (n int) { if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } - return n -} + return n +} + +func (m *Plugin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovHttpDto(uint64(l)) + } + if m.Disabled { + n += 2 + } + if m.Json { + n += 2 + } + if len(m.Urls) > 0 { + for _, s := range m.Urls { + l = len(s) + n += 1 + l + sovHttpDto(uint64(l)) + } + } + if len(m.EventFilter) > 0 { + l = 0 + for _, e := range m.EventFilter { + l += sovHttpDto(uint64(e)) + } + n += 1 + sovHttpDto(uint64(l)) + l + } + if len(m.ApiFilter) > 0 { + l = 0 + for _, e := range m.ApiFilter { + l += sovHttpDto(uint64(e)) + } + n += 1 + sovHttpDto(uint64(l)) + l + } + l = len(m.RegexFilter) + if l > 0 { + n += 1 + l + sovHttpDto(uint64(l)) + } + l = len(m.RegexReplace) + if l > 0 { + n += 1 + l + sovHttpDto(uint64(l)) + } + if len(m.ExtraHeader) > 0 { + for _, e := range m.ExtraHeader { + l = e.Size() + n += 1 + l + sovHttpDto(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Plugin_Header) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovHttpDto(uint64(l)) + } + if len(m.Value) > 0 { + for _, s := range m.Value { + l = len(s) + n += 1 + l + sovHttpDto(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ListPluginReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ListPluginResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Plugins) > 0 { + for _, e := range m.Plugins { + l = e.Size() + n += 1 + l + sovHttpDto(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SavePluginReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Plugin != nil { + l = m.Plugin.Size() + n += 1 + l + sovHttpDto(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SavePluginResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeletePluginReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovHttpDto(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeletePluginResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovHttpDto(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozHttpDto(x uint64) (n int) { + return sovHttpDto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Bot) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Bot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BotId", wireType) + } + m.BotId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BotId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsOnline", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsOnline = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Captcha", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Captcha == nil { + m.Captcha = &Bot_Captcha{} + } + if err := m.Captcha.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHttpDto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Bot_Captcha) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Captcha: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Captcha: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BotId", wireType) + } + m.BotId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BotId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CaptchaType", wireType) + } + m.CaptchaType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CaptchaType |= Bot_Captcha_CaptchaType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = &Bot_Captcha_Url{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.Data = &Bot_Captcha_Image{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHttpDto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateBotReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateBotReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateBotReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BotId", wireType) + } + m.BotId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BotId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceSeed", wireType) + } + m.DeviceSeed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DeviceSeed |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientProtocol", wireType) + } + m.ClientProtocol = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ClientProtocol |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipHttpDto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateBotResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateBotResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateBotResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipHttpDto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } -func sovHttpDto(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozHttpDto(x uint64) (n int) { - return sovHttpDto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *Bot) Unmarshal(dAtA []byte) error { +func (m *DeleteBotReq) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1700,10 +3164,10 @@ func (m *Bot) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Bot: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteBotReq: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Bot: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteBotReq: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1725,62 +3189,60 @@ func (m *Bot) Unmarshal(dAtA []byte) error { break } } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsOnline", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsOnline = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Captcha", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipHttpDto(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if skippy < 0 { return ErrInvalidLengthHttpDto } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (iNdEx + skippy) < 0 { return ErrInvalidLengthHttpDto } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Captcha == nil { - m.Captcha = &Bot_Captcha{} + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteBotResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto } - if err := m.Captcha.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteBotResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteBotResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipHttpDto(dAtA[iNdEx:]) @@ -1806,7 +3268,7 @@ func (m *Bot) Unmarshal(dAtA []byte) error { } return nil } -func (m *Bot_Captcha) Unmarshal(dAtA []byte) error { +func (m *ListBotReq) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1829,87 +3291,71 @@ func (m *Bot_Captcha) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Captcha: wiretype end group for non-group") + return fmt.Errorf("proto: ListBotReq: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Captcha: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListBotReq: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BotId", wireType) - } - m.BotId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BotId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CaptchaType", wireType) - } - m.CaptchaType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CaptchaType |= Bot_Captcha_CaptchaType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipHttpDto(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if skippy < 0 { return ErrInvalidLengthHttpDto } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (iNdEx + skippy) < 0 { return ErrInvalidLengthHttpDto } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Data = &Bot_Captcha_Url{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 4: + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListBotResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListBotResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListBotResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BotList", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttpDto @@ -1919,24 +3365,25 @@ func (m *Bot_Captcha) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthHttpDto } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthHttpDto } if postIndex > l { return io.ErrUnexpectedEOF } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Data = &Bot_Captcha_Image{v} + m.BotList = append(m.BotList, &Bot{}) + if err := m.BotList[len(m.BotList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -1963,7 +3410,7 @@ func (m *Bot_Captcha) Unmarshal(dAtA []byte) error { } return nil } -func (m *CreateBotReq) Unmarshal(dAtA []byte) error { +func (m *SolveCaptchaReq) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1986,10 +3433,10 @@ func (m *CreateBotReq) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CreateBotReq: wiretype end group for non-group") + return fmt.Errorf("proto: SolveCaptchaReq: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CreateBotReq: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SolveCaptchaReq: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2013,7 +3460,7 @@ func (m *CreateBotReq) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2041,9 +3488,117 @@ func (m *CreateBotReq) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Password = string(dAtA[iNdEx:postIndex]) + m.Result = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + default: + iNdEx = preIndex + skippy, err := skipHttpDto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SolveCaptchaResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SolveCaptchaResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SolveCaptchaResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipHttpDto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FetchQRCodeReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FetchQRCodeReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FetchQRCodeReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DeviceSeed", wireType) } @@ -2062,7 +3617,7 @@ func (m *CreateBotReq) Unmarshal(dAtA []byte) error { break } } - case 4: + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ClientProtocol", wireType) } @@ -2106,7 +3661,7 @@ func (m *CreateBotReq) Unmarshal(dAtA []byte) error { } return nil } -func (m *CreateBotResp) Unmarshal(dAtA []byte) error { +func (m *QueryQRCodeStatusReq) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2129,12 +3684,65 @@ func (m *CreateBotResp) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CreateBotResp: wiretype end group for non-group") + return fmt.Errorf("proto: QueryQRCodeStatusReq: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CreateBotResp: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryQRCodeStatusReq: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sig = append(m.Sig[:0], dAtA[iNdEx:postIndex]...) + if m.Sig == nil { + m.Sig = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BotId", wireType) + } + m.BotId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BotId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipHttpDto(dAtA[iNdEx:]) @@ -2160,7 +3768,7 @@ func (m *CreateBotResp) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeleteBotReq) Unmarshal(dAtA []byte) error { +func (m *QRCodeLoginResp) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2183,17 +3791,17 @@ func (m *DeleteBotReq) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteBotReq: wiretype end group for non-group") + return fmt.Errorf("proto: QRCodeLoginResp: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteBotReq: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QRCodeLoginResp: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BotId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) } - m.BotId = 0 + m.State = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttpDto @@ -2203,11 +3811,79 @@ func (m *DeleteBotReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BotId |= int64(b&0x7F) << shift + m.State |= QRCodeLoginResp_QRCodeLoginState(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageData = append(m.ImageData[:0], dAtA[iNdEx:postIndex]...) + if m.ImageData == nil { + m.ImageData = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } + if byteLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sig = append(m.Sig[:0], dAtA[iNdEx:postIndex]...) + if m.Sig == nil { + m.Sig = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipHttpDto(dAtA[iNdEx:]) @@ -2233,7 +3909,7 @@ func (m *DeleteBotReq) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeleteBotResp) Unmarshal(dAtA []byte) error { +func (m *Plugin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2256,123 +3932,335 @@ func (m *DeleteBotResp) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteBotResp: wiretype end group for non-group") + return fmt.Errorf("proto: Plugin: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteBotResp: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Plugin: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipHttpDto(dAtA[iNdEx:]) - if err != nil { - return err + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - if skippy < 0 { + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthHttpDto } - if (iNdEx + skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLengthHttpDto } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListBotReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Disabled", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Disabled = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Json", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListBotReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListBotReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipHttpDto(dAtA[iNdEx:]) - if err != nil { - return err + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if skippy < 0 { + m.Json = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Urls", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthHttpDto } - if (iNdEx + skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLengthHttpDto } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListBotResp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto + m.Urls = append(m.Urls, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EventFilter = append(m.EventFilter, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.EventFilter) == 0 { + m.EventFilter = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EventFilter = append(m.EventFilter, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field EventFilter", wireType) + } + case 6: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ApiFilter = append(m.ApiFilter, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.ApiFilter) == 0 { + m.ApiFilter = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ApiFilter = append(m.ApiFilter, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field ApiFilter", wireType) } - if iNdEx >= l { + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RegexFilter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.RegexFilter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RegexReplace", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListBotResp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListBotResp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RegexReplace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BotList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExtraHeader", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2399,8 +4287,8 @@ func (m *ListBotResp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BotList = append(m.BotList, &Bot{}) - if err := m.BotList[len(m.BotList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ExtraHeader = append(m.ExtraHeader, &Plugin_Header{}) + if err := m.ExtraHeader[len(m.ExtraHeader)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2429,7 +4317,7 @@ func (m *ListBotResp) Unmarshal(dAtA []byte) error { } return nil } -func (m *SolveCaptchaReq) Unmarshal(dAtA []byte) error { +func (m *Plugin_Header) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2452,17 +4340,17 @@ func (m *SolveCaptchaReq) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SolveCaptchaReq: wiretype end group for non-group") + return fmt.Errorf("proto: Header: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SolveCaptchaReq: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BotId", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } - m.BotId = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttpDto @@ -2472,14 +4360,27 @@ func (m *SolveCaptchaReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BotId |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHttpDto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2507,7 +4408,7 @@ func (m *SolveCaptchaReq) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Result = string(dAtA[iNdEx:postIndex]) + m.Value = append(m.Value, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -2534,7 +4435,7 @@ func (m *SolveCaptchaReq) Unmarshal(dAtA []byte) error { } return nil } -func (m *SolveCaptchaResp) Unmarshal(dAtA []byte) error { +func (m *ListPluginReq) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2557,10 +4458,10 @@ func (m *SolveCaptchaResp) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SolveCaptchaResp: wiretype end group for non-group") + return fmt.Errorf("proto: ListPluginReq: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SolveCaptchaResp: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListPluginReq: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2588,7 +4489,7 @@ func (m *SolveCaptchaResp) Unmarshal(dAtA []byte) error { } return nil } -func (m *FetchQRCodeReq) Unmarshal(dAtA []byte) error { +func (m *ListPluginResp) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2611,17 +4512,17 @@ func (m *FetchQRCodeReq) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchQRCodeReq: wiretype end group for non-group") + return fmt.Errorf("proto: ListPluginResp: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchQRCodeReq: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListPluginResp: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceSeed", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plugins", wireType) } - m.DeviceSeed = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttpDto @@ -2631,30 +4532,26 @@ func (m *FetchQRCodeReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DeviceSeed |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientProtocol", wireType) + if msglen < 0 { + return ErrInvalidLengthHttpDto } - m.ClientProtocol = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClientProtocol |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHttpDto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Plugins = append(m.Plugins, &Plugin{}) + if err := m.Plugins[len(m.Plugins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipHttpDto(dAtA[iNdEx:]) @@ -2680,7 +4577,7 @@ func (m *FetchQRCodeReq) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryQRCodeStatusReq) Unmarshal(dAtA []byte) error { +func (m *SavePluginReq) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2703,17 +4600,17 @@ func (m *QueryQRCodeStatusReq) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryQRCodeStatusReq: wiretype end group for non-group") + return fmt.Errorf("proto: SavePluginReq: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryQRCodeStatusReq: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SavePluginReq: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Plugin", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttpDto @@ -2723,45 +4620,82 @@ func (m *QueryQRCodeStatusReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthHttpDto } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthHttpDto } if postIndex > l { return io.ErrUnexpectedEOF } - m.Sig = append(m.Sig[:0], dAtA[iNdEx:postIndex]...) - if m.Sig == nil { - m.Sig = []byte{} + if m.Plugin == nil { + m.Plugin = &Plugin{} + } + if err := m.Plugin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BotId", wireType) + default: + iNdEx = preIndex + skippy, err := skipHttpDto(dAtA[iNdEx:]) + if err != nil { + return err } - m.BotId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BotId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + if skippy < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHttpDto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SavePluginResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SavePluginResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SavePluginResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipHttpDto(dAtA[iNdEx:]) @@ -2787,7 +4721,7 @@ func (m *QueryQRCodeStatusReq) Unmarshal(dAtA []byte) error { } return nil } -func (m *QRCodeLoginResp) Unmarshal(dAtA []byte) error { +func (m *DeletePluginReq) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2810,36 +4744,17 @@ func (m *QRCodeLoginResp) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QRCodeLoginResp: wiretype end group for non-group") + return fmt.Errorf("proto: DeletePluginReq: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QRCodeLoginResp: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeletePluginReq: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= QRCodeLoginResp_QRCodeLoginState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttpDto @@ -2849,60 +4764,78 @@ func (m *QRCodeLoginResp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthHttpDto } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttpDto } if postIndex > l { return io.ErrUnexpectedEOF } - m.ImageData = append(m.ImageData[:0], dAtA[iNdEx:postIndex]...) - if m.ImageData == nil { - m.ImageData = []byte{} - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpDto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipHttpDto(dAtA[iNdEx:]) + if err != nil { + return err } - if byteLen < 0 { + if skippy < 0 { return ErrInvalidLengthHttpDto } - postIndex := iNdEx + byteLen - if postIndex < 0 { + if (iNdEx + skippy) < 0 { return ErrInvalidLengthHttpDto } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Sig = append(m.Sig[:0], dAtA[iNdEx:postIndex]...) - if m.Sig == nil { - m.Sig = []byte{} + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeletePluginResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpDto } - iNdEx = postIndex + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeletePluginResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeletePluginResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipHttpDto(dAtA[iNdEx:])