marge: 合并代码,包名变更be.ems
This commit is contained in:
@@ -9,11 +9,11 @@ import (
|
|||||||
|
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/oauth"
|
"be.ems/lib/oauth"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
wsService "ems.agt/src/modules/ws/service"
|
wsService "be.ems/src/modules/ws/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExecCmd(command string) error {
|
func ExecCmd(command string) error {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExecCmd(command string) error {
|
func ExecCmd(command string) error {
|
||||||
|
|||||||
@@ -7,11 +7,12 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
@@ -153,6 +154,22 @@ func DeleteLcenseFile(w http.ResponseWriter, r *http.Request) {
|
|||||||
services.ResponseStatusOK204NoContent(w)
|
services.ResponseStatusOK204NoContent(w)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MMLRequest struct {
|
||||||
|
MML []string `json:"mml"`
|
||||||
|
}
|
||||||
|
|
||||||
|
var TIME_DELAY_AFTER_WRITE time.Duration = 200
|
||||||
|
var TIME_DEAD_LINE time.Duration = 10
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
if config.GetYamlConfig().MML.Sleep != 0 {
|
||||||
|
TIME_DELAY_AFTER_WRITE = time.Duration(config.GetYamlConfig().MML.Sleep)
|
||||||
|
}
|
||||||
|
if config.GetYamlConfig().MML.DeadLine != 0 {
|
||||||
|
TIME_DEAD_LINE = time.Duration(config.GetYamlConfig().MML.DeadLine)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func UploadLicenseFileData(w http.ResponseWriter, r *http.Request) {
|
func UploadLicenseFileData(w http.ResponseWriter, r *http.Request) {
|
||||||
log.Info("UploadLicenseFileData processing... ")
|
log.Info("UploadLicenseFileData processing... ")
|
||||||
|
|
||||||
@@ -207,7 +224,7 @@ func UploadLicenseFileData(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
var licenseFileName, comment string
|
var licenseFileName, comment string
|
||||||
|
|
||||||
// 处理软件rpm/deb文件
|
// 处理license文件
|
||||||
if len(licFile) > 0 {
|
if len(licFile) > 0 {
|
||||||
file := licFile[0]
|
file := licFile[0]
|
||||||
// 打开文件
|
// 打开文件
|
||||||
@@ -279,39 +296,213 @@ func UploadLicenseFileData(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
switch neTypeLower {
|
/*
|
||||||
case "omc":
|
// judge license if expired
|
||||||
restartCmd := fmt.Sprintf("sudo %s/bin/omcsvc.sh restart", config.GetYamlConfig().NE.OmcDir)
|
isRestart := false
|
||||||
cmd := exec.Command("ssh", sshHost, restartCmd)
|
hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
||||||
out, err := cmd.CombinedOutput()
|
requestURI2NF := fmt.Sprintf("%s/api/rest/systemManagement/v1/elementType/%s/objectType/systemState",
|
||||||
log.Debugf("Exec output: %v", string(out))
|
hostUri, neTypeLower)
|
||||||
if err != nil {
|
log.Debug("requestURI2NF:", requestURI2NF)
|
||||||
log.Error("Faile to execute ssh restart omc:", err)
|
|
||||||
services.ResponseInternalServerError500ProcessError(w, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case "ims":
|
|
||||||
restartCmd := "sudo ims-stop && sudo ims-start"
|
|
||||||
cmd := exec.Command("ssh", sshHost, restartCmd)
|
|
||||||
out, err := cmd.CombinedOutput()
|
|
||||||
log.Debugf("Exec output: %v", string(out))
|
|
||||||
if err != nil {
|
|
||||||
log.Error("Faile to execute ssh sudo systemctl command:", err)
|
|
||||||
services.ResponseInternalServerError500ProcessError(w, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
restartCmd := fmt.Sprintf("sudo systemctl restart %s.service", neTypeLower)
|
|
||||||
cmd := exec.Command("ssh", sshHost, restartCmd)
|
|
||||||
out, err := cmd.CombinedOutput()
|
|
||||||
log.Debugf("Exec output: %v", string(out))
|
|
||||||
if err != nil {
|
|
||||||
log.Error("Faile to execute ssh sudo systemctl command:", err)
|
|
||||||
services.ResponseInternalServerError500ProcessError(w, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
resp, err := client.R().
|
||||||
|
EnableTrace().
|
||||||
|
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
||||||
|
//SetHeaders(map[string]string{"accessToken": token}).
|
||||||
|
SetHeaders(map[string]string{"User-Agent": config.GetDefaultUserAgent()}).
|
||||||
|
SetHeaders(map[string]string{"Content-Type": "application/json;charset=UTF-8"}).
|
||||||
|
Get(requestURI2NF)
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to get system state:", err)
|
||||||
|
isRestart = true
|
||||||
|
} else {
|
||||||
|
systemState := make(map[string]interface{})
|
||||||
|
_ = json.Unmarshal(resp.Body(), &systemState)
|
||||||
|
expiryDate := fmt.Sprintf("%v", systemState["expiryDate"])
|
||||||
|
t1_expiry, _ := time.ParseInLocation(time.DateOnly, expiryDate, time.Local)
|
||||||
|
nowDate := time.Now().Local()
|
||||||
|
nowDate.Format(time.DateOnly)
|
||||||
|
isRestart = t1_expiry.Before(nowDate)
|
||||||
|
}
|
||||||
|
// case non-expired license: send NE reload license MML
|
||||||
|
if !isRestart {
|
||||||
|
// send reload license MML
|
||||||
|
var buf [20 * 1024]byte
|
||||||
|
//buf := make([]byte, 0)
|
||||||
|
var n int
|
||||||
|
if neInfo != nil {
|
||||||
|
switch strings.ToLower(neType) {
|
||||||
|
case "ims":
|
||||||
|
hostMML := fmt.Sprintf("%s:%d", neInfo.Ip, config.GetYamlConfig().MML.Port)
|
||||||
|
conn, err := net.Dial("tcp", hostMML)
|
||||||
|
if err != nil {
|
||||||
|
errMsg := fmt.Sprintf("Failed to dial %s: %v", hostMML, err)
|
||||||
|
log.Error(errMsg)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer conn.Close()
|
||||||
|
|
||||||
|
conn.SetDeadline(time.Now().Add(TIME_DEAD_LINE * time.Second))
|
||||||
|
|
||||||
|
_, err = conn.Write([]byte(config.GetYamlConfig().MML.User + "\r\n"))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to write:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
|
|
||||||
|
n, err = conn.Read(buf[0:])
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to read:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Trace(string(buf[0:n]))
|
||||||
|
|
||||||
|
_, err = conn.Write([]byte(config.GetYamlConfig().MML.Password + "\r\n"))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to write:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
|
|
||||||
|
n, err = conn.Read(buf[0:])
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to read:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||||
|
|
||||||
|
mmlCommand := "check lic\r\n"
|
||||||
|
|
||||||
|
_, err = conn.Write([]byte(mmlCommand))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to write:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
|
|
||||||
|
n, err = conn.Read(buf[0:])
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to read:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||||
|
|
||||||
|
re1 := regexp.MustCompile(`\x1B\[[0-9;]*[a-zA-Z]`) // 匹配包含␛的控制字符
|
||||||
|
//re2 := regexp.MustCompile(`\x00`) // 匹配空字符
|
||||||
|
re2 := regexp.MustCompile(`[\x00-\x08\x0B\x0C\x0E-\x1F\x7F\x1B]`) // 匹配空字符和包含␛的控制字符
|
||||||
|
//re := regexp.MustCompile(`[\x00-\x1F\x7F]`)
|
||||||
|
// upf telnet buffer只能读取一次,需要去掉前面的多余字符
|
||||||
|
result := re1.ReplaceAllString(string(buf[0:n-len(neType)-2]), "")
|
||||||
|
result = re2.ReplaceAllString(result, "")
|
||||||
|
if !strings.Contains(result, "COMMAND OK") {
|
||||||
|
err = fmt.Errorf("failed to check license, %s", result)
|
||||||
|
log.Error(err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
hostMML := fmt.Sprintf("%s:%d", neInfo.Ip, config.GetYamlConfig().MML.Port)
|
||||||
|
conn, err := net.Dial("tcp", hostMML)
|
||||||
|
if err != nil {
|
||||||
|
errMsg := fmt.Sprintf("Failed to dial %s: %v", hostMML, err)
|
||||||
|
log.Error(errMsg)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer conn.Close()
|
||||||
|
|
||||||
|
conn.SetDeadline(time.Now().Add(TIME_DEAD_LINE * time.Second))
|
||||||
|
loginStr := fmt.Sprintf("%s\n%s\n", config.GetYamlConfig().MML.User, config.GetYamlConfig().MML.Password)
|
||||||
|
_, err = conn.Write([]byte(loginStr))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to write:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
|
|
||||||
|
n, err = conn.Read(buf[0:])
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to read:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Trace(string(buf[0:n]))
|
||||||
|
|
||||||
|
mmlCommand := "check lic\n"
|
||||||
|
_, err = conn.Write([]byte(mmlCommand))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to write:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
|
|
||||||
|
n, err = conn.Read(buf[0:])
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to read:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||||
|
re1 := regexp.MustCompile(`\x1B\[[0-9;]*[a-zA-Z]`) // 匹配包含␛的控制字符
|
||||||
|
//re2 := regexp.MustCompile(`\x00`) // 匹配空字符
|
||||||
|
re2 := regexp.MustCompile(`[\x00-\x08\x0B\x0C\x0E-\x1F\x7F\x1B]`) // 匹配空字符和包含␛的控制字符
|
||||||
|
//re := regexp.MustCompile(`[\x00-\x1F\x7F]`)
|
||||||
|
result := re1.ReplaceAllString(string(buf[0:n-len(neType)-2]), "")
|
||||||
|
result = re2.ReplaceAllString(result, "")
|
||||||
|
if !strings.Contains(result, "COMMAND OK") {
|
||||||
|
err = fmt.Errorf("failed to check license, %s", result)
|
||||||
|
log.Error(err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// case expired license: restart NE service
|
||||||
|
switch neTypeLower {
|
||||||
|
case "omc":
|
||||||
|
restartCmd := fmt.Sprintf("sudo %s/bin/omcsvc.sh restart", config.GetYamlConfig().NE.OmcDir)
|
||||||
|
cmd := exec.Command("ssh", sshHost, restartCmd)
|
||||||
|
out, err := cmd.CombinedOutput()
|
||||||
|
log.Debugf("Exec output: %v", string(out))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Faile to execute ssh restart omc:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
case "ims":
|
||||||
|
restartCmd := "sudo ims-stop && sudo ims-start"
|
||||||
|
cmd := exec.Command("ssh", sshHost, restartCmd)
|
||||||
|
out, err := cmd.CombinedOutput()
|
||||||
|
log.Debugf("Exec output: %v", string(out))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Faile to execute ssh sudo systemctl command:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
restartCmd := fmt.Sprintf("sudo systemctl restart %s.service", neTypeLower)
|
||||||
|
cmd := exec.Command("ssh", sshHost, restartCmd)
|
||||||
|
out, err := cmd.CombinedOutput()
|
||||||
|
log.Debugf("Exec output: %v", string(out))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Faile to execute ssh sudo systemctl command:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
neLicense := dborm.NeLicense{
|
neLicense := dborm.NeLicense{
|
||||||
NeType: neTypeUpper,
|
NeType: neTypeUpper,
|
||||||
NeID: neId,
|
NeID: neId,
|
||||||
|
|||||||
@@ -10,21 +10,19 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
tokenConst "ems.agt/src/framework/constants/token"
|
tokenConst "be.ems/src/framework/constants/token"
|
||||||
neService "ems.agt/src/modules/network_element/service"
|
neService "be.ems/src/modules/network_element/service"
|
||||||
|
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
UriParamOmcNeConfig = config.DefaultUriPrefix + "/systemManagement/v1/elementType/%s/objectType/config/omcNeConfig"
|
|
||||||
UriOmcNeConfig = config.DefaultUriPrefix + "/systemManagement/v1/elementType/omc/objectType/config/omcNeConfig"
|
|
||||||
// NE CM export/import
|
// NE CM export/import
|
||||||
NeCmUri = config.DefaultUriPrefix + "/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/cm"
|
NeCmUri = config.DefaultUriPrefix + "/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/cm"
|
||||||
// NE info
|
// NE info
|
||||||
@@ -36,11 +34,9 @@ var (
|
|||||||
// nf instance action uri, action: start/stop/restart
|
// nf instance action uri, action: start/stop/restart
|
||||||
UriNeInstance = config.DefaultUriPrefix + "/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/instance/{action}"
|
UriNeInstance = config.DefaultUriPrefix + "/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/instance/{action}"
|
||||||
|
|
||||||
CustomUriParamOmcNeConfig = config.UriPrefix + "/systemManagement/v1/elementType/%s/objectType/config/omcNeConfig"
|
CustomNeCmUri = config.UriPrefix + "/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/cm"
|
||||||
CustomUriOmcNeConfig = config.UriPrefix + "/systemManagement/v1/elementType/omc/objectType/config/omcNeConfig"
|
CustomUriNeInfo = config.UriPrefix + "/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/neInfo"
|
||||||
CustomNeCmUri = config.UriPrefix + "/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/cm"
|
CustomUriNeCmFile = config.UriPrefix + "/systemManagement/{apiVersion}/{neType}/neBackup/{fileName}"
|
||||||
CustomUriNeInfo = config.UriPrefix + "/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/neInfo"
|
|
||||||
CustomUriNeCmFile = config.UriPrefix + "/systemManagement/{apiVersion}/{neType}/neBackup/{fileName}"
|
|
||||||
// service action uri, action: start/stop/restart
|
// service action uri, action: start/stop/restart
|
||||||
CustomUriNeService = config.UriPrefix + "/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/service/{action}"
|
CustomUriNeService = config.UriPrefix + "/systemManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/service/{action}"
|
||||||
// nf instance action uri, action: start/stop/restart
|
// nf instance action uri, action: start/stop/restart
|
||||||
@@ -170,7 +166,7 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
|
|||||||
} else {
|
} else {
|
||||||
hostUri := global.CombineHostUri(neInfo.Ip, neInfo.Port)
|
hostUri := global.CombineHostUri(neInfo.Ip, neInfo.Port)
|
||||||
//hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
//hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
||||||
apiUri := fmt.Sprintf(UriParamOmcNeConfig, strings.ToLower(neInfo.NeType))
|
apiUri := fmt.Sprintf("%s/systemManagement/v1/elementType/%s/objectType/config/omcNeConfig", config.DefaultUriPrefix, strings.ToLower(neInfo.NeType))
|
||||||
requestURI2NF := fmt.Sprintf("%s%s", hostUri, apiUri)
|
requestURI2NF := fmt.Sprintf("%s%s", hostUri, apiUri)
|
||||||
log.Debug("requestURI2NF:", requestURI2NF)
|
log.Debug("requestURI2NF:", requestURI2NF)
|
||||||
|
|
||||||
@@ -280,7 +276,7 @@ func PutNeInfo(w http.ResponseWriter, r *http.Request) {
|
|||||||
} else {
|
} else {
|
||||||
hostUri := global.CombineHostUri(neInfo.Ip, neInfo.Port)
|
hostUri := global.CombineHostUri(neInfo.Ip, neInfo.Port)
|
||||||
//hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
//hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
||||||
apiUri := fmt.Sprintf(UriParamOmcNeConfig, neTypeLower)
|
apiUri := fmt.Sprintf("%s/systemManagement/v1/elementType/%s/objectType/config/omcNeConfig", config.DefaultUriPrefix, neTypeLower)
|
||||||
requestURI2NF := fmt.Sprintf("%s%s", hostUri, apiUri)
|
requestURI2NF := fmt.Sprintf("%s%s", hostUri, apiUri)
|
||||||
log.Debug("requestURI2NF:", requestURI2NF)
|
log.Debug("requestURI2NF:", requestURI2NF)
|
||||||
|
|
||||||
@@ -338,28 +334,6 @@ func PutNeInfo(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func PutOMCNeConfig(w http.ResponseWriter, r *http.Request) {
|
|
||||||
vars := mux.Vars(r)
|
|
||||||
neType := vars["elementTypeValue"]
|
|
||||||
if neType == "" {
|
|
||||||
log.Error("elementTypeValue is empty")
|
|
||||||
services.ResponseNotFound404UriNotExist(w, r)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
body, err := io.ReadAll(io.LimitReader(r.Body, global.RequestBodyMaxLen))
|
|
||||||
if err != nil {
|
|
||||||
log.Error("Failed to io.ReadAll:", err)
|
|
||||||
services.ResponseNotFound404UriNotExist(w, r)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
neInfo := new(dborm.NeInfo)
|
|
||||||
_ = json.Unmarshal(body, neInfo)
|
|
||||||
neInfo.NeType = strings.ToUpper(neType)
|
|
||||||
|
|
||||||
services.ResponseStatusOK204NoContent(w)
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeleteNeInfo(w http.ResponseWriter, r *http.Request) {
|
func DeleteNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||||
log.Debug("DeleteNeInfo processing... ")
|
log.Debug("DeleteNeInfo processing... ")
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
package cm
|
package cm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"ems.agt/lib/dborm"
|
"strings"
|
||||||
"ems.agt/lib/global"
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/global"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/lib/log"
|
||||||
|
"be.ems/lib/services"
|
||||||
|
"be.ems/restagent/config"
|
||||||
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
tokenConst "ems.agt/src/framework/constants/token"
|
tokenConst "be.ems/src/framework/constants/token"
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
@@ -163,8 +165,14 @@ func PutParamConfigToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
services.ResponseNotFound404UriNotExist(w, r)
|
services.ResponseNotFound404UriNotExist(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
neId := services.GetUriParamString(r, "ne_id", ",", false, false)
|
|
||||||
|
|
||||||
|
// OMC配置接口 /api/rest/systemManagement/v1/elementType/omc/objectType/config/omcNeConfig
|
||||||
|
if v, ok := vars["paraName"]; ok && v == "omcNeConfig" && strings.ToLower(neType) == "omc" {
|
||||||
|
PutOMCNeConfig(w, r)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
neId := services.GetUriParamString(r, "ne_id", ",", false, false)
|
||||||
// no, _ := strconv.ParseInt(neId, 10, 64)
|
// no, _ := strconv.ParseInt(neId, 10, 64)
|
||||||
neInfo, err := dborm.XormGetNeInfo(neType, neId)
|
neInfo, err := dborm.XormGetNeInfo(neType, neId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -199,6 +207,31 @@ func PutParamConfigToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
services.ResponseWithJson(w, http.StatusNoContent, response)
|
services.ResponseWithJson(w, http.StatusNoContent, response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PutOMCNeConfig 网元OMC配置
|
||||||
|
//
|
||||||
|
// 目前没配置,返回204
|
||||||
|
func PutOMCNeConfig(w http.ResponseWriter, r *http.Request) {
|
||||||
|
// vars := mux.Vars(r)
|
||||||
|
// neType := vars["elementTypeValue"]
|
||||||
|
// if neType == "" {
|
||||||
|
// log.Error("elementTypeValue is empty")
|
||||||
|
// services.ResponseNotFound404UriNotExist(w, r)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// body, err := io.ReadAll(io.LimitReader(r.Body, global.RequestBodyMaxLen))
|
||||||
|
// if err != nil {
|
||||||
|
// log.Error("Failed to io.ReadAll:", err)
|
||||||
|
// services.ResponseNotFound404UriNotExist(w, r)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
// neInfo := new(dborm.NeInfo)
|
||||||
|
// _ = json.Unmarshal(body, neInfo)
|
||||||
|
// neInfo.NeType = strings.ToUpper(neType)
|
||||||
|
|
||||||
|
services.ResponseStatusOK204NoContent(w)
|
||||||
|
}
|
||||||
|
|
||||||
func DeleteParamConfigToNF(w http.ResponseWriter, r *http.Request) {
|
func DeleteParamConfigToNF(w http.ResponseWriter, r *http.Request) {
|
||||||
log.Debug("DeleteParamConfigToNF processing... ")
|
log.Debug("DeleteParamConfigToNF processing... ")
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/core/conf"
|
"be.ems/lib/core/conf"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
wsService "ems.agt/src/modules/ws/service"
|
wsService "be.ems/src/modules/ws/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/file"
|
"be.ems/lib/file"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/shirou/gopsutil/disk"
|
"github.com/shirou/gopsutil/disk"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/file"
|
"be.ems/lib/file"
|
||||||
"github.com/spf13/afero"
|
"github.com/spf13/afero"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
package firewall
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"ems.agt/features/firewall/model"
|
|
||||||
"ems.agt/features/firewall/service"
|
|
||||||
"ems.agt/lib/core/utils/ctx"
|
|
||||||
"ems.agt/lib/core/vo/result"
|
|
||||||
"ems.agt/lib/services"
|
|
||||||
"ems.agt/restagent/config"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 防火墙管理接口添加到路由
|
|
||||||
func Routers() []services.RouterItem {
|
|
||||||
// 实例化控制层 FirewallApi 结构体
|
|
||||||
var apis = &FirewallApi{
|
|
||||||
firewallService: *service.NewServiceFirewall,
|
|
||||||
}
|
|
||||||
|
|
||||||
rs := [...]services.RouterItem{
|
|
||||||
{
|
|
||||||
Method: "GET",
|
|
||||||
Pattern: "/base",
|
|
||||||
Handler: apis.BaseInfo,
|
|
||||||
Middleware: nil, //midware.Authorize(nil),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Method: "POST",
|
|
||||||
Pattern: "/rule",
|
|
||||||
Handler: apis.Rule,
|
|
||||||
Middleware: nil, //midware.Authorize(nil),
|
|
||||||
},
|
|
||||||
// 添加更多的 Router 对象...
|
|
||||||
}
|
|
||||||
|
|
||||||
// 生成两组前缀路由
|
|
||||||
rsPrefix := []services.RouterItem{}
|
|
||||||
for _, v := range rs {
|
|
||||||
path := "/firewallManage/{apiVersion}" + v.Pattern
|
|
||||||
// 固定前缀
|
|
||||||
v.Pattern = config.DefaultUriPrefix + path
|
|
||||||
rsPrefix = append(rsPrefix, v)
|
|
||||||
// 可配置
|
|
||||||
v.Pattern = config.UriPrefix + path
|
|
||||||
rsPrefix = append(rsPrefix, v)
|
|
||||||
}
|
|
||||||
return rsPrefix
|
|
||||||
}
|
|
||||||
|
|
||||||
// 防火墙管理
|
|
||||||
//
|
|
||||||
// PATH /firewallManage
|
|
||||||
type FirewallApi struct {
|
|
||||||
firewallService service.ServiceFirewall
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取防火墙基础信息
|
|
||||||
//
|
|
||||||
// GET /base
|
|
||||||
func (s *FirewallApi) BaseInfo(w http.ResponseWriter, r *http.Request) {
|
|
||||||
data, err := s.firewallService.LoadBaseInfo()
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(w, 200, result.ErrMsg(err.Error()))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(w, 200, result.OkData(data))
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取防火墙规则列表分页
|
|
||||||
//
|
|
||||||
// GET /rule
|
|
||||||
func (s *FirewallApi) Rule(w http.ResponseWriter, r *http.Request) {
|
|
||||||
var body model.RuleQuerys
|
|
||||||
err := ctx.ShouldBindJSON(r, &body)
|
|
||||||
if err != nil || body.Type == "" {
|
|
||||||
ctx.JSON(w, 400, result.CodeMsg(400, "parameter error"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
data, err := s.firewallService.RulePage(body)
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(w, 400, result.ErrMsg(err.Error()))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(w, 200, result.OkData(data))
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package model
|
|
||||||
|
|
||||||
type Firewall struct {
|
|
||||||
ID int64 `json:"id" xorm:"id"`
|
|
||||||
CreatedAt int64 `json:"createdAt" xorm:"created_at"`
|
|
||||||
UpdatedAt int64 `json:"updatedAt" xorm:"updated_at"`
|
|
||||||
Type string `json:"type" xorm:"type"`
|
|
||||||
Port string `json:"port" xorm:"port"`
|
|
||||||
Protocol string `json:"protocol" xorm:"protocol"`
|
|
||||||
Address string `json:"address" xorm:"address"`
|
|
||||||
Strategy string `json:"strategy" xorm:"strategy"`
|
|
||||||
Description string `json:"description" xorm:"description"`
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
package model
|
|
||||||
|
|
||||||
type FirewallBaseInfo struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Status string `json:"status"`
|
|
||||||
Version string `json:"version"`
|
|
||||||
PingStatus string `json:"pingStatus"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type RuleQuerys struct {
|
|
||||||
PageNum int `json:"pageNum" validate:"required,number"`
|
|
||||||
PageSize int `json:"pageSize" validate:"required,number"`
|
|
||||||
Info string `json:"info"`
|
|
||||||
Status string `json:"status"`
|
|
||||||
Strategy string `json:"strategy"`
|
|
||||||
Type string `json:"type" validate:"required"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type FirewallOperation struct {
|
|
||||||
Operation string `json:"operation" validate:"required,oneof=start stop disablePing enablePing"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type PortRuleOperate struct {
|
|
||||||
Operation string `json:"operation" validate:"required,oneof=add remove"`
|
|
||||||
Address string `json:"address"`
|
|
||||||
Port string `json:"port" validate:"required"`
|
|
||||||
Protocol string `json:"protocol" validate:"required,oneof=tcp udp tcp/udp"`
|
|
||||||
Strategy string `json:"strategy" validate:"required,oneof=accept drop"`
|
|
||||||
|
|
||||||
Description string `json:"description"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UpdateFirewallDescription struct {
|
|
||||||
Type string `json:"type"`
|
|
||||||
Address string `json:"address"`
|
|
||||||
Port string `json:"port"`
|
|
||||||
Protocol string `json:"protocol"`
|
|
||||||
Strategy string `json:"strategy" validate:"required,oneof=accept drop"`
|
|
||||||
|
|
||||||
Description string `json:"description"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AddrRuleOperate struct {
|
|
||||||
Operation string `json:"operation" validate:"required,oneof=add remove"`
|
|
||||||
Address string `json:"address" validate:"required"`
|
|
||||||
Strategy string `json:"strategy" validate:"required,oneof=accept drop"`
|
|
||||||
|
|
||||||
Description string `json:"description"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type PortRuleUpdate struct {
|
|
||||||
OldRule PortRuleOperate `json:"oldRule"`
|
|
||||||
NewRule PortRuleOperate `json:"newRule"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AddrRuleUpdate struct {
|
|
||||||
OldRule AddrRuleOperate `json:"oldRule"`
|
|
||||||
NewRule AddrRuleOperate `json:"newRule"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BatchRuleOperate struct {
|
|
||||||
Type string `json:"type" validate:"required"`
|
|
||||||
Rules []PortRuleOperate `json:"rules"`
|
|
||||||
}
|
|
||||||
@@ -1,133 +0,0 @@
|
|||||||
package repo
|
|
||||||
|
|
||||||
import (
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"ems.agt/features/firewall/model"
|
|
||||||
"ems.agt/lib/core/datasource"
|
|
||||||
"ems.agt/lib/log"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 实例化数据层 RepoFirewall 结构体
|
|
||||||
var NewRepoFirewall = &RepoFirewall{
|
|
||||||
selectSql: `select
|
|
||||||
id, created_at, updated_at, type, port, protocol, address, strategy, description
|
|
||||||
from monitor_firewall`,
|
|
||||||
|
|
||||||
resultMap: map[string]string{
|
|
||||||
"id": "ID",
|
|
||||||
"created_at": "CreatedAt",
|
|
||||||
"updated_at": "UpdatedAt",
|
|
||||||
"type": "Type",
|
|
||||||
"port": "Port",
|
|
||||||
"protocol": "Protocol",
|
|
||||||
"address": "Address",
|
|
||||||
"strategy": "Strategy",
|
|
||||||
"description": "Description",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
// RepoFirewall 防火墙 数据层处理
|
|
||||||
type RepoFirewall struct {
|
|
||||||
// 查询视图对象SQL
|
|
||||||
selectSql string
|
|
||||||
// 结果字段与实体映射
|
|
||||||
resultMap map[string]string
|
|
||||||
}
|
|
||||||
|
|
||||||
// convertResultRows 将结果记录转实体结果组
|
|
||||||
func (r *RepoFirewall) convertResultRows(rows []map[string]any) []model.Firewall {
|
|
||||||
arr := make([]model.Firewall, 0)
|
|
||||||
for _, row := range rows {
|
|
||||||
UdmUser := model.Firewall{}
|
|
||||||
for key, value := range row {
|
|
||||||
if keyMapper, ok := r.resultMap[key]; ok {
|
|
||||||
datasource.SetFieldValue(&UdmUser, keyMapper, value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
arr = append(arr, UdmUser)
|
|
||||||
}
|
|
||||||
return arr
|
|
||||||
}
|
|
||||||
|
|
||||||
// List 根据实体查询
|
|
||||||
func (r *RepoFirewall) List(f model.Firewall) []model.Firewall {
|
|
||||||
// 查询条件拼接
|
|
||||||
var conditions []string
|
|
||||||
var params []any
|
|
||||||
if f.Type != "" {
|
|
||||||
conditions = append(conditions, "type = ?")
|
|
||||||
params = append(params, f.Type)
|
|
||||||
}
|
|
||||||
if f.Protocol != "" {
|
|
||||||
conditions = append(conditions, "protocol = ?")
|
|
||||||
params = append(params, f.Protocol)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 构建查询条件语句
|
|
||||||
whereSql := ""
|
|
||||||
if len(conditions) > 0 {
|
|
||||||
whereSql += " where " + strings.Join(conditions, " and ")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询数据
|
|
||||||
querySql := r.selectSql + whereSql
|
|
||||||
results, err := datasource.RawDB("", querySql, params)
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("query err => %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 转换实体
|
|
||||||
return r.convertResultRows(results)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Insert 新增实体
|
|
||||||
func (r *RepoFirewall) Insert(f model.Firewall) int64 {
|
|
||||||
results, err := datasource.DefaultDB().Table("monitor_firewall").Insert(f)
|
|
||||||
if err != nil {
|
|
||||||
return results
|
|
||||||
}
|
|
||||||
return results
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update 修改更新
|
|
||||||
func (r *RepoFirewall) Update(f model.Firewall) int64 {
|
|
||||||
// 查询先
|
|
||||||
var fd model.Firewall
|
|
||||||
if f.Type == "port" {
|
|
||||||
has, err := datasource.DefaultDB().Table("monitor_firewall").Where("type = ? AND port = ? AND protocol = ? AND address = ? AND strategy = ?", "port", f.Port, f.Protocol, f.Address, f.Strategy).Get(&fd)
|
|
||||||
if !has || err != nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
has, err := datasource.DefaultDB().Table("monitor_firewall").Where("type = ? AND address = ? AND strategy = ?", "address", f.Address, f.Strategy).Get(&fd)
|
|
||||||
if !has || err != nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
f.ID = fd.ID
|
|
||||||
|
|
||||||
results, err := datasource.DefaultDB().Table("monitor_firewall").Where("id = ?", f.ID).Update(f)
|
|
||||||
if err != nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
return results
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete 删除实体
|
|
||||||
func (r *RepoFirewall) Delete(id int64) int64 {
|
|
||||||
results, err := datasource.DefaultDB().Table("u_sub_user").Where("id = ?", id).Delete()
|
|
||||||
if err != nil {
|
|
||||||
return results
|
|
||||||
}
|
|
||||||
return results
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteFirewallRecord 删除实体
|
|
||||||
func (r *RepoFirewall) DeleteFirewallRecord(fType, port, protocol, address, strategy string) int64 {
|
|
||||||
results, err := datasource.DefaultDB().Table("u_sub_user").Where("type = ? AND port = ? AND protocol = ? AND address = ? AND strategy = ?", fType, port, protocol, address, strategy).Delete()
|
|
||||||
if err != nil {
|
|
||||||
return results
|
|
||||||
}
|
|
||||||
return results
|
|
||||||
}
|
|
||||||
@@ -1,207 +0,0 @@
|
|||||||
package service
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"ems.agt/features/firewall/model"
|
|
||||||
"ems.agt/features/firewall/repo"
|
|
||||||
"ems.agt/lib/core/cmd"
|
|
||||||
"ems.agt/lib/core/utils/firewall"
|
|
||||||
fireClient "ems.agt/lib/core/utils/firewall/client"
|
|
||||||
"ems.agt/lib/core/utils/scan"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 实例化服务层 ServiceFirewall 结构体
|
|
||||||
var NewServiceFirewall = &ServiceFirewall{
|
|
||||||
repoFirewall: *repo.NewRepoFirewall,
|
|
||||||
}
|
|
||||||
|
|
||||||
// ServiceFirewall 防火墙 服务层处理
|
|
||||||
type ServiceFirewall struct {
|
|
||||||
repoFirewall repo.RepoFirewall
|
|
||||||
}
|
|
||||||
|
|
||||||
// LoadBaseInfo 获取防火墙基础信息
|
|
||||||
func (s *ServiceFirewall) LoadBaseInfo() (model.FirewallBaseInfo, error) {
|
|
||||||
var baseInfo model.FirewallBaseInfo
|
|
||||||
baseInfo.PingStatus = s.pingStatus()
|
|
||||||
baseInfo.Status = "not running"
|
|
||||||
baseInfo.Version = "-"
|
|
||||||
baseInfo.Name = "-"
|
|
||||||
client, err := firewall.NewFirewallClient()
|
|
||||||
if err != nil {
|
|
||||||
if err.Error() == "no such type" {
|
|
||||||
return baseInfo, nil
|
|
||||||
}
|
|
||||||
return baseInfo, err
|
|
||||||
}
|
|
||||||
baseInfo.Name = client.Name()
|
|
||||||
baseInfo.Status, err = client.Status()
|
|
||||||
if err != nil {
|
|
||||||
return baseInfo, err
|
|
||||||
}
|
|
||||||
if baseInfo.Status == "not running" {
|
|
||||||
return baseInfo, err
|
|
||||||
}
|
|
||||||
baseInfo.Version, err = client.Version()
|
|
||||||
if err != nil {
|
|
||||||
return baseInfo, err
|
|
||||||
}
|
|
||||||
return baseInfo, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// LoadBaseInfo 获取防火墙基础信息
|
|
||||||
func (s *ServiceFirewall) RulePage(querys model.RuleQuerys) (map[string]any, error) {
|
|
||||||
var (
|
|
||||||
datas []fireClient.FireInfo
|
|
||||||
backDatas []fireClient.FireInfo
|
|
||||||
)
|
|
||||||
|
|
||||||
data := map[string]any{
|
|
||||||
"total": 0,
|
|
||||||
"rows": backDatas,
|
|
||||||
}
|
|
||||||
|
|
||||||
client, err := firewall.NewFirewallClient()
|
|
||||||
if err != nil {
|
|
||||||
return data, err
|
|
||||||
}
|
|
||||||
if querys.Type == "port" {
|
|
||||||
ports, err := client.ListPort()
|
|
||||||
if err != nil {
|
|
||||||
return data, err
|
|
||||||
}
|
|
||||||
if len(querys.Info) != 0 {
|
|
||||||
for _, port := range ports {
|
|
||||||
if strings.Contains(port.Port, querys.Info) {
|
|
||||||
datas = append(datas, port)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
datas = ports
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
addrs, err := client.ListAddress()
|
|
||||||
if err != nil {
|
|
||||||
return data, err
|
|
||||||
}
|
|
||||||
if len(querys.Info) != 0 {
|
|
||||||
for _, addr := range addrs {
|
|
||||||
if strings.Contains(addr.Address, querys.Info) {
|
|
||||||
datas = append(datas, addr)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
datas = addrs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var datasFilterStatus []fireClient.FireInfo
|
|
||||||
if len(querys.Status) != 0 {
|
|
||||||
for _, data := range datas {
|
|
||||||
portItem, _ := strconv.Atoi(data.Port)
|
|
||||||
if querys.Status == "free" && !scan.ScanPortWithProto(portItem, data.Protocol) {
|
|
||||||
datasFilterStatus = append(datasFilterStatus, data)
|
|
||||||
}
|
|
||||||
if querys.Status == "used" && scan.ScanPortWithProto(portItem, data.Protocol) {
|
|
||||||
datasFilterStatus = append(datasFilterStatus, data)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
datasFilterStatus = datas
|
|
||||||
}
|
|
||||||
var datasFilterStrategy []fireClient.FireInfo
|
|
||||||
if len(querys.Strategy) != 0 {
|
|
||||||
for _, data := range datasFilterStatus {
|
|
||||||
if querys.Strategy == data.Strategy {
|
|
||||||
datasFilterStrategy = append(datasFilterStrategy, data)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
datasFilterStrategy = datasFilterStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
total, start, end := len(datasFilterStrategy), (querys.PageNum-1)*querys.PageSize, querys.PageNum*querys.PageSize
|
|
||||||
if start > total {
|
|
||||||
backDatas = make([]fireClient.FireInfo, 0)
|
|
||||||
} else {
|
|
||||||
if end >= total {
|
|
||||||
end = total
|
|
||||||
}
|
|
||||||
backDatas = datasFilterStrategy[start:end]
|
|
||||||
}
|
|
||||||
|
|
||||||
datasFromDB := s.repoFirewall.List(model.Firewall{})
|
|
||||||
for i := 0; i < len(backDatas); i++ {
|
|
||||||
for _, des := range datasFromDB {
|
|
||||||
if querys.Type != des.Type {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if backDatas[i].Port == des.Port && querys.Type == "port" &&
|
|
||||||
backDatas[i].Protocol == des.Protocol &&
|
|
||||||
backDatas[i].Strategy == des.Strategy &&
|
|
||||||
backDatas[i].Address == des.Address {
|
|
||||||
backDatas[i].Description = des.Description
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if querys.Type == "address" && backDatas[i].Strategy == des.Strategy && backDatas[i].Address == des.Address {
|
|
||||||
backDatas[i].Description = des.Description
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if querys.Type == "port" {
|
|
||||||
for i := 0; i < len(backDatas); i++ {
|
|
||||||
port, _ := strconv.Atoi(backDatas[i].Port)
|
|
||||||
backDatas[i].IsUsed = scan.ScanPort(port)
|
|
||||||
if backDatas[i].Protocol == "udp" {
|
|
||||||
backDatas[i].IsUsed = scan.ScanUDPPort(port)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
go s.cleanUnUsedData(client)
|
|
||||||
|
|
||||||
return data, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *ServiceFirewall) pingStatus() string {
|
|
||||||
if _, err := os.Stat("/etc/sysctl.conf"); err != nil {
|
|
||||||
return "None"
|
|
||||||
}
|
|
||||||
sudo := cmd.SudoHandleCmd()
|
|
||||||
command := fmt.Sprintf("%s cat /etc/sysctl.conf | grep net/ipv4/icmp_echo_ignore_all= ", sudo)
|
|
||||||
stdout, _ := cmd.Exec(command)
|
|
||||||
if stdout == "net/ipv4/icmp_echo_ignore_all=1\n" {
|
|
||||||
return "Enable"
|
|
||||||
}
|
|
||||||
return "Disable"
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *ServiceFirewall) cleanUnUsedData(client firewall.FirewallClient) {
|
|
||||||
list, _ := client.ListPort()
|
|
||||||
addressList, _ := client.ListAddress()
|
|
||||||
list = append(list, addressList...)
|
|
||||||
if len(list) == 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
records := s.repoFirewall.List(model.Firewall{})
|
|
||||||
if len(records) == 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
for _, item := range list {
|
|
||||||
for i := 0; i < len(records); i++ {
|
|
||||||
if records[i].Port == item.Port && records[i].Protocol == item.Protocol && records[i].Strategy == item.Strategy && records[i].Address == item.Address {
|
|
||||||
records = append(records[:i], records[i+1:]...)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, record := range records {
|
|
||||||
_ = s.repoFirewall.Delete(record.ID)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
|
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
@@ -115,6 +115,27 @@ var (
|
|||||||
CustomUriAlarmsFmt = config.UriPrefix + "/faultManagement/v1/elementType/%s/objectType/alarms"
|
CustomUriAlarmsFmt = config.UriPrefix + "/faultManagement/v1/elementType/%s/objectType/alarms"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var client = resty.New()
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
/*
|
||||||
|
client.
|
||||||
|
SetTimeout(10 * time.Second).
|
||||||
|
SetRetryCount(1).
|
||||||
|
SetRetryWaitTime(1 * time.Second).
|
||||||
|
SetRetryMaxWaitTime(2 * time.Second).
|
||||||
|
SetRetryAfter(func(client *resty.Client, resp *resty.Response) (time.Duration, error) {
|
||||||
|
return 0, errors.New("quota exceeded")
|
||||||
|
})
|
||||||
|
*/
|
||||||
|
client.
|
||||||
|
SetTimeout(time.Duration(500 * time.Millisecond))
|
||||||
|
// SetRetryCount(1).
|
||||||
|
// SetRetryWaitTime(time.Duration(1 * time.Second)).
|
||||||
|
// SetRetryMaxWaitTime(time.Duration(2 * time.Second))
|
||||||
|
//client.SetTimeout(2 * time.Second)
|
||||||
|
}
|
||||||
|
|
||||||
var xEngine *xorm.Engine
|
var xEngine *xorm.Engine
|
||||||
|
|
||||||
type DatabaseClient struct {
|
type DatabaseClient struct {
|
||||||
@@ -439,8 +460,8 @@ func PostAlarmFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err = AlarmEmailForward(&alarmData); err != nil {
|
if err = AlarmEmailForward(&alarmData); err != nil {
|
||||||
log.Error("Failed to AlarmEmailForward:", err)
|
log.Error("Failed to AlarmEmailForward:", err)
|
||||||
}
|
}
|
||||||
if err = AlarmForwardBySMS(&alarmData); err != nil {
|
if err = AlarmForwardBySMSC(&alarmData); err != nil {
|
||||||
log.Error("Failed to AlarmForwardBySMS:", err)
|
log.Error("Failed to AlarmForwardBySMSC:", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -482,7 +503,7 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
apiUri := fmt.Sprintf(UriAlarmsFmt, strings.ToLower(ne.NeType))
|
apiUri := fmt.Sprintf(UriAlarmsFmt, strings.ToLower(ne.NeType))
|
||||||
requestURI2NF := fmt.Sprintf("%s%s", hostUri, apiUri)
|
requestURI2NF := fmt.Sprintf("%s%s", hostUri, apiUri)
|
||||||
log.Debug("requestURI2NF: Get ", requestURI2NF)
|
log.Debug("requestURI2NF: Get ", requestURI2NF)
|
||||||
client := resty.New()
|
// client := resty.New()
|
||||||
response, err := client.R().
|
response, err := client.R().
|
||||||
EnableTrace().
|
EnableTrace().
|
||||||
SetHeaders(map[string]string{"User-Agent": config.GetDefaultUserAgent()}).
|
SetHeaders(map[string]string{"User-Agent": config.GetDefaultUserAgent()}).
|
||||||
@@ -498,7 +519,12 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
switch response.StatusCode() {
|
switch response.StatusCode() {
|
||||||
case http.StatusOK, http.StatusCreated, http.StatusNoContent, http.StatusAccepted:
|
case http.StatusOK, http.StatusCreated, http.StatusNoContent, http.StatusAccepted:
|
||||||
body := response.Body()
|
body := response.Body()
|
||||||
log.Debug("Request body:", string(body))
|
if len(body) == 0 || body == nil {
|
||||||
|
log.Infof("Empty alarm body from neType=%s, neId=%s", ne.NeType, ne.NeId)
|
||||||
|
//services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
//log.Debug("Request body:", string(body))
|
||||||
|
|
||||||
err = json.Unmarshal(body, &alarmArray)
|
err = json.Unmarshal(body, &alarmArray)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -518,7 +544,7 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if alarmArray == nil {
|
if alarmArray == nil {
|
||||||
log.Info("Not found sync alarms, neType=%s, neId=%s", ne.NeType, ne.NeId)
|
log.Infof("Not found sync alarms, neType=%s, neId=%s", ne.NeType, ne.NeId)
|
||||||
//services.ResponseInternalServerError500ProcessError(w, err)
|
//services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -536,7 +562,7 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
Where("ne_type=? and ne_id=? and alarm_id=? and alarm_status=1", alarmData.NeType, alarmData.NeId, alarmData.AlarmId).
|
Where("ne_type=? and ne_id=? and alarm_id=? and alarm_status=1", alarmData.NeType, alarmData.NeId, alarmData.AlarmId).
|
||||||
Exist()
|
Exist()
|
||||||
if err == nil || !exist {
|
if err == nil || !exist {
|
||||||
log.Info("Not found active alarm: ne_id=%s, alarm_id=%s", alarmData.NeId, alarmData.AlarmId)
|
log.Infof("Not found active alarm: ne_id=%s, alarm_id=%s", alarmData.NeId, alarmData.AlarmId)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
alarmData.ClearType = ClearTypeAutoClear
|
alarmData.ClearType = ClearTypeAutoClear
|
||||||
@@ -708,8 +734,8 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err = AlarmEmailForward(&alarmData); err != nil {
|
if err = AlarmEmailForward(&alarmData); err != nil {
|
||||||
log.Error("Failed to AlarmEmailForward:", err)
|
log.Error("Failed to AlarmEmailForward:", err)
|
||||||
}
|
}
|
||||||
if err = AlarmForwardBySMS(&alarmData); err != nil {
|
if err = AlarmForwardBySMSC(&alarmData); err != nil {
|
||||||
log.Error("Failed to AlarmForwardBySMS:", err)
|
log.Error("Failed to AlarmForwardBySMSC:", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -717,5 +743,5 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
services.ResponseStatusOK200Null(w)
|
services.ResponseStatusOK204NoContent(w)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
|
|
||||||
"gopkg.in/gomail.v2"
|
"gopkg.in/gomail.v2"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,10 +5,14 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
|
"github.com/linxGnu/gosmpp"
|
||||||
|
"github.com/linxGnu/gosmpp/data"
|
||||||
|
"github.com/linxGnu/gosmpp/pdu"
|
||||||
)
|
)
|
||||||
|
|
||||||
func AlarmForwardBySMS(alarmData *Alarm) error {
|
func AlarmForwardBySMS(alarmData *Alarm) error {
|
||||||
@@ -80,8 +84,8 @@ func AlarmForwardBySMS(alarmData *Alarm) error {
|
|||||||
|
|
||||||
// 解析响应
|
// 解析响应
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
log.Info("SMS sent successfully!")
|
operResult := "SMS sent successfully!"
|
||||||
operResult := fmt.Sprintf("SMS sent successfully!")
|
log.Info(operResult)
|
||||||
forwardLog.OperResult = operResult
|
forwardLog.OperResult = operResult
|
||||||
affected, err := dborm.XormInsertAlarmForwardLog(forwardLog)
|
affected, err := dborm.XormInsertAlarmForwardLog(forwardLog)
|
||||||
if err != nil && affected <= 0 {
|
if err != nil && affected <= 0 {
|
||||||
@@ -101,3 +105,144 @@ func AlarmForwardBySMS(alarmData *Alarm) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func AlarmForwardBySMPP(alarmData *Alarm) error {
|
||||||
|
log.Info("AlarmForwardBySMPP processing... ")
|
||||||
|
|
||||||
|
auth := gosmpp.Auth{
|
||||||
|
SMSC: config.GetYamlConfig().Alarm.SMSC.Addr,
|
||||||
|
SystemID: config.GetYamlConfig().Alarm.SMSC.UserName,
|
||||||
|
Password: config.GetYamlConfig().Alarm.SMSC.Password,
|
||||||
|
SystemType: "",
|
||||||
|
}
|
||||||
|
|
||||||
|
// conn, err := gosmpp.NonTLSDialer(auth.SMSC)
|
||||||
|
// connection := gosmpp.NewConnection(conn)
|
||||||
|
|
||||||
|
trans, err := gosmpp.NewSession(
|
||||||
|
gosmpp.TXConnector(gosmpp.NonTLSDialer, auth),
|
||||||
|
gosmpp.Settings{
|
||||||
|
ReadTimeout: 2 * time.Second,
|
||||||
|
|
||||||
|
OnPDU: func(p pdu.PDU, _ bool) {
|
||||||
|
log.Debug("%+v", p)
|
||||||
|
},
|
||||||
|
|
||||||
|
OnSubmitError: func(_ pdu.PDU, err error) {
|
||||||
|
log.Error(err)
|
||||||
|
},
|
||||||
|
|
||||||
|
OnRebindingError: func(err error) {
|
||||||
|
log.Error(err)
|
||||||
|
},
|
||||||
|
|
||||||
|
OnClosed: func(state gosmpp.State) {
|
||||||
|
log.Error(state)
|
||||||
|
},
|
||||||
|
}, -1)
|
||||||
|
if err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
_ = trans.Close()
|
||||||
|
}()
|
||||||
|
|
||||||
|
toUsers, err := dborm.XormGetAlarmForward("SMS")
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to XormGetAlarmForward:", err)
|
||||||
|
return err
|
||||||
|
} else if toUsers == nil {
|
||||||
|
err := errors.New("not found forward phone number")
|
||||||
|
log.Error(err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// sending SMS(s)
|
||||||
|
for _, toUser := range *toUsers {
|
||||||
|
forwardLog := &dborm.AlarmForwardLog{
|
||||||
|
NeType: alarmData.NeType,
|
||||||
|
NeID: alarmData.NeId,
|
||||||
|
AlarmID: alarmData.AlarmId,
|
||||||
|
AlarmTitle: alarmData.AlarmTitle,
|
||||||
|
AlarmSeq: alarmData.AlarmSeq,
|
||||||
|
EventTime: alarmData.EventTime,
|
||||||
|
ToUser: toUser,
|
||||||
|
}
|
||||||
|
message := alarmData.AlarmTitle + "from" + alarmData.NeType + alarmData.NeId + "at" + alarmData.EventTime
|
||||||
|
if err = trans.Transceiver().Submit(newSubmitSM(toUser, message)); err != nil {
|
||||||
|
operResult := fmt.Sprintf("Failed to submit short message:%v", err)
|
||||||
|
log.Error(operResult)
|
||||||
|
forwardLog.OperResult = operResult
|
||||||
|
} else {
|
||||||
|
operResult := "SMS sent successfully!"
|
||||||
|
log.Trace(operResult)
|
||||||
|
forwardLog.OperResult = operResult
|
||||||
|
}
|
||||||
|
|
||||||
|
affected, err := dborm.XormInsertAlarmForwardLog(forwardLog)
|
||||||
|
if err != nil && affected <= 0 {
|
||||||
|
log.Error("Failed to insert data:", err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func handlePDU() func(pdu.PDU) (pdu.PDU, bool) {
|
||||||
|
return func(p pdu.PDU) (pdu.PDU, bool) {
|
||||||
|
switch pd := p.(type) {
|
||||||
|
case *pdu.Unbind:
|
||||||
|
log.Trace("Unbind Received")
|
||||||
|
return pd.GetResponse(), true
|
||||||
|
|
||||||
|
case *pdu.UnbindResp:
|
||||||
|
log.Trace("UnbindResp Received")
|
||||||
|
|
||||||
|
case *pdu.SubmitSMResp:
|
||||||
|
log.Trace("SubmitSMResp Received")
|
||||||
|
|
||||||
|
case *pdu.GenericNack:
|
||||||
|
log.Trace("GenericNack Received")
|
||||||
|
|
||||||
|
case *pdu.EnquireLinkResp:
|
||||||
|
fmt.Println("EnquireLinkResp Received")
|
||||||
|
|
||||||
|
case *pdu.EnquireLink:
|
||||||
|
log.Trace("EnquireLink Received")
|
||||||
|
return pd.GetResponse(), false
|
||||||
|
|
||||||
|
case *pdu.DataSM:
|
||||||
|
log.Trace("DataSM receiver")
|
||||||
|
return pd.GetResponse(), false
|
||||||
|
|
||||||
|
case *pdu.DeliverSM:
|
||||||
|
log.Trace("DeliverSM receiver")
|
||||||
|
return pd.GetResponse(), false
|
||||||
|
}
|
||||||
|
return nil, false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func newSubmitSM(phoneNumber string, message string) *pdu.SubmitSM {
|
||||||
|
// build up submitSM
|
||||||
|
srcAddr := pdu.NewAddress()
|
||||||
|
srcAddr.SetTon(5)
|
||||||
|
srcAddr.SetNpi(0)
|
||||||
|
_ = srcAddr.SetAddress("alarm notification:")
|
||||||
|
|
||||||
|
destAddr := pdu.NewAddress()
|
||||||
|
destAddr.SetTon(1)
|
||||||
|
destAddr.SetNpi(1)
|
||||||
|
_ = destAddr.SetAddress(phoneNumber)
|
||||||
|
|
||||||
|
submitSM := pdu.NewSubmitSM().(*pdu.SubmitSM)
|
||||||
|
submitSM.SourceAddr = srcAddr
|
||||||
|
submitSM.DestAddr = destAddr
|
||||||
|
_ = submitSM.Message.SetMessageWithEncoding(message, data.UCS2)
|
||||||
|
submitSM.ProtocolID = 0
|
||||||
|
submitSM.RegisteredDelivery = 1
|
||||||
|
submitSM.ReplaceIfPresentFlag = 0
|
||||||
|
submitSM.EsmClass = 0
|
||||||
|
|
||||||
|
return submitSM
|
||||||
|
}
|
||||||
|
|||||||
60
features/fm/ucpcli.go
Normal file
60
features/fm/ucpcli.go
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
package fm
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"be.ems/lib/log"
|
||||||
|
"be.ems/restagent/config"
|
||||||
|
"github.com/chzyer/readline"
|
||||||
|
"github.com/go-gsm/ucp"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AlarmForwardBySMSC(alarmData *Alarm) error {
|
||||||
|
opt := &ucp.Options{
|
||||||
|
Addr: config.GetYamlConfig().Alarm.SMSC.Addr,
|
||||||
|
User: config.GetYamlConfig().Alarm.SMSC.UserName,
|
||||||
|
Password: config.GetYamlConfig().Alarm.SMSC.Password,
|
||||||
|
AccessCode: "",
|
||||||
|
}
|
||||||
|
|
||||||
|
client := ucp.New(opt)
|
||||||
|
if err := client.Connect(); err != nil {
|
||||||
|
log.Error("Failed to connect:", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer client.Close()
|
||||||
|
|
||||||
|
reader, _ := readline.New(">>> ")
|
||||||
|
defer reader.Close()
|
||||||
|
|
||||||
|
for {
|
||||||
|
fmt.Print(">>> ")
|
||||||
|
lines, _ := reader.Readline()
|
||||||
|
fields := strings.Fields(lines)
|
||||||
|
|
||||||
|
if len(fields) == 1 {
|
||||||
|
// exit CLI
|
||||||
|
if fields[0] == "exit" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
// display help message
|
||||||
|
if fields[0] == "help" {
|
||||||
|
log.Trace("\n\tSend a 'message' to 'receiver' with a 'sender' mask\n\t>>> sender receiver message\n\n\tExit the cli\n\t>>> exit\n")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// sender receiver message...
|
||||||
|
if len(fields) >= 3 {
|
||||||
|
sender := fields[0]
|
||||||
|
receiver := fields[1]
|
||||||
|
message := strings.Join(fields[2:], " ")
|
||||||
|
ids, err := client.Send(sender, receiver, message)
|
||||||
|
if err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
} else {
|
||||||
|
log.Debug("%v", ids)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,17 +8,17 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
g "github.com/gosnmp/gosnmp"
|
g "github.com/gosnmp/gosnmp"
|
||||||
|
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/oauth"
|
"be.ems/lib/oauth"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/lib/session"
|
"be.ems/lib/session"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var TodoList []stTodo
|
var TodoList []stTodo
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
"github.com/shirou/gopsutil/cpu"
|
"github.com/shirou/gopsutil/cpu"
|
||||||
"github.com/shirou/gopsutil/disk"
|
"github.com/shirou/gopsutil/disk"
|
||||||
"github.com/shirou/gopsutil/mem"
|
"github.com/shirou/gopsutil/mem"
|
||||||
|
|||||||
@@ -10,20 +10,21 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/mmlp"
|
"be.ems/lib/mmlp"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
|
|
||||||
tokenConst "ems.agt/src/framework/constants/token"
|
tokenConst "be.ems/src/framework/constants/token"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
// const (
|
// const (
|
||||||
// //经过测试,linux下,延时需要大于100ms
|
// //经过测试,linux下,延时需要大于100ms
|
||||||
// TIME_DELAY_AFTER_WRITE = 200
|
// TIME_DELAY_AFTER_WRITE = 200
|
||||||
|
// TIME_DEAD_LINE = 10
|
||||||
// )
|
// )
|
||||||
|
|
||||||
type Response struct {
|
type Response struct {
|
||||||
@@ -37,25 +38,150 @@ type MMLRequest struct {
|
|||||||
var (
|
var (
|
||||||
// MML interface
|
// MML interface
|
||||||
UriMML = config.DefaultUriPrefix + "/operationManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/mml"
|
UriMML = config.DefaultUriPrefix + "/operationManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/mml"
|
||||||
|
UriMML2 = config.DefaultUriPrefix + "/operationManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/mml2"
|
||||||
UriMMLDiscard = config.DefaultUriPrefix + "/opeartionManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/mml"
|
UriMMLDiscard = config.DefaultUriPrefix + "/opeartionManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/mml"
|
||||||
UriNeOmMml = config.DefaultUriPrefix + "/omManagement/{apiVersion}/mml/{netype}/{neid}"
|
UriNeOmMml = config.DefaultUriPrefix + "/omManagement/{apiVersion}/mml/{netype}/{neid}"
|
||||||
UriOmMmlExt = config.DefaultUriPrefix + "/{managedType}/{apiVersion}/elementType/OMC/objectType/mml"
|
UriOmMmlExt = config.DefaultUriPrefix + "/{managedType}/{apiVersion}/elementType/OMC/objectType/mml"
|
||||||
UriOmMmlInt = config.DefaultUriPrefix + "/omManagement/{apiVersion}/mml/{neType}/{neId}"
|
UriOmMmlInt = config.DefaultUriPrefix + "/omManagement/{apiVersion}/mml/{neType}/{neId}"
|
||||||
|
|
||||||
CustomUriMML = config.UriPrefix + "/operationManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/mml"
|
CustomUriMML = config.UriPrefix + "/operationManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/mml"
|
||||||
|
CustomUriMML2 = config.UriPrefix + "/operationManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/mml2"
|
||||||
CustomUriNeOmMml = config.UriPrefix + "/omManagement/{apiVersion}/mml/{netype}/{neid}"
|
CustomUriNeOmMml = config.UriPrefix + "/omManagement/{apiVersion}/mml/{netype}/{neid}"
|
||||||
CustomUriOmMmlExt = config.UriPrefix + "/opeartionManagement/{apiVersion}/elementType/OMC/objectType/mml"
|
CustomUriOmMmlExt = config.UriPrefix + "/opeartionManagement/{apiVersion}/elementType/OMC/objectType/mml"
|
||||||
CustomUriOmMmlInt = config.UriPrefix + "/omManagement/{apiVersion}/mml/{neType}/{neId}"
|
CustomUriOmMmlInt = config.UriPrefix + "/omManagement/{apiVersion}/mml/{neType}/{neId}"
|
||||||
)
|
)
|
||||||
|
|
||||||
// func init() {
|
var TIME_DELAY_AFTER_WRITE time.Duration = 200
|
||||||
// if config.GetYamlConfig().MML.Sleep != 0 {
|
var TIME_DEAD_LINE time.Duration = 10
|
||||||
// TIME_DELAY_AFTER_WRITE = time.Duration(config.GetYamlConfig().MML.Sleep)
|
|
||||||
// }
|
func init() {
|
||||||
// if config.GetYamlConfig().MML.DeadLine != 0 {
|
if config.GetYamlConfig().MML.Sleep != 0 {
|
||||||
// TIME_DEAD_LINE = time.Duration(config.GetYamlConfig().MML.DeadLine)
|
TIME_DELAY_AFTER_WRITE = time.Duration(config.GetYamlConfig().MML.Sleep)
|
||||||
// }
|
}
|
||||||
// }
|
if config.GetYamlConfig().MML.DeadLine != 0 {
|
||||||
|
TIME_DEAD_LINE = time.Duration(config.GetYamlConfig().MML.DeadLine)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func PostMML2ToNF(w http.ResponseWriter, r *http.Request) {
|
||||||
|
log.Info("PostMML2ToNF processing... ")
|
||||||
|
|
||||||
|
vars := mux.Vars(r)
|
||||||
|
neType := vars["elementTypeValue"]
|
||||||
|
neInfo := new(dborm.NeInfo)
|
||||||
|
params := r.URL.Query()
|
||||||
|
neId := params["ne_id"]
|
||||||
|
neInfo, err := dborm.XormGetNeInfo(neType, neId[0])
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to dborm.XormGetNeInfo:", err)
|
||||||
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var buf [20 * 1024]byte
|
||||||
|
//buf := make([]byte, 0)
|
||||||
|
var n int
|
||||||
|
var mmlResult []string
|
||||||
|
port2 := 5002
|
||||||
|
if config.GetYamlConfig().MML.Port2 != 0 {
|
||||||
|
port2 = config.GetYamlConfig().MML.Port2
|
||||||
|
}
|
||||||
|
|
||||||
|
if neInfo != nil {
|
||||||
|
hostMML := fmt.Sprintf("%s:%d", neInfo.Ip, port2)
|
||||||
|
conn, err := net.Dial("tcp", hostMML)
|
||||||
|
if err != nil {
|
||||||
|
errMsg := fmt.Sprintf("Failed to dial %s: %v", hostMML, err)
|
||||||
|
log.Error(errMsg)
|
||||||
|
mmlResult = append(mmlResult, errMsg)
|
||||||
|
response := Response{mmlResult}
|
||||||
|
services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer conn.Close()
|
||||||
|
|
||||||
|
// localAddr := conn.LocalAddr()
|
||||||
|
// remoteAddr := conn.RemoteAddr()
|
||||||
|
// if localAddr == nil || remoteAddr == nil {
|
||||||
|
// errMsg := fmt.Sprintf("connect invalid: localAddr=%v, remoteAddr=%v", localAddr, remoteAddr)
|
||||||
|
// log.Error(errMsg)
|
||||||
|
// mmlResult = append(mmlResult, errMsg)
|
||||||
|
// response := Response{mmlResult}
|
||||||
|
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
conn.SetDeadline(time.Now().Add(TIME_DEAD_LINE * time.Second))
|
||||||
|
loginStr := fmt.Sprintf("%s\n%s\n", config.GetYamlConfig().MML.User, config.GetYamlConfig().MML.Password)
|
||||||
|
_, err = conn.Write([]byte(loginStr))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to write:", err)
|
||||||
|
mmlResult = append(mmlResult, err.Error())
|
||||||
|
response := Response{mmlResult}
|
||||||
|
services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
|
|
||||||
|
n, err = conn.Read(buf[0:])
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to read:", err)
|
||||||
|
mmlResult = append(mmlResult, err.Error())
|
||||||
|
response := Response{mmlResult}
|
||||||
|
services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Trace(string(buf[0:n]))
|
||||||
|
|
||||||
|
body, err := io.ReadAll(io.LimitReader(r.Body, global.RequestBodyMaxLen))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to ReadAll:", err)
|
||||||
|
services.ResponseNotFound404UriNotExist(w, r)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Trace("Body:", string(body))
|
||||||
|
|
||||||
|
mmlRequest := new(MMLRequest)
|
||||||
|
_ = json.Unmarshal(body, mmlRequest)
|
||||||
|
|
||||||
|
for _, mml := range mmlRequest.MML {
|
||||||
|
mmlCommand := fmt.Sprintf("%s\n", mml)
|
||||||
|
_, err = conn.Write([]byte(mmlCommand))
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to write:", err)
|
||||||
|
mmlResult = append(mmlResult, err.Error())
|
||||||
|
// response := Response{mmlResult}
|
||||||
|
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
|
// return
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
|
|
||||||
|
n, err = conn.Read(buf[0:])
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to read:", err)
|
||||||
|
mmlResult = append(mmlResult, err.Error())
|
||||||
|
// response := Response{mmlResult}
|
||||||
|
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
|
// return
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||||
|
re1 := regexp.MustCompile(`\x1B\[[0-9;]*[a-zA-Z]`) // 匹配包含␛的控制字符
|
||||||
|
//re2 := regexp.MustCompile(`\x00`) // 匹配空字符
|
||||||
|
re2 := regexp.MustCompile(`[\x00-\x08\x0B\x0C\x0E-\x1F\x7F\x1B]`) // 匹配空字符和包含␛的控制字符
|
||||||
|
//re := regexp.MustCompile(`[\x00-\x1F\x7F]`)
|
||||||
|
result := re1.ReplaceAllString(string(buf[0:n-len(neType)-2]), "")
|
||||||
|
result = re2.ReplaceAllString(result, "")
|
||||||
|
mmlResult = append(mmlResult, result)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
response := Response{mmlResult}
|
||||||
|
services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
|
}
|
||||||
|
|
||||||
func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
||||||
log.Debug("PostMMLToNF processing... ")
|
log.Debug("PostMMLToNF processing... ")
|
||||||
@@ -66,14 +192,14 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 经过测试,linux下,延时需要大于100ms
|
// 经过测试,linux下,延时需要大于100ms
|
||||||
var TIME_DELAY_AFTER_WRITE time.Duration = 200
|
// var TIME_DELAY_AFTER_WRITE time.Duration = 200
|
||||||
var TIME_DEAD_LINE time.Duration = 10
|
// var TIME_DEAD_LINE time.Duration = 10
|
||||||
if config.GetYamlConfig().MML.Sleep != 0 {
|
// if config.GetYamlConfig().MML.Sleep != 0 {
|
||||||
TIME_DELAY_AFTER_WRITE = time.Duration(config.GetYamlConfig().MML.Sleep)
|
// TIME_DELAY_AFTER_WRITE = time.Duration(config.GetYamlConfig().MML.Sleep)
|
||||||
}
|
// }
|
||||||
if config.GetYamlConfig().MML.DeadLine != 0 {
|
// if config.GetYamlConfig().MML.DeadLine != 0 {
|
||||||
TIME_DEAD_LINE = time.Duration(config.GetYamlConfig().MML.DeadLine)
|
// TIME_DEAD_LINE = time.Duration(config.GetYamlConfig().MML.DeadLine)
|
||||||
}
|
// }
|
||||||
|
|
||||||
pack := "mml"
|
pack := "mml"
|
||||||
vars := mux.Vars(r)
|
vars := mux.Vars(r)
|
||||||
@@ -242,9 +368,10 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to write:", err)
|
log.Error("Failed to write:", err)
|
||||||
mmlResult = append(mmlResult, err.Error())
|
mmlResult = append(mmlResult, err.Error())
|
||||||
response := Response{mmlResult}
|
//response := Response{mmlResult}
|
||||||
services.ResponseWithJson(w, http.StatusOK, response)
|
//services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
return
|
//return
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
mmlCommand := fmt.Sprintf("%s\n", mml)
|
mmlCommand := fmt.Sprintf("%s\n", mml)
|
||||||
@@ -253,9 +380,10 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to write:", err)
|
log.Error("Failed to write:", err)
|
||||||
mmlResult = append(mmlResult, err.Error())
|
mmlResult = append(mmlResult, err.Error())
|
||||||
response := Response{mmlResult}
|
//response := Response{mmlResult}
|
||||||
services.ResponseWithJson(w, http.StatusOK, response)
|
//services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
return
|
//return
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
|
|
||||||
@@ -263,9 +391,10 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to read:", err)
|
log.Error("Failed to read:", err)
|
||||||
mmlResult = append(mmlResult, err.Error())
|
mmlResult = append(mmlResult, err.Error())
|
||||||
response := Response{mmlResult}
|
//response := Response{mmlResult}
|
||||||
services.ResponseWithJson(w, http.StatusOK, response)
|
//services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
return
|
//return
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
log.Trace(string(buf[0 : n-len(neType)-2]))
|
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||||
|
|
||||||
@@ -327,7 +456,7 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
services.ResponseWithJson(w, http.StatusOK, response)
|
services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Debug(string(buf[0:n]))
|
log.Trace(string(buf[0:n]))
|
||||||
|
|
||||||
_, err = conn.Write([]byte(config.GetYamlConfig().MML.Password + "\r\n"))
|
_, err = conn.Write([]byte(config.GetYamlConfig().MML.Password + "\r\n"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -377,9 +506,10 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to write:", err)
|
log.Error("Failed to write:", err)
|
||||||
mmlResult = append(mmlResult, err.Error())
|
mmlResult = append(mmlResult, err.Error())
|
||||||
response := Response{mmlResult}
|
// response := Response{mmlResult}
|
||||||
services.ResponseWithJson(w, http.StatusOK, response)
|
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
return
|
// return
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
|
|
||||||
@@ -387,9 +517,10 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to read:", err)
|
log.Error("Failed to read:", err)
|
||||||
mmlResult = append(mmlResult, err.Error())
|
mmlResult = append(mmlResult, err.Error())
|
||||||
response := Response{mmlResult}
|
// response := Response{mmlResult}
|
||||||
services.ResponseWithJson(w, http.StatusOK, response)
|
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
return
|
// return
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
log.Trace(string(buf[0 : n-len(neType)-2]))
|
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||||
|
|
||||||
@@ -397,7 +528,6 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
//re2 := regexp.MustCompile(`\x00`) // 匹配空字符
|
//re2 := regexp.MustCompile(`\x00`) // 匹配空字符
|
||||||
re2 := regexp.MustCompile(`[\x00-\x08\x0B\x0C\x0E-\x1F\x7F\x1B]`) // 匹配空字符和包含␛的控制字符
|
re2 := regexp.MustCompile(`[\x00-\x08\x0B\x0C\x0E-\x1F\x7F\x1B]`) // 匹配空字符和包含␛的控制字符
|
||||||
//re := regexp.MustCompile(`[\x00-\x1F\x7F]`)
|
//re := regexp.MustCompile(`[\x00-\x1F\x7F]`)
|
||||||
// upf telnet buffer只能读取一次,需要去掉前面的多余字符
|
|
||||||
result := re1.ReplaceAllString(string(buf[0:n-len(neType)-2]), "")
|
result := re1.ReplaceAllString(string(buf[0:n-len(neType)-2]), "")
|
||||||
result = re2.ReplaceAllString(result, "")
|
result = re2.ReplaceAllString(result, "")
|
||||||
mmlResult = append(mmlResult, result)
|
mmlResult = append(mmlResult, result)
|
||||||
@@ -466,9 +596,10 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to write:", err)
|
log.Error("Failed to write:", err)
|
||||||
mmlResult = append(mmlResult, err.Error())
|
mmlResult = append(mmlResult, err.Error())
|
||||||
response := Response{mmlResult}
|
// response := Response{mmlResult}
|
||||||
services.ResponseWithJson(w, http.StatusOK, response)
|
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
return
|
// return
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||||
|
|
||||||
@@ -476,9 +607,10 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to read:", err)
|
log.Error("Failed to read:", err)
|
||||||
mmlResult = append(mmlResult, err.Error())
|
mmlResult = append(mmlResult, err.Error())
|
||||||
response := Response{mmlResult}
|
// response := Response{mmlResult}
|
||||||
services.ResponseWithJson(w, http.StatusOK, response)
|
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||||
return
|
// return
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
log.Trace(string(buf[0 : n-len(neType)-2]))
|
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||||
re1 := regexp.MustCompile(`\x1B\[[0-9;]*[a-zA-Z]`) // 匹配包含␛的控制字符
|
re1 := regexp.MustCompile(`\x1B\[[0-9;]*[a-zA-Z]`) // 匹配包含␛的控制字符
|
||||||
@@ -533,7 +665,7 @@ func PostMMLToOMC(w http.ResponseWriter, r *http.Request) {
|
|||||||
hostUri := fmt.Sprintf("http://%s:%s", neInfo.Ip, neInfo.Port)
|
hostUri := fmt.Sprintf("http://%s:%s", neInfo.Ip, neInfo.Port)
|
||||||
|
|
||||||
omcMmlVar := &mmlp.MmlVar{
|
omcMmlVar := &mmlp.MmlVar{
|
||||||
Version: "16.1.1",
|
Version: global.Version,
|
||||||
Output: mmlp.DefaultFormatType,
|
Output: mmlp.DefaultFormatType,
|
||||||
MmlHome: config.GetYamlConfig().MML.MmlHome,
|
MmlHome: config.GetYamlConfig().MML.MmlHome,
|
||||||
Limit: 50,
|
Limit: 50,
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
"github.com/shirou/gopsutil/disk"
|
"github.com/shirou/gopsutil/disk"
|
||||||
"github.com/shirou/gopsutil/net"
|
"github.com/shirou/gopsutil/net"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
"github.com/robfig/cron/v3"
|
"github.com/robfig/cron/v3"
|
||||||
"github.com/shirou/gopsutil/v3/cpu"
|
"github.com/shirou/gopsutil/v3/cpu"
|
||||||
"github.com/shirou/gopsutil/v3/disk"
|
"github.com/shirou/gopsutil/v3/disk"
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/lib/wsinfo"
|
"be.ems/lib/wsinfo"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"github.com/shirou/gopsutil/process"
|
"github.com/shirou/gopsutil/process"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,17 +6,17 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/oauth"
|
"be.ems/lib/oauth"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/lib/session"
|
"be.ems/lib/session"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ErrorOAuthResponse struct {
|
type ErrorOAuthResponse struct {
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
g "github.com/gosnmp/gosnmp"
|
g "github.com/gosnmp/gosnmp"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
|
|
||||||
wsService "ems.agt/src/modules/ws/service"
|
wsService "be.ems/src/modules/ws/service"
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|||||||
@@ -10,21 +10,21 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/features/security/service"
|
"be.ems/features/security/service"
|
||||||
sysConfigService "ems.agt/features/sys_config/service"
|
sysConfigService "be.ems/features/sys_config/service"
|
||||||
"ems.agt/lib/core/account"
|
"be.ems/lib/core/account"
|
||||||
"ems.agt/lib/core/cache"
|
"be.ems/lib/core/cache"
|
||||||
"ems.agt/lib/core/constants/cachekey"
|
"be.ems/lib/core/constants/cachekey"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/vo/result"
|
"be.ems/lib/core/vo/result"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/oauth"
|
"be.ems/lib/oauth"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
srcConfig "ems.agt/src/framework/config"
|
srcConfig "be.ems/src/framework/config"
|
||||||
"ems.agt/src/framework/redis"
|
"be.ems/src/framework/redis"
|
||||||
"github.com/mojocn/base64Captcha"
|
"github.com/mojocn/base64Captcha"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
menuService "ems.agt/features/sys_menu/service"
|
menuService "be.ems/features/sys_menu/service"
|
||||||
roleService "ems.agt/features/sys_role/service"
|
roleService "be.ems/features/sys_role/service"
|
||||||
userService "ems.agt/features/sys_user/service"
|
userService "be.ems/features/sys_user/service"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/core/vo"
|
"be.ems/lib/core/vo"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化服务层 ServiceAccount 结构体
|
// 实例化服务层 ServiceAccount 结构体
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ import (
|
|||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
tokenConst "ems.agt/src/framework/constants/token"
|
tokenConst "be.ems/src/framework/constants/token"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CpuUsage struct {
|
type CpuUsage struct {
|
||||||
@@ -756,6 +756,8 @@ func GetStateFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
result["ipAddress"] = ne.Ip
|
result["ipAddress"] = ne.Ip
|
||||||
resp, err := client.R().
|
resp, err := client.R().
|
||||||
EnableTrace().
|
EnableTrace().
|
||||||
|
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
||||||
|
//SetHeaders(map[string]string{"accessToken": token}).
|
||||||
SetHeaders(map[string]string{"User-Agent": config.GetDefaultUserAgent()}).
|
SetHeaders(map[string]string{"User-Agent": config.GetDefaultUserAgent()}).
|
||||||
SetHeaders(map[string]string{"Content-Type": "application/json;charset=UTF-8"}).
|
SetHeaders(map[string]string{"Content-Type": "application/json;charset=UTF-8"}).
|
||||||
Get(requestURI2NF)
|
Get(requestURI2NF)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"github.com/shirou/gopsutil/v3/cpu"
|
"github.com/shirou/gopsutil/v3/cpu"
|
||||||
"github.com/shirou/gopsutil/v3/disk"
|
"github.com/shirou/gopsutil/v3/disk"
|
||||||
"github.com/shirou/gopsutil/v3/mem"
|
"github.com/shirou/gopsutil/v3/mem"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package state
|
package state
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"github.com/shirou/gopsutil/cpu"
|
"github.com/shirou/gopsutil/cpu"
|
||||||
"github.com/shirou/gopsutil/disk"
|
"github.com/shirou/gopsutil/disk"
|
||||||
"github.com/shirou/gopsutil/host"
|
"github.com/shirou/gopsutil/host"
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/features/sys_config/model"
|
"be.ems/features/sys_config/model"
|
||||||
"ems.agt/features/sys_config/service"
|
"be.ems/features/sys_config/service"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/core/vo/result"
|
"be.ems/lib/core/vo/result"
|
||||||
"ems.agt/lib/midware"
|
"be.ems/lib/midware"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 参数配置信息接口添加到路由
|
// 参数配置信息接口添加到路由
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/features/sys_config/model"
|
"be.ems/features/sys_config/model"
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/date"
|
"be.ems/lib/core/utils/date"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化数据层 RepoSysConfig 结构体
|
// 实例化数据层 RepoSysConfig 结构体
|
||||||
@@ -181,11 +181,7 @@ func (r *RepoSysConfig) SelectConfigValueByKey(configKey string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
@@ -230,11 +226,7 @@ func (r *RepoSysConfig) CheckUniqueConfig(sysConfig model.SysConfig) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package service
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"ems.agt/features/sys_config/model"
|
"be.ems/features/sys_config/model"
|
||||||
"ems.agt/lib/core/cache"
|
"be.ems/lib/core/cache"
|
||||||
"ems.agt/lib/core/constants/cachekey"
|
"be.ems/lib/core/constants/cachekey"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化服务层 ServiceSysConfig 结构体
|
// 实例化服务层 ServiceSysConfig 结构体
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/features/sys_dict_data/model"
|
"be.ems/features/sys_dict_data/model"
|
||||||
sysDictDataService "ems.agt/features/sys_dict_data/service"
|
sysDictDataService "be.ems/features/sys_dict_data/service"
|
||||||
sysDictTypeService "ems.agt/features/sys_dict_type/service"
|
sysDictTypeService "be.ems/features/sys_dict_type/service"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/core/vo/result"
|
"be.ems/lib/core/vo/result"
|
||||||
"ems.agt/lib/midware"
|
"be.ems/lib/midware"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 字典类型对应的字典数据信息接口添加到路由
|
// 字典类型对应的字典数据信息接口添加到路由
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/features/sys_dict_data/model"
|
"be.ems/features/sys_dict_data/model"
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化数据层 RepoSysDictData 结构体
|
// 实例化数据层 RepoSysDictData 结构体
|
||||||
@@ -215,11 +215,7 @@ func (r *RepoSysDictData) CheckUniqueDictData(sysDictData model.SysDictData) str
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package service
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"ems.agt/features/sys_dict_data/model"
|
"be.ems/features/sys_dict_data/model"
|
||||||
"ems.agt/features/sys_dict_data/repo"
|
"be.ems/features/sys_dict_data/repo"
|
||||||
sysDictTypeService "ems.agt/features/sys_dict_type/service"
|
sysDictTypeService "be.ems/features/sys_dict_type/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化服务层 ServiceSysDictData 结构体
|
// 实例化服务层 ServiceSysDictData 结构体
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/features/sys_dict_type/model"
|
"be.ems/features/sys_dict_type/model"
|
||||||
sysDictTypeService "ems.agt/features/sys_dict_type/service"
|
sysDictTypeService "be.ems/features/sys_dict_type/service"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/core/vo/result"
|
"be.ems/lib/core/vo/result"
|
||||||
"ems.agt/lib/midware"
|
"be.ems/lib/midware"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 字典类型信息接口添加到路由
|
// 字典类型信息接口添加到路由
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/features/sys_dict_type/model"
|
"be.ems/features/sys_dict_type/model"
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/date"
|
"be.ems/lib/core/utils/date"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化数据层 RepoSysDictType 结构体
|
// 实例化数据层 RepoSysDictType 结构体
|
||||||
@@ -227,11 +227,7 @@ func (r *RepoSysDictType) CheckUniqueDictType(sysDictType model.SysDictType) str
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
sysDictDataModel "ems.agt/features/sys_dict_data/model"
|
sysDictDataModel "be.ems/features/sys_dict_data/model"
|
||||||
sysDictDataRepo "ems.agt/features/sys_dict_data/repo"
|
sysDictDataRepo "be.ems/features/sys_dict_data/repo"
|
||||||
sysDictTypeModel "ems.agt/features/sys_dict_type/model"
|
sysDictTypeModel "be.ems/features/sys_dict_type/model"
|
||||||
"ems.agt/features/sys_dict_type/repo"
|
"be.ems/features/sys_dict_type/repo"
|
||||||
"ems.agt/lib/core/cache"
|
"be.ems/lib/core/cache"
|
||||||
"ems.agt/lib/core/constants/cachekey"
|
"be.ems/lib/core/constants/cachekey"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化服务层 ServiceSysDictType 结构体
|
// 实例化服务层 ServiceSysDictType 结构体
|
||||||
|
|||||||
@@ -4,16 +4,16 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"ems.agt/features/sys_menu/consts"
|
"be.ems/features/sys_menu/consts"
|
||||||
"ems.agt/features/sys_menu/model"
|
"be.ems/features/sys_menu/model"
|
||||||
"ems.agt/features/sys_menu/service"
|
"be.ems/features/sys_menu/service"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/utils/regular"
|
"be.ems/lib/core/utils/regular"
|
||||||
"ems.agt/lib/core/vo/result"
|
"be.ems/lib/core/vo/result"
|
||||||
"ems.agt/lib/midware"
|
"be.ems/lib/midware"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
srcConfig "ems.agt/src/framework/config"
|
srcConfig "be.ems/src/framework/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 菜单接口添加到路由
|
// 菜单接口添加到路由
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/features/sys_menu/consts"
|
"be.ems/features/sys_menu/consts"
|
||||||
"ems.agt/features/sys_menu/model"
|
"be.ems/features/sys_menu/model"
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化数据层 RepoSysMenu 结构体
|
// 实例化数据层 RepoSysMenu 结构体
|
||||||
@@ -469,11 +469,7 @@ func (r *RepoSysMenu) CheckUniqueMenu(sysMenu model.SysMenu) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/features/sys_menu/consts"
|
"be.ems/features/sys_menu/consts"
|
||||||
"ems.agt/features/sys_menu/model"
|
"be.ems/features/sys_menu/model"
|
||||||
sysRoleService "ems.agt/features/sys_role/service"
|
sysRoleService "be.ems/features/sys_role/service"
|
||||||
sysrolemenu "ems.agt/features/sys_role_menu"
|
sysrolemenu "be.ems/features/sys_role_menu"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/core/utils/regular"
|
"be.ems/lib/core/utils/regular"
|
||||||
"ems.agt/lib/core/vo"
|
"be.ems/lib/core/vo"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化服务层 ServiceSysMenu 结构体
|
// 实例化服务层 ServiceSysMenu 结构体
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/features/sys_role/model"
|
"be.ems/features/sys_role/model"
|
||||||
"ems.agt/features/sys_role/service"
|
"be.ems/features/sys_role/service"
|
||||||
userService "ems.agt/features/sys_user/service"
|
userService "be.ems/features/sys_user/service"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/core/vo/result"
|
"be.ems/lib/core/vo/result"
|
||||||
"ems.agt/lib/midware"
|
"be.ems/lib/midware"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 角色接口添加到路由
|
// 角色接口添加到路由
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/features/sys_role/model"
|
"be.ems/features/sys_role/model"
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/date"
|
"be.ems/lib/core/utils/date"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化数据层 RepoSysRole 结构体
|
// 实例化数据层 RepoSysRole 结构体
|
||||||
@@ -356,11 +356,7 @@ func (r *RepoSysRole) CheckUniqueRole(sysRole model.SysRole) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"ems.agt/features/sys_role/model"
|
"be.ems/features/sys_role/model"
|
||||||
sysrolemenu "ems.agt/features/sys_role_menu"
|
sysrolemenu "be.ems/features/sys_role_menu"
|
||||||
sysuserrole "ems.agt/features/sys_user_role"
|
sysuserrole "be.ems/features/sys_user_role"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化服务层 ServiceSysRole 结构体
|
// 实例化服务层 ServiceSysRole 结构体
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化数据层 RepoSysRoleMenu 结构体
|
// 实例化数据层 RepoSysRoleMenu 结构体
|
||||||
|
|||||||
@@ -5,17 +5,17 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
sysRoleModel "ems.agt/features/sys_role/model"
|
sysRoleModel "be.ems/features/sys_role/model"
|
||||||
sysRoleService "ems.agt/features/sys_role/service"
|
sysRoleService "be.ems/features/sys_role/service"
|
||||||
sysUserModel "ems.agt/features/sys_user/model"
|
sysUserModel "be.ems/features/sys_user/model"
|
||||||
"ems.agt/features/sys_user/service"
|
"be.ems/features/sys_user/service"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/core/vo/result"
|
"be.ems/lib/core/vo/result"
|
||||||
"ems.agt/lib/midware"
|
"be.ems/lib/midware"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
srcConfig "ems.agt/src/framework/config"
|
srcConfig "be.ems/src/framework/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 用户接口添加到路由
|
// 用户接口添加到路由
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import "ems.agt/features/sys_role/model"
|
import "be.ems/features/sys_role/model"
|
||||||
|
|
||||||
type SysUser struct {
|
type SysUser struct {
|
||||||
Id string `json:"id" xorm:"pk 'id' autoincr"`
|
Id string `json:"id" xorm:"pk 'id' autoincr"`
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
sysRoleModel "ems.agt/features/sys_role/model"
|
sysRoleModel "be.ems/features/sys_role/model"
|
||||||
sysUserModel "ems.agt/features/sys_user/model"
|
sysUserModel "be.ems/features/sys_user/model"
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/date"
|
"be.ems/lib/core/utils/date"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/src/framework/utils/crypto"
|
"be.ems/src/framework/utils/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化数据层 RepoSysUser 结构体
|
// 实例化数据层 RepoSysUser 结构体
|
||||||
@@ -572,11 +572,7 @@ func (r *RepoSysUser) CheckUniqueUser(sysUser sysUserModel.SysUser) string {
|
|||||||
log.Errorf("query err %v", err)
|
log.Errorf("query err %v", err)
|
||||||
}
|
}
|
||||||
if len(results) > 0 {
|
if len(results) > 0 {
|
||||||
v, ok := results[0]["str"].(string)
|
return fmt.Sprint(results[0]["str"])
|
||||||
if ok {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
sysUserModel "ems.agt/features/sys_user/model"
|
sysUserModel "be.ems/features/sys_user/model"
|
||||||
sysuserrole "ems.agt/features/sys_user_role"
|
sysuserrole "be.ems/features/sys_user_role"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化服务层 ServiceSysUser 结构体
|
// 实例化服务层 ServiceSysUser 结构体
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化数据层 RepoSysUserRole 结构体
|
// 实例化数据层 RepoSysUserRole 结构体
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/core/conf"
|
"be.ems/lib/core/conf"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/vo/result"
|
"be.ems/lib/core/vo/result"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
"ems.agt/src/framework/cmd"
|
"be.ems/src/framework/utils/cmd"
|
||||||
"ems.agt/src/framework/utils/ssh"
|
"be.ems/src/framework/utils/ssh"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ import (
|
|||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/run"
|
"be.ems/lib/run"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -7,20 +7,20 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/features/udm_user/model"
|
"be.ems/features/udm_user/model"
|
||||||
"ems.agt/features/udm_user/service"
|
"be.ems/features/udm_user/service"
|
||||||
"ems.agt/lib/core/conf"
|
"be.ems/lib/core/conf"
|
||||||
mmlclient "ems.agt/lib/core/mml_client"
|
mmlclient "be.ems/lib/core/mml_client"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/vo/result"
|
"be.ems/lib/core/vo/result"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/midware"
|
"be.ems/lib/midware"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
"ems.agt/src/framework/middleware/collectlogs"
|
"be.ems/src/framework/middleware/collectlogs"
|
||||||
"ems.agt/src/framework/utils/file"
|
"be.ems/src/framework/utils/file"
|
||||||
"ems.agt/src/framework/utils/ssh"
|
"be.ems/src/framework/utils/ssh"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UDM 用户信息接口添加到路由
|
// UDM 用户信息接口添加到路由
|
||||||
@@ -516,7 +516,7 @@ func (s *UdmUserApi) UdmAuthUserExport(w http.ResponseWriter, r *http.Request) {
|
|||||||
data = append(data, []string{v.Imsi, v.Ki, v.AlgoIndex, v.Amf, v.Opc})
|
data = append(data, []string{v.Imsi, v.Ki, v.AlgoIndex, v.Amf, v.Opc})
|
||||||
}
|
}
|
||||||
// 输出到文件
|
// 输出到文件
|
||||||
err := file.WriterCSVFile(data, filePath)
|
err := file.WriterFileCSV(data, filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.JSON(w, 200, result.ErrMsg(err.Error()))
|
ctx.JSON(w, 200, result.ErrMsg(err.Error()))
|
||||||
return
|
return
|
||||||
@@ -530,7 +530,7 @@ func (s *UdmUserApi) UdmAuthUserExport(w http.ResponseWriter, r *http.Request) {
|
|||||||
data = append(data, []string{v.Imsi, v.Ki, v.AlgoIndex, v.Amf, v.Opc})
|
data = append(data, []string{v.Imsi, v.Ki, v.AlgoIndex, v.Amf, v.Opc})
|
||||||
}
|
}
|
||||||
// 输出到文件
|
// 输出到文件
|
||||||
err = file.WriterTxtFile(data, filePath)
|
err = file.WriterFileTXT(data, ",", filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.JSON(w, 200, result.ErrMsg(err.Error()))
|
ctx.JSON(w, 200, result.ErrMsg(err.Error()))
|
||||||
return
|
return
|
||||||
@@ -597,12 +597,12 @@ func (s *UdmUserApi) UdmAuthUserImport(w http.ResponseWriter, r *http.Request) {
|
|||||||
// 命令ok时
|
// 命令ok时
|
||||||
if strings.Contains(data, "ok") {
|
if strings.Contains(data, "ok") {
|
||||||
if strings.HasSuffix(fileHeader.Filename, ".csv") {
|
if strings.HasSuffix(fileHeader.Filename, ".csv") {
|
||||||
data := file.ReadCSVFile(localPath)
|
data := file.ReadFileCSV(localPath)
|
||||||
neId = ""
|
neId = ""
|
||||||
go s.authUser.InsertCSV(neId, data)
|
go s.authUser.InsertCSV(neId, data)
|
||||||
}
|
}
|
||||||
if strings.HasSuffix(fileHeader.Filename, ".txt") {
|
if strings.HasSuffix(fileHeader.Filename, ".txt") {
|
||||||
data := file.ReadTxtFile(localPath)
|
data := file.ReadFileTXT(",", localPath)
|
||||||
neId = ""
|
neId = ""
|
||||||
go s.authUser.InsertTxt(neId, data)
|
go s.authUser.InsertTxt(neId, data)
|
||||||
}
|
}
|
||||||
@@ -1116,7 +1116,7 @@ func (s *UdmUserApi) UdmSubUserExport(w http.ResponseWriter, r *http.Request) {
|
|||||||
data = append(data, []string{v.Imsi, v.Msisdn, v.Ambr, v.Nssai, v.Arfb, v.Sar, v.Rat, v.Cn, v.SmfSel, v.SmData, epsDat})
|
data = append(data, []string{v.Imsi, v.Msisdn, v.Ambr, v.Nssai, v.Arfb, v.Sar, v.Rat, v.Cn, v.SmfSel, v.SmData, epsDat})
|
||||||
}
|
}
|
||||||
// 输出到文件
|
// 输出到文件
|
||||||
err = file.WriterCSVFile(data, filePath)
|
err = file.WriterFileCSV(data, filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.JSON(w, 200, result.ErrMsg(err.Error()))
|
ctx.JSON(w, 200, result.ErrMsg(err.Error()))
|
||||||
return
|
return
|
||||||
@@ -1131,7 +1131,7 @@ func (s *UdmUserApi) UdmSubUserExport(w http.ResponseWriter, r *http.Request) {
|
|||||||
data = append(data, []string{v.Imsi, v.Msisdn, v.Ambr, v.Nssai, v.Arfb, v.Sar, v.Rat, v.Cn, v.SmfSel, v.SmData, epsDat})
|
data = append(data, []string{v.Imsi, v.Msisdn, v.Ambr, v.Nssai, v.Arfb, v.Sar, v.Rat, v.Cn, v.SmfSel, v.SmData, epsDat})
|
||||||
}
|
}
|
||||||
// 输出到文件
|
// 输出到文件
|
||||||
err = file.WriterTxtFile(data, filePath)
|
err = file.WriterFileTXT(data, ",", filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.JSON(w, 200, result.ErrMsg(err.Error()))
|
ctx.JSON(w, 200, result.ErrMsg(err.Error()))
|
||||||
return
|
return
|
||||||
@@ -1197,12 +1197,12 @@ func (s *UdmUserApi) UdmSubUserImport(w http.ResponseWriter, r *http.Request) {
|
|||||||
// 命令ok时
|
// 命令ok时
|
||||||
if strings.Contains(data, "ok") {
|
if strings.Contains(data, "ok") {
|
||||||
if strings.HasSuffix(fileHeader.Filename, ".csv") {
|
if strings.HasSuffix(fileHeader.Filename, ".csv") {
|
||||||
data := file.ReadCSVFile(localPath)
|
data := file.ReadFileCSV(localPath)
|
||||||
neId = ""
|
neId = ""
|
||||||
go s.subUser.InsertCSV(neId, data)
|
go s.subUser.InsertCSV(neId, data)
|
||||||
}
|
}
|
||||||
if strings.HasSuffix(fileHeader.Filename, ".txt") {
|
if strings.HasSuffix(fileHeader.Filename, ".txt") {
|
||||||
data := file.ReadTxtFile(localPath)
|
data := file.ReadFileTXT(",", localPath)
|
||||||
neId = ""
|
neId = ""
|
||||||
go s.subUser.InsertTxt(neId, data)
|
go s.subUser.InsertTxt(neId, data)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/features/udm_user/model"
|
"be.ems/features/udm_user/model"
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化数据层 RepoUdmAuthUser 结构体
|
// 实例化数据层 RepoUdmAuthUser 结构体
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/features/udm_user/model"
|
"be.ems/features/udm_user/model"
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化数据层 RepoUdmSubUser 结构体
|
// 实例化数据层 RepoUdmSubUser 结构体
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package service
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/features/udm_user/model"
|
"be.ems/features/udm_user/model"
|
||||||
"ems.agt/src/framework/redis"
|
"be.ems/src/framework/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// phoneImsiList 获取所有imsi
|
// phoneImsiList 获取所有imsi
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"ems.agt/features/udm_user/model"
|
"be.ems/features/udm_user/model"
|
||||||
"ems.agt/features/udm_user/repo"
|
"be.ems/features/udm_user/repo"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化服务层 ServiceUdmAuthUser 结构体
|
// 实例化服务层 ServiceUdmAuthUser 结构体
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/features/udm_user/model"
|
"be.ems/features/udm_user/model"
|
||||||
"ems.agt/features/udm_user/repo"
|
"be.ems/features/udm_user/repo"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 实例化服务层 ServiceUdmSubUser 结构体
|
// 实例化服务层 ServiceUdmSubUser 结构体
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
tokenConst "ems.agt/src/framework/constants/token"
|
tokenConst "be.ems/src/framework/constants/token"
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
@@ -354,6 +354,7 @@ func PostPCFUserInfo(w http.ResponseWriter, r *http.Request) {
|
|||||||
services.ResponseNotFound404UriNotExist(w, r)
|
services.ResponseNotFound404UriNotExist(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
client.SetTimeout(1 * time.Minute)
|
||||||
resp, err := client.R().
|
resp, err := client.R().
|
||||||
EnableTrace().
|
EnableTrace().
|
||||||
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
||||||
@@ -426,6 +427,7 @@ func PutPCFUserInfo(w http.ResponseWriter, r *http.Request) {
|
|||||||
services.ResponseNotFound404UriNotExist(w, r)
|
services.ResponseNotFound404UriNotExist(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
client.SetTimeout(1 * time.Minute)
|
||||||
resp, err := client.R().
|
resp, err := client.R().
|
||||||
EnableTrace().
|
EnableTrace().
|
||||||
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
||||||
@@ -504,9 +506,11 @@ func DeletePCFUserInfo(w http.ResponseWriter, r *http.Request) {
|
|||||||
services.ResponseInternalServerError500ProcessError(w, err)
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
var response services.MapResponse
|
w.WriteHeader(resp.StatusCode())
|
||||||
_ = json.Unmarshal(resp.Body(), &response)
|
w.Write(resp.Body())
|
||||||
services.ResponseWithJson(w, resp.StatusCode(), response)
|
// var response services.MapResponse
|
||||||
|
// _ = json.Unmarshal(resp.Body(), &response)
|
||||||
|
// services.ResponseWithJson(w, resp.StatusCode(), response)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -761,6 +765,7 @@ func GetUEInfoFileExportNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
log.Debug("requestURI2NF:", requestURI2NF)
|
log.Debug("requestURI2NF:", requestURI2NF)
|
||||||
|
|
||||||
|
client.SetTimeout(3 * time.Minute)
|
||||||
resp, err := client.R().
|
resp, err := client.R().
|
||||||
EnableTrace().
|
EnableTrace().
|
||||||
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
||||||
|
|||||||
62
go.mod
62
go.mod
@@ -1,39 +1,36 @@
|
|||||||
module ems.agt
|
module be.ems
|
||||||
|
|
||||||
go 1.21
|
go 1.21
|
||||||
|
|
||||||
toolchain go1.21.0
|
toolchain go1.21.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/chzyer/readline v1.5.1
|
||||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||||
github.com/dlclark/regexp2 v1.10.0
|
github.com/dlclark/regexp2 v1.10.0
|
||||||
github.com/gin-gonic/gin v1.9.1
|
github.com/gin-gonic/gin v1.9.1
|
||||||
github.com/go-admin-team/go-admin-core/sdk v1.5.1
|
github.com/go-gsm/ucp v0.0.1
|
||||||
github.com/go-resty/resty/v2 v2.7.0
|
github.com/go-resty/resty/v2 v2.7.0
|
||||||
github.com/go-sql-driver/mysql v1.7.1
|
github.com/go-sql-driver/mysql v1.7.1
|
||||||
github.com/golang-jwt/jwt/v5 v5.0.0
|
github.com/golang-jwt/jwt/v5 v5.0.0
|
||||||
github.com/gorilla/mux v1.8.0
|
github.com/gorilla/mux v1.8.0
|
||||||
github.com/gorilla/websocket v1.5.0
|
github.com/gorilla/websocket v1.5.0
|
||||||
github.com/gosnmp/gosnmp v1.35.0
|
github.com/gosnmp/gosnmp v1.35.0
|
||||||
github.com/jasonlvhit/gocron v0.0.1
|
|
||||||
github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f
|
github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f
|
||||||
|
github.com/linxGnu/gosmpp v0.2.0
|
||||||
github.com/matoous/go-nanoid/v2 v2.0.0
|
github.com/matoous/go-nanoid/v2 v2.0.0
|
||||||
github.com/metaleap/go-xsd v0.0.0-20180330193350-61f7638f502f
|
|
||||||
github.com/mojocn/base64Captcha v1.3.5
|
github.com/mojocn/base64Captcha v1.3.5
|
||||||
github.com/mssola/user_agent v0.6.0
|
github.com/mssola/user_agent v0.6.0
|
||||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||||
|
github.com/prometheus-community/pro-bing v0.4.0
|
||||||
github.com/redis/go-redis/v9 v9.1.0
|
github.com/redis/go-redis/v9 v9.1.0
|
||||||
github.com/reiver/go-telnet v0.0.0-20180421082511-9ff0b2ab096e
|
|
||||||
github.com/robfig/cron/v3 v3.0.1
|
github.com/robfig/cron/v3 v3.0.1
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible
|
github.com/shirou/gopsutil v3.21.11+incompatible
|
||||||
github.com/shirou/gopsutil/v3 v3.23.7
|
github.com/shirou/gopsutil/v3 v3.23.7
|
||||||
github.com/spf13/afero v1.9.5
|
github.com/spf13/afero v1.9.5
|
||||||
github.com/spf13/viper v1.16.0
|
github.com/spf13/viper v1.16.0
|
||||||
github.com/xuri/excelize/v2 v2.7.1
|
github.com/xuri/excelize/v2 v2.7.1
|
||||||
github.com/xuri/xgen v0.0.0-20230702070049-db840e1a4605
|
golang.org/x/crypto v0.19.0
|
||||||
github.com/ziutek/telnet v0.0.0-20180329124119-c3b780dc415b
|
|
||||||
golang.org/x/crypto v0.16.0
|
|
||||||
golang.org/x/term v0.15.0
|
|
||||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
|
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
gorm.io/driver/mysql v1.5.1
|
gorm.io/driver/mysql v1.5.1
|
||||||
@@ -42,74 +39,52 @@ require (
|
|||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/creack/pty v1.1.9 // indirect
|
github.com/go-gsm/charset v1.0.0 // indirect
|
||||||
github.com/go-admin-team/go-admin-core v1.3.12-0.20221121065133-27b7dbe27a8f // indirect
|
github.com/mattn/go-sqlite3 v1.14.15 // indirect
|
||||||
|
github.com/onsi/ginkgo v1.16.5 // indirect
|
||||||
|
github.com/onsi/gomega v1.21.1 // indirect
|
||||||
|
golang.org/x/sync v0.6.0 // indirect
|
||||||
|
golang.org/x/time v0.1.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
|
|
||||||
github.com/bsm/redislock v0.8.2 // indirect
|
|
||||||
github.com/bytedance/go-tagexpr/v2 v2.7.12 // indirect
|
|
||||||
github.com/bytedance/sonic v1.9.1 // indirect
|
github.com/bytedance/sonic v1.9.1 // indirect
|
||||||
github.com/casbin/casbin/v2 v2.54.0 // indirect
|
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||||
github.com/chanxuehong/rand v0.0.0-20201110082127-2f19a1bdd973 // indirect
|
|
||||||
github.com/chanxuehong/wechat v0.0.0-20201110083048-0180211b69fd // indirect
|
|
||||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
|
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||||
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect
|
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect
|
||||||
github.com/fatih/color v1.13.0 // indirect
|
|
||||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||||
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
|
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
|
||||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||||
github.com/git-chglog/git-chglog v0.0.0-20190611050339-63a4e637021f // indirect
|
|
||||||
github.com/go-admin-team/redisqueue/v2 v2.0.0-20221119141731-97c556b0d5b7 // indirect
|
|
||||||
github.com/go-forks/fsnotify v1.4.7 // indirect
|
|
||||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||||
github.com/go-playground/locales v0.14.1 // indirect
|
github.com/go-playground/locales v0.14.1 // indirect
|
||||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
github.com/go-playground/validator/v10 v10.14.0 // indirect
|
github.com/go-playground/validator/v10 v10.14.0 // indirect
|
||||||
github.com/go-redis/redis/v8 v8.11.5 // indirect
|
github.com/goccy/go-json v0.10.2
|
||||||
github.com/go-redis/redis/v9 v9.0.0-rc.1 // indirect
|
|
||||||
github.com/goccy/go-json v0.10.2 // indirect
|
|
||||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
|
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
|
||||||
github.com/golang/protobuf v1.5.3 // indirect
|
|
||||||
github.com/golang/snappy v0.0.4 // indirect
|
github.com/golang/snappy v0.0.4 // indirect
|
||||||
github.com/google/uuid v1.3.0 // indirect
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||||
github.com/henrylee2cn/ameda v1.4.10 // indirect
|
|
||||||
github.com/henrylee2cn/goutil v0.0.0-20210127050712-89660552f6f8 // indirect
|
|
||||||
github.com/imdario/mergo v0.3.9 // indirect
|
|
||||||
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 // indirect
|
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 // indirect
|
||||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||||
github.com/jinzhu/now v1.1.5 // indirect
|
github.com/jinzhu/now v1.1.5 // indirect
|
||||||
github.com/json-iterator/go v1.1.12 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
|
||||||
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
|
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
|
||||||
github.com/leodido/go-urn v1.2.4 // indirect
|
github.com/leodido/go-urn v1.2.4 // indirect
|
||||||
github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570 // indirect
|
github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570 // indirect
|
||||||
github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 // indirect
|
github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 // indirect
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
|
||||||
github.com/magiconair/properties v1.8.7 // indirect
|
github.com/magiconair/properties v1.8.7 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.12 // indirect
|
|
||||||
github.com/mattn/go-isatty v0.0.19 // indirect
|
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||||
github.com/mattn/goveralls v0.0.2 // indirect
|
|
||||||
github.com/metaleap/go-util v0.0.0-20180330192724-a09253046f73 // indirect
|
|
||||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
|
||||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||||
github.com/nsqio/go-nsq v1.0.8 // indirect
|
|
||||||
github.com/nyaruka/phonenumbers v1.0.55 // indirect
|
|
||||||
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
|
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
||||||
github.com/reiver/go-oi v1.0.0 // indirect
|
|
||||||
github.com/richardlehane/mscfb v1.0.4 // indirect
|
github.com/richardlehane/mscfb v1.0.4 // indirect
|
||||||
github.com/richardlehane/msoleps v1.0.3 // indirect
|
github.com/richardlehane/msoleps v1.0.3 // indirect
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
|
||||||
github.com/shoenig/go-m1cpu v0.1.6 // indirect
|
github.com/shoenig/go-m1cpu v0.1.6 // indirect
|
||||||
github.com/spf13/cast v1.5.1 // indirect
|
github.com/spf13/cast v1.5.1 // indirect
|
||||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||||
@@ -119,25 +94,20 @@ require (
|
|||||||
github.com/tebeka/strftime v0.1.5 // indirect
|
github.com/tebeka/strftime v0.1.5 // indirect
|
||||||
github.com/tklauser/go-sysconf v0.3.11 // indirect
|
github.com/tklauser/go-sysconf v0.3.11 // indirect
|
||||||
github.com/tklauser/numcpus v0.6.0 // indirect
|
github.com/tklauser/numcpus v0.6.0 // indirect
|
||||||
github.com/tsuyoshiwada/go-gitcmd v0.0.0-20180205145712-5f1f5f9475df // indirect
|
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||||
github.com/ugorji/go/codec v1.2.11 // indirect
|
github.com/ugorji/go/codec v1.2.11 // indirect
|
||||||
github.com/urfave/cli v1.22.1 // indirect
|
|
||||||
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 // indirect
|
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 // indirect
|
||||||
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
|
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
|
||||||
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
||||||
golang.org/x/arch v0.3.0 // indirect
|
golang.org/x/arch v0.3.0 // indirect
|
||||||
golang.org/x/image v0.5.0 // indirect
|
golang.org/x/image v0.5.0 // indirect
|
||||||
golang.org/x/net v0.19.0
|
golang.org/x/net v0.21.0
|
||||||
golang.org/x/sys v0.15.0 // indirect
|
golang.org/x/sys v0.17.0 // indirect
|
||||||
golang.org/x/text v0.14.0
|
golang.org/x/text v0.14.0
|
||||||
golang.org/x/tools v0.16.1 // indirect
|
golang.org/x/tools v0.16.1 // indirect
|
||||||
google.golang.org/protobuf v1.30.0 // indirect
|
google.golang.org/protobuf v1.30.0 // indirect
|
||||||
gopkg.in/AlecAivazis/survey.v1 v1.8.5 // indirect
|
|
||||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
gopkg.in/kyokomi/emoji.v1 v1.5.1 // indirect
|
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
|
||||||
xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978 // indirect
|
xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
156
go.sum
156
go.sum
@@ -41,11 +41,8 @@ gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0p
|
|||||||
gitee.com/travelliu/dm v1.8.11192/go.mod h1:DHTzyhCrM843x9VdKVbZ+GKXGRbKM2sJ4LxihRxShkE=
|
gitee.com/travelliu/dm v1.8.11192/go.mod h1:DHTzyhCrM843x9VdKVbZ+GKXGRbKM2sJ4LxihRxShkE=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
|
|
||||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
||||||
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw=
|
|
||||||
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
|
|
||||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||||
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
|
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
|
||||||
@@ -71,33 +68,27 @@ github.com/bsm/ginkgo/v2 v2.9.5 h1:rtVBYPs3+TC5iLUVOis1B9tjLTup7Cj5IfzosKtvTJ0=
|
|||||||
github.com/bsm/ginkgo/v2 v2.9.5/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
|
github.com/bsm/ginkgo/v2 v2.9.5/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
|
||||||
github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
|
github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
|
||||||
github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
||||||
github.com/bsm/redislock v0.8.2 h1:W0aDRjt6FNmAZovbG2fPyjl1YZZdlqMkCKKCffJew1o=
|
|
||||||
github.com/bsm/redislock v0.8.2/go.mod h1:tC0JZxZCdJN4DCB31cGxgjgf/ye1R4LLNJQd5ecjg08=
|
|
||||||
github.com/bytedance/go-tagexpr/v2 v2.7.12 h1:qL2f0j11S8DHQsUWUA6aacLNBcbPTbNKuzVjaW4kF/M=
|
|
||||||
github.com/bytedance/go-tagexpr/v2 v2.7.12/go.mod h1:cKpo/rwg2Y5Njs8SX3FspMWEhAWCaF4xUr5LJYXibSU=
|
|
||||||
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
||||||
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
|
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
|
||||||
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
|
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
|
||||||
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
|
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
|
||||||
github.com/casbin/casbin/v2 v2.54.0 h1:NFQ3Xkw6rfbD/rwEHMVRHVP5gUxhNQKdcZCb53pwSrA=
|
|
||||||
github.com/casbin/casbin/v2 v2.54.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
|
|
||||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
||||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/chanxuehong/rand v0.0.0-20201110082127-2f19a1bdd973 h1:Js/7nHtkpvUW62passc9FOflXyLQDjSoYclkFeDdTEM=
|
|
||||||
github.com/chanxuehong/rand v0.0.0-20201110082127-2f19a1bdd973/go.mod h1:9+sJ9zvvkXC5sPjPEZM3Jpb9n2Q2VtcrGZly0UHYF5I=
|
|
||||||
github.com/chanxuehong/util v0.0.0-20200304121633-ca8141845b13/go.mod h1:XEYt99iTxMqkv+gW85JX/DdUINHUe43Sbe5AtqSaDAQ=
|
|
||||||
github.com/chanxuehong/wechat v0.0.0-20201110083048-0180211b69fd h1:TM3wjEWel4U31J72dlhnwCBqPC0+FA0Ejm2NCbn5a5U=
|
|
||||||
github.com/chanxuehong/wechat v0.0.0-20201110083048-0180211b69fd/go.mod h1:/dvhOIRCjjiZu6NV0QTTiMcc5XwoORbxfDSsRY2IfaM=
|
|
||||||
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
|
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
|
||||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
|
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
|
||||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
|
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
|
||||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||||
|
github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM=
|
||||||
|
github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ=
|
||||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||||
|
github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=
|
||||||
|
github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=
|
||||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||||
|
github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04=
|
||||||
|
github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=
|
||||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
||||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||||
@@ -112,11 +103,7 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7
|
|||||||
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
|
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
|
||||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||||
github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
|
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -143,8 +130,6 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
|
|||||||
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 h1:Ghm4eQYC0nEPnSJdVkTrXpu9KtoVCSo1hg7mtI7G9KU=
|
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 h1:Ghm4eQYC0nEPnSJdVkTrXpu9KtoVCSo1hg7mtI7G9KU=
|
||||||
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239/go.mod h1:Gdwt2ce0yfBxPvZrHkprdPPTTS3N5rwmLE8T22KBXlw=
|
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239/go.mod h1:Gdwt2ce0yfBxPvZrHkprdPPTTS3N5rwmLE8T22KBXlw=
|
||||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
|
||||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
|
||||||
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
|
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
|
||||||
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
|
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
|
||||||
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
|
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
|
||||||
@@ -160,19 +145,13 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE
|
|||||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||||
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
|
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
|
||||||
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
|
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
|
||||||
github.com/git-chglog/git-chglog v0.0.0-20190611050339-63a4e637021f h1:8l4Aw3Jmx0pLKYMkY+1b6yBPgE+rzRtA5T3vqFyI2Z8=
|
|
||||||
github.com/git-chglog/git-chglog v0.0.0-20190611050339-63a4e637021f/go.mod h1:Dcsy1kii/xFyNad5JqY/d0GO5mu91sungp5xotbm3Yk=
|
|
||||||
github.com/go-admin-team/go-admin-core v1.3.12-0.20221121065133-27b7dbe27a8f h1:2xHpluWqY/ZlYoUpOU8VwDponYSnukRDhkOr7rk3ffU=
|
|
||||||
github.com/go-admin-team/go-admin-core v1.3.12-0.20221121065133-27b7dbe27a8f/go.mod h1:a9/XW1rCChPLVJ3bST13hB6R8YfVjYeF0GYjb8If6Yg=
|
|
||||||
github.com/go-admin-team/go-admin-core/sdk v1.5.1 h1:U1VaXuMrMmeLiQyJipqnTxHE84vspaK++wkTWfYpcOI=
|
|
||||||
github.com/go-admin-team/go-admin-core/sdk v1.5.1/go.mod h1:yNoHmYZtGc1WFWZwhAop0sSyZhsrsSGqvje2yvClXjE=
|
|
||||||
github.com/go-admin-team/redisqueue/v2 v2.0.0-20221119141731-97c556b0d5b7 h1:p1cq6CN47zEbDt8EWBX3mOZpIa4zVwHCrXcy0NwD+So=
|
|
||||||
github.com/go-admin-team/redisqueue/v2 v2.0.0-20221119141731-97c556b0d5b7/go.mod h1:XGwBJD4aMmHSoJFPKs4vcW4Y5s+8MV1gHR+P0Uxe9Eg=
|
|
||||||
github.com/go-forks/fsnotify v1.4.7 h1:lyiU2Wqd4fNGCQDn9dZ4UxSiSFgeU1rM6yIfahk8haY=
|
|
||||||
github.com/go-forks/fsnotify v1.4.7/go.mod h1:AU8mot+GznW5+B4jRJHxKg/2EeO+jMORGRkKSxs0biw=
|
|
||||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||||
|
github.com/go-gsm/charset v1.0.0 h1:6k6LOKHtxgCPXE15X0unRewjOksyhmHBIp6x7qLQ6Ls=
|
||||||
|
github.com/go-gsm/charset v1.0.0/go.mod h1:sC8+2VpAM2sZDlxv11MxWIZiuf8MipOgM/hCYsRQRps=
|
||||||
|
github.com/go-gsm/ucp v0.0.1 h1:vM5ly5iRNGMGGiVx4K3+puF9AhpwkC76BkiV9LFv0bw=
|
||||||
|
github.com/go-gsm/ucp v0.0.1/go.mod h1:58/PrXWFcmaQyZ5p/Dp2YiCnhlVx0HdKXFGmqiVO/mI=
|
||||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||||
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
|
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
|
||||||
@@ -189,11 +168,6 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
|
|||||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||||
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
|
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
|
||||||
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
|
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
|
||||||
github.com/go-redis/redis v6.15.5+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
|
||||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
|
||||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
|
||||||
github.com/go-redis/redis/v9 v9.0.0-rc.1 h1:/+bS+yeUnanqAbuD3QwlejzQZ+4eqgfUtFTG4b+QnXs=
|
|
||||||
github.com/go-redis/redis/v9 v9.0.0-rc.1/go.mod h1:8et+z03j0l8N+DvsVnclzjf3Dl/pFHgRk+2Ct1qw66A=
|
|
||||||
github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
|
github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
|
||||||
github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
|
github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
|
||||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||||
@@ -212,7 +186,6 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG
|
|||||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
|
||||||
github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE=
|
github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE=
|
||||||
github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||||
@@ -230,8 +203,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
|
|||||||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||||
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
|
|
||||||
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
|
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
@@ -247,9 +218,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
|
|||||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
|
||||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
|
||||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
|
||||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||||
@@ -284,16 +252,15 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
|
|||||||
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
|
||||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
|
||||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
|
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
|
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||||
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||||
@@ -330,20 +297,10 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
|
|||||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
||||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
||||||
github.com/henrylee2cn/ameda v1.4.8/go.mod h1:liZulR8DgHxdK+MEwvZIylGnmcjzQ6N6f2PlWe7nEO4=
|
|
||||||
github.com/henrylee2cn/ameda v1.4.10 h1:JdvI2Ekq7tapdPsuhrc4CaFiqw6QXFvZIULWJgQyCAk=
|
|
||||||
github.com/henrylee2cn/ameda v1.4.10/go.mod h1:liZulR8DgHxdK+MEwvZIylGnmcjzQ6N6f2PlWe7nEO4=
|
|
||||||
github.com/henrylee2cn/goutil v0.0.0-20210127050712-89660552f6f8 h1:yE9ULgp02BhYIrO6sdV/FPe0xQM6fNHkVQW2IAymfM0=
|
|
||||||
github.com/henrylee2cn/goutil v0.0.0-20210127050712-89660552f6f8/go.mod h1:Nhe/DM3671a5udlv2AdV2ni/MZzgfv2qrPL5nIi3EGQ=
|
|
||||||
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 h1:WlZsjVhE8Af9IcZDGgJGQpNflI3+MJSBhsgT5PCtzBQ=
|
|
||||||
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A=
|
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||||
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
|
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
|
||||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||||
github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
|
||||||
github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg=
|
|
||||||
github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
|
||||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
||||||
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
|
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
|
||||||
@@ -393,8 +350,6 @@ github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0f
|
|||||||
github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||||
github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||||
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||||
github.com/jasonlvhit/gocron v0.0.1 h1:qTt5qF3b3srDjeOIR4Le1LfeyvoYzJlYpqvG7tJX5YU=
|
|
||||||
github.com/jasonlvhit/gocron v0.0.1/go.mod h1:k9a3TV8VcU73XZxfVHCHWMWF9SOqgoku0/QlY2yvlA4=
|
|
||||||
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 h1:IPJ3dvxmJ4uczJe5YQdrYB16oTJlGSC/OyZDqUk9xX4=
|
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 h1:IPJ3dvxmJ4uczJe5YQdrYB16oTJlGSC/OyZDqUk9xX4=
|
||||||
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag=
|
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag=
|
||||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||||
@@ -411,13 +366,11 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
|
|||||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
|
||||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||||
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
|
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
|
||||||
@@ -431,7 +384,6 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
|
|||||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=
|
|
||||||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
|
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
@@ -451,6 +403,8 @@ github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
|||||||
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||||
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
|
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
|
||||||
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
|
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
|
||||||
|
github.com/linxGnu/gosmpp v0.2.0 h1:GVZdnO8pUsOrhFF092RQ2II+6RW5F2kLDlbCH+NBp7s=
|
||||||
|
github.com/linxGnu/gosmpp v0.2.0/go.mod h1:UpJwpDhL0yq05gUqaLwZ8+Qc7qy1pl35EjxWtRLW6ks=
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
||||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
||||||
@@ -463,9 +417,6 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO
|
|||||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
|
||||||
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
|
|
||||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
|
||||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||||
@@ -473,22 +424,13 @@ github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd
|
|||||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||||
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
|
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
|
||||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
|
||||||
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
||||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||||
github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||||
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI=
|
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI=
|
||||||
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
||||||
github.com/mattn/goveralls v0.0.2 h1:7eJB6EqsPhRVxvwEXGnqdO2sJI0PTsrWoTMXEk9/OQc=
|
|
||||||
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
|
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||||
github.com/metaleap/go-util v0.0.0-20180330192724-a09253046f73 h1:4vKVhAdype/dejZjdQZZXVTKLz8mD0oakKz128L+IFQ=
|
|
||||||
github.com/metaleap/go-util v0.0.0-20180330192724-a09253046f73/go.mod h1:l71/5fppWP5A6nqhcxz6wQAYok6pr/vM2+KHIy50/LY=
|
|
||||||
github.com/metaleap/go-xsd v0.0.0-20180330193350-61f7638f502f h1:eeJGcYszuvOpmuJxeq57LaOO8mJurfjpOHJJMfQSD0s=
|
|
||||||
github.com/metaleap/go-xsd v0.0.0-20180330193350-61f7638f502f/go.mod h1:WK3zEKtwVd/v+NM3lh1ZE6MdDfHsdOFFOD5Ezi4Hutg=
|
|
||||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
|
|
||||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
|
||||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
@@ -520,30 +462,20 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE
|
|||||||
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||||
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||||
github.com/nsqio/go-nsq v1.0.8 h1:3L2F8tNLlwXXlp2slDUrUWSBn2O3nMh8R1/KEDFTHPk=
|
|
||||||
github.com/nsqio/go-nsq v1.0.8/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY=
|
|
||||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||||
github.com/nyaruka/phonenumbers v1.0.55 h1:bj0nTO88Y68KeUQ/n3Lo2KgK7lM1hF7L9NFuwcCl3yg=
|
|
||||||
github.com/nyaruka/phonenumbers v1.0.55/go.mod h1:sDaTZ/KPX5f8qyV9qN+hIm+4ZBARJrupC6LuhshJq1U=
|
|
||||||
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
|
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
|
||||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
|
||||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
|
||||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
|
||||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
|
||||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
|
||||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
|
||||||
github.com/onsi/gomega v1.21.1 h1:OB/euWYIExnPBohllTicTHmGTrMaqJ67nIu80j0/uEM=
|
github.com/onsi/gomega v1.21.1 h1:OB/euWYIExnPBohllTicTHmGTrMaqJ67nIu80j0/uEM=
|
||||||
github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
|
github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
|
||||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
|
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
|
||||||
@@ -559,7 +491,6 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw
|
|||||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||||
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
|
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
|
||||||
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
||||||
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
|
|
||||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||||
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
|
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
|
||||||
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
|
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
|
||||||
@@ -577,6 +508,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
|
|||||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
|
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
|
||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||||
|
github.com/prometheus-community/pro-bing v0.4.0 h1:YMbv+i08gQz97OZZBwLyvmmQEEzyfyrrjEaAchdy3R4=
|
||||||
|
github.com/prometheus-community/pro-bing v0.4.0/go.mod h1:b7wRYZtCcPmt4Sz319BykUU241rWLe1VFXyiyWK/dH4=
|
||||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
||||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||||
@@ -596,10 +529,6 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx
|
|||||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||||
github.com/redis/go-redis/v9 v9.1.0 h1:137FnGdk+EQdCbye1FW+qOEcY5S+SpY9T0NiuqvtfMY=
|
github.com/redis/go-redis/v9 v9.1.0 h1:137FnGdk+EQdCbye1FW+qOEcY5S+SpY9T0NiuqvtfMY=
|
||||||
github.com/redis/go-redis/v9 v9.1.0/go.mod h1:urWj3He21Dj5k4TK1y59xH8Uj6ATueP8AH1cY3lZl4c=
|
github.com/redis/go-redis/v9 v9.1.0/go.mod h1:urWj3He21Dj5k4TK1y59xH8Uj6ATueP8AH1cY3lZl4c=
|
||||||
github.com/reiver/go-oi v1.0.0 h1:nvECWD7LF+vOs8leNGV/ww+F2iZKf3EYjYZ527turzM=
|
|
||||||
github.com/reiver/go-oi v1.0.0/go.mod h1:RrDBct90BAhoDTxB1fenZwfykqeGvhI6LsNfStJoEkI=
|
|
||||||
github.com/reiver/go-telnet v0.0.0-20180421082511-9ff0b2ab096e h1:quuzZLi72kkJjl+f5AQ93FMcadG19WkS7MO6TXFOSas=
|
|
||||||
github.com/reiver/go-telnet v0.0.0-20180421082511-9ff0b2ab096e/go.mod h1:+5vNVvEWwEIx86DB9Ke/+a5wBI464eDRo3eF0LcfpWg=
|
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
|
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||||
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
|
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
|
||||||
@@ -617,8 +546,6 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
|||||||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
||||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
||||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
|
||||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||||
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
|
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
|
||||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||||
@@ -638,9 +565,7 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV
|
|||||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
|
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||||
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
|
|
||||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||||
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
|
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
|
||||||
@@ -664,7 +589,6 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
|||||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||||
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
@@ -684,22 +608,16 @@ github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFd
|
|||||||
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
|
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
|
||||||
github.com/tebeka/strftime v0.1.5 h1:1NQKN1NiQgkqd/2moD6ySP/5CoZQsKa1d3ZhJ44Jpmg=
|
github.com/tebeka/strftime v0.1.5 h1:1NQKN1NiQgkqd/2moD6ySP/5CoZQsKa1d3ZhJ44Jpmg=
|
||||||
github.com/tebeka/strftime v0.1.5/go.mod h1:29/OidkoWHdEKZqzyDLUyC+LmgDgdHo4WAFCDT7D/Ig=
|
github.com/tebeka/strftime v0.1.5/go.mod h1:29/OidkoWHdEKZqzyDLUyC+LmgDgdHo4WAFCDT7D/Ig=
|
||||||
github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=
|
|
||||||
github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
|
|
||||||
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
|
|
||||||
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
|
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
|
||||||
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
|
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
|
||||||
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
|
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
|
||||||
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
|
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
|
||||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||||
github.com/tsuyoshiwada/go-gitcmd v0.0.0-20180205145712-5f1f5f9475df h1:Y2l28Jr3vOEeYtxfVbMtVfOdAwuUqWaP9fvNKiBVeXY=
|
|
||||||
github.com/tsuyoshiwada/go-gitcmd v0.0.0-20180205145712-5f1f5f9475df/go.mod h1:pnyouUty/nBr/zm3GYwTIt+qFTLWbdjeLjZmJdzJOu8=
|
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||||
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
||||||
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||||
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
|
|
||||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||||
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 h1:6932x8ltq1w4utjmfMPVj09jdMlkY0aiA6+Skbtl3/c=
|
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 h1:6932x8ltq1w4utjmfMPVj09jdMlkY0aiA6+Skbtl3/c=
|
||||||
@@ -708,8 +626,6 @@ github.com/xuri/excelize/v2 v2.7.1 h1:gm8q0UCAyaTt3MEF5wWMjVdmthm2EHAWesGSKS9tdV
|
|||||||
github.com/xuri/excelize/v2 v2.7.1/go.mod h1:qc0+2j4TvAUrBw36ATtcTeC1VCM0fFdAXZOmcF4nTpY=
|
github.com/xuri/excelize/v2 v2.7.1/go.mod h1:qc0+2j4TvAUrBw36ATtcTeC1VCM0fFdAXZOmcF4nTpY=
|
||||||
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 h1:OAmKAfT06//esDdpi/DZ8Qsdt4+M5+ltca05dA5bG2M=
|
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 h1:OAmKAfT06//esDdpi/DZ8Qsdt4+M5+ltca05dA5bG2M=
|
||||||
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
|
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
|
||||||
github.com/xuri/xgen v0.0.0-20230702070049-db840e1a4605 h1:urU5p/tQOOUd9B0c6O+6aBk7udJI5HcN4VYmX2tMTcI=
|
|
||||||
github.com/xuri/xgen v0.0.0-20230702070049-db840e1a4605/go.mod h1:tBkmlRf8JH62H5fAW+BPFj0LNZWRmKglWTLFfpXhhbg=
|
|
||||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
@@ -719,8 +635,6 @@ github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFi
|
|||||||
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||||
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
|
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
|
||||||
github.com/ziutek/telnet v0.0.0-20180329124119-c3b780dc415b h1:VfPXB/wCGGt590QhD1bOpv2J/AmC/RJNTg/Q59HKSB0=
|
|
||||||
github.com/ziutek/telnet v0.0.0-20180329124119-c3b780dc415b/go.mod h1:IZpXDfkJ6tWD3PhBK5YzgQT+xJWh7OsdwiG8hA2MkO4=
|
|
||||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||||
@@ -747,7 +661,6 @@ golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
|
|||||||
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
||||||
@@ -766,8 +679,8 @@ golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5y
|
|||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
|
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
|
||||||
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
|
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||||
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||||
@@ -812,6 +725,7 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r
|
|||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
@@ -848,15 +762,13 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY
|
|||||||
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
|
||||||
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
|
||||||
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
|
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
|
||||||
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
|
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
|
||||||
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
|
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
@@ -878,7 +790,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20180606202747-9527bec2660b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||||
|
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@@ -936,11 +849,9 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
@@ -950,15 +861,15 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
|
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
||||||
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||||
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
|
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
|
||||||
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
|
golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
|
||||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
@@ -975,10 +886,11 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb
|
|||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
|
golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA=
|
||||||
|
golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
@@ -1140,11 +1052,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
|
|||||||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
|
||||||
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
|
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
|
||||||
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
gopkg.in/AlecAivazis/survey.v1 v1.8.5 h1:QoEEmn/d5BbuPIL2qvXwzJdttFFhRQFkaq+tEKb7SMI=
|
|
||||||
gopkg.in/AlecAivazis/survey.v1 v1.8.5/go.mod h1:iBNOmqKz/NUbZx3bA+4hAGLRC7fSK7tgtVDT4tB22XA=
|
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
|
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
|
||||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
|
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
|
||||||
@@ -1161,8 +1070,6 @@ gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkp
|
|||||||
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
|
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
|
||||||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
gopkg.in/kyokomi/emoji.v1 v1.5.1 h1:beetH5mWDMzFznJ+Qzd5KVHp79YKhVUMcdO8LpRLeGw=
|
|
||||||
gopkg.in/kyokomi/emoji.v1 v1.5.1/go.mod h1:N9AZ6hi1jHOPn34PsbpufQZUcKftSD7WgS2pgpmH4Lg=
|
|
||||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||||
@@ -1172,10 +1079,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw=
|
gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw=
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
sysMenuService "ems.agt/features/sys_menu/service"
|
sysMenuService "be.ems/features/sys_menu/service"
|
||||||
sysRoleService "ems.agt/features/sys_role/service"
|
sysRoleService "be.ems/features/sys_role/service"
|
||||||
"ems.agt/lib/core/cache"
|
"be.ems/lib/core/cache"
|
||||||
"ems.agt/lib/core/vo"
|
"be.ems/lib/core/vo"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
srcConfig "ems.agt/src/framework/config"
|
srcConfig "be.ems/src/framework/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 登录缓存用户信息
|
// 登录缓存用户信息
|
||||||
|
|||||||
@@ -1,201 +0,0 @@
|
|||||||
package cmd
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"os/exec"
|
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Exec(cmdStr string) (string, error) {
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
|
|
||||||
defer cancel()
|
|
||||||
cmd := exec.Command("bash", "-c", cmdStr)
|
|
||||||
var stdout, stderr bytes.Buffer
|
|
||||||
cmd.Stdout = &stdout
|
|
||||||
cmd.Stderr = &stderr
|
|
||||||
err := cmd.Run()
|
|
||||||
if ctx.Err() == context.DeadlineExceeded {
|
|
||||||
return "", fmt.Errorf("errCmdTimeout %v", err)
|
|
||||||
}
|
|
||||||
if err != nil {
|
|
||||||
errMsg := ""
|
|
||||||
if len(stderr.String()) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("stderr: %s", stderr.String())
|
|
||||||
}
|
|
||||||
if len(stdout.String()) != 0 {
|
|
||||||
if len(errMsg) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("%s; stdout: %s", errMsg, stdout.String())
|
|
||||||
} else {
|
|
||||||
errMsg = fmt.Sprintf("stdout: %s", stdout.String())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return errMsg, err
|
|
||||||
}
|
|
||||||
return stdout.String(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func ExecWithTimeOut(cmdStr string, timeout time.Duration) (string, error) {
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
|
||||||
defer cancel()
|
|
||||||
cmd := exec.Command("bash", "-c", cmdStr)
|
|
||||||
var stdout, stderr bytes.Buffer
|
|
||||||
cmd.Stdout = &stdout
|
|
||||||
cmd.Stderr = &stderr
|
|
||||||
err := cmd.Run()
|
|
||||||
if ctx.Err() == context.DeadlineExceeded {
|
|
||||||
return "", fmt.Errorf("errCmdTimeout %v", err)
|
|
||||||
}
|
|
||||||
if err != nil {
|
|
||||||
errMsg := ""
|
|
||||||
if len(stderr.String()) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("stderr: %s", stderr.String())
|
|
||||||
}
|
|
||||||
if len(stdout.String()) != 0 {
|
|
||||||
if len(errMsg) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("%s; stdout: %s", errMsg, stdout.String())
|
|
||||||
} else {
|
|
||||||
errMsg = fmt.Sprintf("stdout: %s", stdout.String())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return errMsg, err
|
|
||||||
}
|
|
||||||
return stdout.String(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func ExecCronjobWithTimeOut(cmdStr string, workdir string, timeout time.Duration) (string, error) {
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
|
||||||
defer cancel()
|
|
||||||
cmd := exec.Command("bash", "-c", cmdStr)
|
|
||||||
cmd.Dir = workdir
|
|
||||||
var stdout, stderr bytes.Buffer
|
|
||||||
cmd.Stdout = &stdout
|
|
||||||
cmd.Stderr = &stderr
|
|
||||||
err := cmd.Run()
|
|
||||||
if ctx.Err() == context.DeadlineExceeded {
|
|
||||||
return "", fmt.Errorf("errCmdTimeout %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
errMsg := ""
|
|
||||||
if len(stderr.String()) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("stderr:\n %s", stderr.String())
|
|
||||||
}
|
|
||||||
if len(stdout.String()) != 0 {
|
|
||||||
if len(errMsg) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("%s \n\n; stdout:\n %s", errMsg, stdout.String())
|
|
||||||
} else {
|
|
||||||
errMsg = fmt.Sprintf("stdout:\n %s", stdout.String())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return errMsg, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func Execf(cmdStr string, a ...interface{}) (string, error) {
|
|
||||||
cmd := exec.Command("bash", "-c", fmt.Sprintf(cmdStr, a...))
|
|
||||||
var stdout, stderr bytes.Buffer
|
|
||||||
cmd.Stdout = &stdout
|
|
||||||
cmd.Stderr = &stderr
|
|
||||||
err := cmd.Run()
|
|
||||||
if err != nil {
|
|
||||||
errMsg := ""
|
|
||||||
if len(stderr.String()) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("stderr: %s", stderr.String())
|
|
||||||
}
|
|
||||||
if len(stdout.String()) != 0 {
|
|
||||||
if len(errMsg) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("%s; stdout: %s", errMsg, stdout.String())
|
|
||||||
} else {
|
|
||||||
errMsg = fmt.Sprintf("stdout: %s", stdout.String())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return errMsg, err
|
|
||||||
}
|
|
||||||
return stdout.String(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func ExecWithCheck(name string, a ...string) (string, error) {
|
|
||||||
cmd := exec.Command(name, a...)
|
|
||||||
var stdout, stderr bytes.Buffer
|
|
||||||
cmd.Stdout = &stdout
|
|
||||||
cmd.Stderr = &stderr
|
|
||||||
err := cmd.Run()
|
|
||||||
if err != nil {
|
|
||||||
errMsg := ""
|
|
||||||
if len(stderr.String()) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("stderr: %s", stderr.String())
|
|
||||||
}
|
|
||||||
if len(stdout.String()) != 0 {
|
|
||||||
if len(errMsg) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("%s; stdout: %s", errMsg, stdout.String())
|
|
||||||
} else {
|
|
||||||
errMsg = fmt.Sprintf("stdout: %s", stdout.String())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return errMsg, err
|
|
||||||
}
|
|
||||||
return stdout.String(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func ExecScript(scriptPath, workDir string) (string, error) {
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
|
|
||||||
defer cancel()
|
|
||||||
cmd := exec.Command("bash", scriptPath)
|
|
||||||
cmd.Dir = workDir
|
|
||||||
var stdout, stderr bytes.Buffer
|
|
||||||
cmd.Stdout = &stdout
|
|
||||||
cmd.Stderr = &stderr
|
|
||||||
err := cmd.Run()
|
|
||||||
if ctx.Err() == context.DeadlineExceeded {
|
|
||||||
return "", fmt.Errorf("errCmdTimeout %v", err)
|
|
||||||
}
|
|
||||||
if err != nil {
|
|
||||||
errMsg := ""
|
|
||||||
if len(stderr.String()) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("stderr: %s", stderr.String())
|
|
||||||
}
|
|
||||||
if len(stdout.String()) != 0 {
|
|
||||||
if len(errMsg) != 0 {
|
|
||||||
errMsg = fmt.Sprintf("%s; stdout: %s", errMsg, stdout.String())
|
|
||||||
} else {
|
|
||||||
errMsg = fmt.Sprintf("stdout: %s", stdout.String())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return errMsg, err
|
|
||||||
}
|
|
||||||
return stdout.String(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func CheckIllegal(args ...string) bool {
|
|
||||||
if args == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
for _, arg := range args {
|
|
||||||
if strings.Contains(arg, "&") || strings.Contains(arg, "|") || strings.Contains(arg, ";") ||
|
|
||||||
strings.Contains(arg, "$") || strings.Contains(arg, "'") || strings.Contains(arg, "`") ||
|
|
||||||
strings.Contains(arg, "(") || strings.Contains(arg, ")") || strings.Contains(arg, "\"") {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func HasNoPasswordSudo() bool {
|
|
||||||
cmd2 := exec.Command("sudo", "-n", "ls")
|
|
||||||
err2 := cmd2.Run()
|
|
||||||
return err2 == nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func SudoHandleCmd() string {
|
|
||||||
cmd := exec.Command("sudo", "-n", "ls")
|
|
||||||
if err := cmd.Run(); err == nil {
|
|
||||||
return "sudo "
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func Which(name string) bool {
|
|
||||||
_, err := exec.LookPath(name)
|
|
||||||
return err == nil
|
|
||||||
}
|
|
||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"database/sql"
|
"database/sql"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
package file
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/csv"
|
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 写入CSV文件,需要转换数据
|
|
||||||
// 例如:
|
|
||||||
// data := [][]string{}
|
|
||||||
// data = append(data, []string{"姓名", "年龄", "城市"})
|
|
||||||
// data = append(data, []string{"1", "2", "3"})
|
|
||||||
// err := file.WriterCSVFile(data, filePath)
|
|
||||||
func WriterCSVFile(data [][]string, filePath string) error {
|
|
||||||
// 获取文件所在的目录路径
|
|
||||||
dirPath := filepath.Dir(filePath)
|
|
||||||
|
|
||||||
// 确保文件夹路径存在
|
|
||||||
err := os.MkdirAll(dirPath, os.ModePerm)
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("创建文件夹失败 CreateFile %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建或打开文件
|
|
||||||
file, err := os.Create(filePath)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
// 创建CSV编写器
|
|
||||||
writer := csv.NewWriter(file)
|
|
||||||
defer writer.Flush()
|
|
||||||
|
|
||||||
// 写入数据
|
|
||||||
for _, row := range data {
|
|
||||||
writer.Write(row)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 读取CSV文件,转换map数据
|
|
||||||
func ReadCSVFile(filePath string) []map[string]string {
|
|
||||||
// 创建 map 存储 CSV 数据
|
|
||||||
arr := make([]map[string]string, 0)
|
|
||||||
|
|
||||||
// 打开 CSV 文件
|
|
||||||
file, err := os.Open(filePath)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal("无法打开 CSV 文件:", err)
|
|
||||||
return arr
|
|
||||||
}
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
// 创建 CSV Reader
|
|
||||||
reader := csv.NewReader(file)
|
|
||||||
|
|
||||||
// 读取 CSV 头部行
|
|
||||||
header, err := reader.Read()
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal("无法读取 CSV 头部行:", err)
|
|
||||||
return arr
|
|
||||||
}
|
|
||||||
|
|
||||||
// 遍历 CSV 数据行
|
|
||||||
for {
|
|
||||||
// 读取一行数据
|
|
||||||
record, err := reader.Read()
|
|
||||||
if err != nil {
|
|
||||||
// 到达文件末尾或遇到错误时退出循环
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
// 将 CSV 数据插入到 map 中
|
|
||||||
data := make(map[string]string)
|
|
||||||
for i, value := range record {
|
|
||||||
key := strings.ToLower(header[i])
|
|
||||||
data[key] = value
|
|
||||||
}
|
|
||||||
arr = append(arr, data)
|
|
||||||
}
|
|
||||||
|
|
||||||
return arr
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
package file
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"os/exec"
|
|
||||||
"path/filepath"
|
|
||||||
|
|
||||||
"ems.agt/lib/core/conf"
|
|
||||||
"ems.agt/lib/log"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 网元NE 文件复制到远程文件
|
|
||||||
func FileSCPLocalToNe(neIp, localPath, nePath string) error {
|
|
||||||
usernameNe := conf.Get("ne.user").(string)
|
|
||||||
// scp /path/to/local/file.txt user@remote-server:/path/to/remote/directory/
|
|
||||||
neDir := fmt.Sprintf("%s@%s:%s", usernameNe, neIp, nePath)
|
|
||||||
cmd := exec.Command("scp", "-r", localPath, neDir)
|
|
||||||
out, err := cmd.CombinedOutput()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
log.Infof("FileSCPLocalToNe %s", string(out))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 网元NE 远程文件复制到本地文件
|
|
||||||
func FileSCPNeToLocal(neIp, nePath, localPath string) error {
|
|
||||||
// 获取文件所在的目录路径
|
|
||||||
dirPath := filepath.Dir(localPath)
|
|
||||||
|
|
||||||
// 确保文件夹路径存在
|
|
||||||
err := os.MkdirAll(dirPath, os.ModePerm)
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("创建文件夹失败 CreateFile %v", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
usernameNe := conf.Get("ne.user").(string)
|
|
||||||
// scp user@remote-server:/path/to/remote/directory/ /path/to/local/file.txt
|
|
||||||
neDir := fmt.Sprintf("%s@%s:%s", usernameNe, neIp, nePath)
|
|
||||||
cmd := exec.Command("scp", "-r", neDir, localPath)
|
|
||||||
out, err := cmd.CombinedOutput()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
log.Infof("FileSCPNeToLocal %s", string(out))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
package file
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bufio"
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 写入Txt文件用,号分割 需要转换数据
|
|
||||||
// 例如:
|
|
||||||
// data := [][]string{}
|
|
||||||
// data = append(data, []string{"姓名", "年龄", "城市"})
|
|
||||||
// data = append(data, []string{"1", "2", "3"})
|
|
||||||
// err := file.WriterCSVFile(data, filePath)
|
|
||||||
func WriterTxtFile(data [][]string, filePath string) error {
|
|
||||||
// 获取文件所在的目录路径
|
|
||||||
dirPath := filepath.Dir(filePath)
|
|
||||||
|
|
||||||
// 确保文件夹路径存在
|
|
||||||
err := os.MkdirAll(dirPath, os.ModePerm)
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("创建文件夹失败 CreateFile %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建或打开文件
|
|
||||||
file, err := os.Create(filePath)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
// 创建一个 Writer 对象,用于将数据写入文件
|
|
||||||
writer := bufio.NewWriter(file)
|
|
||||||
for _, row := range data {
|
|
||||||
line := strings.Join(row, ",")
|
|
||||||
fmt.Fprintln(writer, line)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 将缓冲区中的数据刷新到文件中
|
|
||||||
err = writer.Flush()
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("刷新缓冲区时发生错误:", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 读取Txt文件,用,号分割 转换数组数据
|
|
||||||
func ReadTxtFile(filePath string) [][]string {
|
|
||||||
// 创建 map 存储 CSV 数据
|
|
||||||
arr := make([][]string, 0)
|
|
||||||
|
|
||||||
// 打开文本文件
|
|
||||||
file, err := os.Open(filePath)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal("无法打开文件:", err)
|
|
||||||
return arr
|
|
||||||
}
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
// 创建一个 Scanner 对象,用于逐行读取文件内容
|
|
||||||
scanner := bufio.NewScanner(file)
|
|
||||||
if scanner.Err() != nil {
|
|
||||||
log.Fatal("读取文件时出错:", scanner.Err())
|
|
||||||
return arr
|
|
||||||
}
|
|
||||||
|
|
||||||
for scanner.Scan() {
|
|
||||||
line := scanner.Text()
|
|
||||||
fields := strings.Split(line, ",")
|
|
||||||
arr = append(arr, fields)
|
|
||||||
}
|
|
||||||
|
|
||||||
return arr
|
|
||||||
}
|
|
||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/core/conf"
|
"be.ems/lib/core/conf"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 定义MMLClient结构体
|
// 定义MMLClient结构体
|
||||||
|
|||||||
@@ -1,358 +0,0 @@
|
|||||||
package redis
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"ems.agt/lib/core/conf"
|
|
||||||
"ems.agt/lib/log"
|
|
||||||
"github.com/redis/go-redis/v9"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Redis连接实例
|
|
||||||
var rdbMap = make(map[string]*redis.Client)
|
|
||||||
|
|
||||||
// 声明定义限流脚本命令
|
|
||||||
var rateLimitCommand = redis.NewScript(`
|
|
||||||
local key = KEYS[1]
|
|
||||||
local time = tonumber(ARGV[1])
|
|
||||||
local count = tonumber(ARGV[2])
|
|
||||||
local current = redis.call('get', key);
|
|
||||||
if current and tonumber(current) >= count then
|
|
||||||
return tonumber(current);
|
|
||||||
end
|
|
||||||
current = redis.call('incr', key)
|
|
||||||
if tonumber(current) == 1 then
|
|
||||||
redis.call('expire', key, time)
|
|
||||||
end
|
|
||||||
return tonumber(current);`)
|
|
||||||
|
|
||||||
// 连接Redis实例
|
|
||||||
func Connect() {
|
|
||||||
ctx := context.Background()
|
|
||||||
// 读取数据源配置
|
|
||||||
datasource := conf.Get("redis.dataSource").(map[string]any)
|
|
||||||
for k, v := range datasource {
|
|
||||||
client := v.(map[string]any)
|
|
||||||
// 创建连接
|
|
||||||
address := fmt.Sprintf("%s:%d", client["host"], client["port"])
|
|
||||||
rdb := redis.NewClient(&redis.Options{
|
|
||||||
Addr: address,
|
|
||||||
Password: client["password"].(string),
|
|
||||||
DB: client["db"].(int),
|
|
||||||
})
|
|
||||||
// 测试数据库连接
|
|
||||||
pong, err := rdb.Ping(ctx).Result()
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("failed error ping redis %s %d is %v", client["host"], client["db"], err)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
log.Infof("redis %s %d %s connection is successful.", client["host"], client["db"], pong)
|
|
||||||
rdbMap[k] = rdb
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭Redis实例
|
|
||||||
func Close() {
|
|
||||||
for _, rdb := range rdbMap {
|
|
||||||
if err := rdb.Close(); err != nil {
|
|
||||||
log.Errorf("fatal error db close: %s", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取默认实例
|
|
||||||
func DefaultRDB() *redis.Client {
|
|
||||||
source := conf.Get("redis.defaultDataSourceName").(string)
|
|
||||||
return rdbMap[source]
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取实例
|
|
||||||
func RDB(source string) *redis.Client {
|
|
||||||
return rdbMap[source]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Info 获取redis服务信息
|
|
||||||
func Info(source string) map[string]map[string]string {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
info, err := rdb.Info(ctx).Result()
|
|
||||||
if err != nil {
|
|
||||||
return map[string]map[string]string{}
|
|
||||||
}
|
|
||||||
infoObj := make(map[string]map[string]string)
|
|
||||||
lines := strings.Split(info, "\r\n")
|
|
||||||
label := ""
|
|
||||||
for _, line := range lines {
|
|
||||||
if strings.Contains(line, "#") {
|
|
||||||
label = strings.Fields(line)[len(strings.Fields(line))-1]
|
|
||||||
label = strings.ToLower(label)
|
|
||||||
infoObj[label] = make(map[string]string)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
kvArr := strings.Split(line, ":")
|
|
||||||
if len(kvArr) >= 2 {
|
|
||||||
key := strings.TrimSpace(kvArr[0])
|
|
||||||
value := strings.TrimSpace(kvArr[len(kvArr)-1])
|
|
||||||
infoObj[label][key] = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return infoObj
|
|
||||||
}
|
|
||||||
|
|
||||||
// KeySize 获取redis当前连接可用键Key总数信息
|
|
||||||
func KeySize(source string) int64 {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
size, err := rdb.DBSize(ctx).Result()
|
|
||||||
if err != nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
return size
|
|
||||||
}
|
|
||||||
|
|
||||||
// CommandStats 获取redis命令状态信息
|
|
||||||
func CommandStats(source string) []map[string]string {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
commandstats, err := rdb.Info(ctx, "commandstats").Result()
|
|
||||||
if err != nil {
|
|
||||||
return []map[string]string{}
|
|
||||||
}
|
|
||||||
statsObjArr := make([]map[string]string, 0)
|
|
||||||
lines := strings.Split(commandstats, "\r\n")
|
|
||||||
for _, line := range lines {
|
|
||||||
if !strings.HasPrefix(line, "cmdstat_") {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
kvArr := strings.Split(line, ":")
|
|
||||||
key := kvArr[0]
|
|
||||||
valueStr := kvArr[len(kvArr)-1]
|
|
||||||
statsObj := make(map[string]string)
|
|
||||||
statsObj["name"] = key[8:]
|
|
||||||
statsObj["value"] = valueStr[6:strings.Index(valueStr, ",usec=")]
|
|
||||||
statsObjArr = append(statsObjArr, statsObj)
|
|
||||||
}
|
|
||||||
return statsObjArr
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取键的剩余有效时间(秒)
|
|
||||||
func GetExpire(source string, key string) (float64, error) {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
ttl, err := rdb.TTL(ctx, key).Result()
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
return ttl.Seconds(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获得缓存数据的key列表
|
|
||||||
func GetKeys(source string, pattern string) ([]string, error) {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化变量
|
|
||||||
var keys []string
|
|
||||||
var cursor uint64 = 0
|
|
||||||
ctx := context.Background()
|
|
||||||
// 循环遍历获取匹配的键
|
|
||||||
for {
|
|
||||||
// 使用 SCAN 命令获取匹配的键
|
|
||||||
batchKeys, nextCursor, err := rdb.Scan(ctx, cursor, pattern, 100).Result()
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("Failed to scan keys: %v", err)
|
|
||||||
return keys, err
|
|
||||||
}
|
|
||||||
cursor = nextCursor
|
|
||||||
keys = append(keys, batchKeys...)
|
|
||||||
// 当 cursor 为 0,表示遍历完成
|
|
||||||
if cursor == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return keys, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 批量获得缓存数据
|
|
||||||
func GetBatch(source string, keys []string) ([]any, error) {
|
|
||||||
if len(keys) == 0 {
|
|
||||||
return []any{}, fmt.Errorf("not keys")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取缓存数据
|
|
||||||
result, err := rdb.MGet(context.Background(), keys...).Result()
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("Failed to get batch data: %v", err)
|
|
||||||
return []any{}, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获得缓存数据
|
|
||||||
func Get(source, key string) (string, error) {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
value, err := rdb.Get(ctx, key).Result()
|
|
||||||
if err == redis.Nil || err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
return value, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获得缓存数据Hash
|
|
||||||
func GetHash(source, key string) (map[string]string, error) {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
value, err := rdb.HGetAll(ctx, key).Result()
|
|
||||||
if err == redis.Nil || err != nil {
|
|
||||||
return map[string]string{}, err
|
|
||||||
}
|
|
||||||
return value, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 判断是否存在
|
|
||||||
func Has(source string, keys ...string) (bool, error) {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
exists, err := rdb.Exists(ctx, keys...).Result()
|
|
||||||
if err != nil {
|
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
return exists >= 1, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置缓存数据
|
|
||||||
func Set(source, key string, value any) (bool, error) {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
err := rdb.Set(ctx, key, value, 0).Err()
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("redis lua script err %v", err)
|
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
return true, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置缓存数据与过期时间
|
|
||||||
func SetByExpire(source, key string, value any, expiration time.Duration) (bool, error) {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
err := rdb.Set(ctx, key, value, expiration).Err()
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("redis lua script err %v", err)
|
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
return true, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除单个
|
|
||||||
func Del(source string, key string) (bool, error) {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
err := rdb.Del(ctx, key).Err()
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("redis lua script err %v", err)
|
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
return true, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除多个
|
|
||||||
func DelKeys(source string, keys []string) (bool, error) {
|
|
||||||
if len(keys) == 0 {
|
|
||||||
return false, fmt.Errorf("no keys")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
err := rdb.Del(ctx, keys...).Err()
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("redis lua script err %v", err)
|
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
return true, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 限流查询并记录
|
|
||||||
func RateLimit(source, limitKey string, time, count int64) (int64, error) {
|
|
||||||
// 数据源
|
|
||||||
rdb := DefaultRDB()
|
|
||||||
if source != "" {
|
|
||||||
rdb = RDB(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
result, err := rateLimitCommand.Run(ctx, rdb, []string{limitKey}, time, count).Result()
|
|
||||||
if err != nil {
|
|
||||||
log.Errorf("redis lua script err %v", err)
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
return result.(int64), err
|
|
||||||
}
|
|
||||||
@@ -10,10 +10,11 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/core/vo"
|
"be.ems/lib/core/vo"
|
||||||
commonConstants "ems.agt/src/framework/constants/common"
|
commonConstants "be.ems/src/framework/constants/common"
|
||||||
tokenConst "ems.agt/src/framework/constants/token"
|
tokenConst "be.ems/src/framework/constants/token"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
"golang.org/x/text/language"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Param 地址栏参数{id}
|
// Param 地址栏参数{id}
|
||||||
@@ -31,6 +32,11 @@ func GetQuery(r *http.Request, key string) string {
|
|||||||
return r.URL.Query().Get(key)
|
return r.URL.Query().Get(key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetHeader 请求头参数
|
||||||
|
func GetHeader(r *http.Request, key string) string {
|
||||||
|
return r.Header.Get(key)
|
||||||
|
}
|
||||||
|
|
||||||
// QueryMap 查询参数转换Map
|
// QueryMap 查询参数转换Map
|
||||||
func QueryMap(r *http.Request) map[string]any {
|
func QueryMap(r *http.Request) map[string]any {
|
||||||
queryValues := r.URL.Query()
|
queryValues := r.URL.Query()
|
||||||
@@ -41,6 +47,16 @@ func QueryMap(r *http.Request) map[string]any {
|
|||||||
return queryParams
|
return queryParams
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ShouldBindQuery 查询参数读取json请求结构团体
|
||||||
|
func ShouldBindQuery(r *http.Request, args any) error {
|
||||||
|
queryParams := QueryMap(r)
|
||||||
|
body, err := json.Marshal(queryParams)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return json.Unmarshal(body, args)
|
||||||
|
}
|
||||||
|
|
||||||
// 读取json请求结构团体
|
// 读取json请求结构团体
|
||||||
func ShouldBindJSON(r *http.Request, args any) error {
|
func ShouldBindJSON(r *http.Request, args any) error {
|
||||||
body, err := io.ReadAll(io.LimitReader(r.Body, 1<<20)) // 设置较大的长度,例如 1<<20 (1MB)
|
body, err := io.ReadAll(io.LimitReader(r.Body, 1<<20)) // 设置较大的长度,例如 1<<20 (1MB)
|
||||||
@@ -118,7 +134,32 @@ func Authorization(r *http.Request) string {
|
|||||||
return arr[1]
|
return arr[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定义自定义类型作为键
|
// AcceptLanguage 解析客户端接收语言 zh:中文 en: 英文
|
||||||
|
func AcceptLanguage(r *http.Request) string {
|
||||||
|
preferredLanguage := language.English
|
||||||
|
|
||||||
|
// Query请求查询
|
||||||
|
if v := GetQuery(r, "language"); v != "" {
|
||||||
|
tags, _, _ := language.ParseAcceptLanguage(v)
|
||||||
|
if len(tags) > 0 {
|
||||||
|
preferredLanguage = tags[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Header请求头
|
||||||
|
if v := GetHeader(r, "Accept-Language"); v != "" {
|
||||||
|
tags, _, _ := language.ParseAcceptLanguage(v)
|
||||||
|
if len(tags) > 0 {
|
||||||
|
preferredLanguage = tags[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 只取前缀
|
||||||
|
lang := preferredLanguage.String()
|
||||||
|
arr := strings.Split(lang, "-")
|
||||||
|
return arr[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextKey 定义自定义类型作为键
|
||||||
type ContextKey string
|
type ContextKey string
|
||||||
|
|
||||||
// LoginUser 登录用户信息需要Authorize中间件
|
// LoginUser 登录用户信息需要Authorize中间件
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
package firewall
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"ems.agt/lib/core/utils/firewall/client"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FirewallClient interface {
|
|
||||||
Name() string // ufw firewalld
|
|
||||||
Start() error
|
|
||||||
Stop() error
|
|
||||||
Reload() error
|
|
||||||
Status() (string, error) // running not running
|
|
||||||
Version() (string, error)
|
|
||||||
|
|
||||||
ListPort() ([]client.FireInfo, error)
|
|
||||||
ListAddress() ([]client.FireInfo, error)
|
|
||||||
|
|
||||||
Port(port client.FireInfo, operation string) error
|
|
||||||
RichRules(rule client.FireInfo, operation string) error
|
|
||||||
PortForward(info client.Forward, operation string) error
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewFirewallClient() (FirewallClient, error) {
|
|
||||||
if _, err := os.Stat("/usr/sbin/firewalld"); err == nil {
|
|
||||||
return client.NewFirewalld()
|
|
||||||
}
|
|
||||||
if _, err := os.Stat("/usr/sbin/ufw"); err == nil {
|
|
||||||
return client.NewUfw()
|
|
||||||
}
|
|
||||||
return nil, errors.New("no such type")
|
|
||||||
}
|
|
||||||
@@ -1,209 +0,0 @@
|
|||||||
package client
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"strings"
|
|
||||||
"sync"
|
|
||||||
|
|
||||||
"ems.agt/lib/core/cmd"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Firewall struct{}
|
|
||||||
|
|
||||||
func NewFirewalld() (*Firewall, error) {
|
|
||||||
return &Firewall{}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) Name() string {
|
|
||||||
return "firewalld"
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) Status() (string, error) {
|
|
||||||
stdout, _ := cmd.Exec("firewall-cmd --state")
|
|
||||||
if stdout == "running\n" {
|
|
||||||
return "running", nil
|
|
||||||
}
|
|
||||||
return "not running", nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) Version() (string, error) {
|
|
||||||
stdout, err := cmd.Exec("firewall-cmd --version")
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("load the firewall version failed, err: %s", stdout)
|
|
||||||
}
|
|
||||||
return strings.ReplaceAll(stdout, "\n ", ""), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) Start() error {
|
|
||||||
stdout, err := cmd.Exec("systemctl start firewalld")
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("enable the firewall failed, err: %s", stdout)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) Stop() error {
|
|
||||||
stdout, err := cmd.Exec("systemctl stop firewalld")
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("stop the firewall failed, err: %s", stdout)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) Reload() error {
|
|
||||||
stdout, err := cmd.Exec("firewall-cmd --reload")
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("reload firewall failed, err: %s", stdout)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) ListPort() ([]FireInfo, error) {
|
|
||||||
var wg sync.WaitGroup
|
|
||||||
var datas []FireInfo
|
|
||||||
wg.Add(2)
|
|
||||||
go func() {
|
|
||||||
defer wg.Done()
|
|
||||||
stdout, err := cmd.Exec("firewall-cmd --zone=public --list-ports")
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ports := strings.Split(strings.ReplaceAll(stdout, "\n", ""), " ")
|
|
||||||
for _, port := range ports {
|
|
||||||
if len(port) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
var itemPort FireInfo
|
|
||||||
if strings.Contains(port, "/") {
|
|
||||||
itemPort.Port = strings.Split(port, "/")[0]
|
|
||||||
itemPort.Protocol = strings.Split(port, "/")[1]
|
|
||||||
}
|
|
||||||
itemPort.Strategy = "accept"
|
|
||||||
datas = append(datas, itemPort)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
go func() {
|
|
||||||
defer wg.Done()
|
|
||||||
stdout1, err := cmd.Exec("firewall-cmd --zone=public --list-rich-rules")
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
rules := strings.Split(stdout1, "\n")
|
|
||||||
for _, rule := range rules {
|
|
||||||
if len(rule) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
itemRule := f.loadInfo(rule)
|
|
||||||
if len(itemRule.Port) != 0 && itemRule.Family == "ipv4" {
|
|
||||||
datas = append(datas, itemRule)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
wg.Wait()
|
|
||||||
return datas, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) ListAddress() ([]FireInfo, error) {
|
|
||||||
stdout, err := cmd.Exec("firewall-cmd --zone=public --list-rich-rules")
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
var datas []FireInfo
|
|
||||||
rules := strings.Split(stdout, "\n")
|
|
||||||
for _, rule := range rules {
|
|
||||||
if len(rule) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
itemRule := f.loadInfo(rule)
|
|
||||||
if len(itemRule.Port) == 0 && len(itemRule.Address) != 0 {
|
|
||||||
datas = append(datas, itemRule)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return datas, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) Port(port FireInfo, operation string) error {
|
|
||||||
if cmd.CheckIllegal(operation, port.Protocol, port.Port) {
|
|
||||||
return fmt.Errorf("errCmdIllegal %v", port)
|
|
||||||
}
|
|
||||||
|
|
||||||
stdout, err := cmd.Execf("firewall-cmd --zone=public --%s-port=%s/%s --permanent", operation, port.Port, port.Protocol)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("%s port failed, err: %s", operation, stdout)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) RichRules(rule FireInfo, operation string) error {
|
|
||||||
if cmd.CheckIllegal(operation, rule.Address, rule.Protocol, rule.Port, rule.Strategy) {
|
|
||||||
return fmt.Errorf("errCmdIllegal %v", rule)
|
|
||||||
}
|
|
||||||
ruleStr := ""
|
|
||||||
if strings.Contains(rule.Address, "-") {
|
|
||||||
std, err := cmd.Execf("firewall-cmd --permanent --new-ipset=%s --type=hash:ip", rule.Address)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("add new ipset failed, err: %s", std)
|
|
||||||
}
|
|
||||||
std2, err := cmd.Execf("firewall-cmd --permanent --ipset=%s --add-entry=%s", rule.Address, rule.Address)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("add entry to ipset failed, err: %s", std2)
|
|
||||||
}
|
|
||||||
if err := f.Reload(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
ruleStr = fmt.Sprintf("rule source ipset=%s %s", rule.Address, rule.Strategy)
|
|
||||||
} else {
|
|
||||||
ruleStr = "rule family=ipv4 "
|
|
||||||
if len(rule.Address) != 0 {
|
|
||||||
ruleStr += fmt.Sprintf("source address=%s ", rule.Address)
|
|
||||||
}
|
|
||||||
if len(rule.Port) != 0 {
|
|
||||||
ruleStr += fmt.Sprintf("port port=%s ", rule.Port)
|
|
||||||
}
|
|
||||||
if len(rule.Protocol) != 0 {
|
|
||||||
ruleStr += fmt.Sprintf("protocol=%s ", rule.Protocol)
|
|
||||||
}
|
|
||||||
ruleStr += rule.Strategy
|
|
||||||
}
|
|
||||||
stdout, err := cmd.Execf("firewall-cmd --zone=public --%s-rich-rule '%s' --permanent", operation, ruleStr)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("%s rich rules failed, err: %s", operation, stdout)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) PortForward(info Forward, operation string) error {
|
|
||||||
ruleStr := fmt.Sprintf("firewall-cmd --%s-forward-port=port=%s:proto=%s:toport=%s --permanent", operation, info.Port, info.Protocol, info.Target)
|
|
||||||
if len(info.Address) != 0 {
|
|
||||||
ruleStr = fmt.Sprintf("firewall-cmd --%s-forward-port=port=%s:proto=%s:toaddr=%s:toport=%s --permanent", operation, info.Port, info.Protocol, info.Address, info.Target)
|
|
||||||
}
|
|
||||||
|
|
||||||
stdout, err := cmd.Exec(ruleStr)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("%s port forward failed, err: %s", operation, stdout)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Firewall) loadInfo(line string) FireInfo {
|
|
||||||
var itemRule FireInfo
|
|
||||||
ruleInfo := strings.Split(strings.ReplaceAll(line, "\"", ""), " ")
|
|
||||||
for _, item := range ruleInfo {
|
|
||||||
switch {
|
|
||||||
case strings.Contains(item, "family="):
|
|
||||||
itemRule.Family = strings.ReplaceAll(item, "family=", "")
|
|
||||||
case strings.Contains(item, "ipset="):
|
|
||||||
itemRule.Address = strings.ReplaceAll(item, "ipset=", "")
|
|
||||||
case strings.Contains(item, "address="):
|
|
||||||
itemRule.Address = strings.ReplaceAll(item, "address=", "")
|
|
||||||
case strings.Contains(item, "port="):
|
|
||||||
itemRule.Port = strings.ReplaceAll(item, "port=", "")
|
|
||||||
case strings.Contains(item, "protocol="):
|
|
||||||
itemRule.Protocol = strings.ReplaceAll(item, "protocol=", "")
|
|
||||||
case item == "accept" || item == "drop" || item == "reject":
|
|
||||||
itemRule.Strategy = item
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return itemRule
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package client
|
|
||||||
|
|
||||||
type FireInfo struct {
|
|
||||||
Family string `json:"family"` // ipv4 ipv6
|
|
||||||
Address string `json:"address"` // Anywhere
|
|
||||||
Port string `json:"port"`
|
|
||||||
Protocol string `json:"protocol"` // tcp udp tcp/udp
|
|
||||||
Strategy string `json:"strategy"` // accept drop
|
|
||||||
|
|
||||||
APPName string `json:"appName"`
|
|
||||||
IsUsed bool `json:"isUsed"`
|
|
||||||
Description string `json:"description"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Forward struct {
|
|
||||||
Protocol string `json:"protocol"`
|
|
||||||
Address string `json:"address"`
|
|
||||||
Port string `json:"port"`
|
|
||||||
Target string `json:"target"`
|
|
||||||
}
|
|
||||||
@@ -1,238 +0,0 @@
|
|||||||
package client
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"ems.agt/lib/core/cmd"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Ufw struct {
|
|
||||||
CmdStr string
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewUfw() (*Ufw, error) {
|
|
||||||
var ufw Ufw
|
|
||||||
if cmd.HasNoPasswordSudo() {
|
|
||||||
ufw.CmdStr = "sudo ufw"
|
|
||||||
} else {
|
|
||||||
ufw.CmdStr = "ufw"
|
|
||||||
}
|
|
||||||
return &ufw, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) Name() string {
|
|
||||||
return "ufw"
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) Status() (string, error) {
|
|
||||||
stdout, _ := cmd.Execf("%s status | grep Status", f.CmdStr)
|
|
||||||
if stdout == "Status: active\n" {
|
|
||||||
return "running", nil
|
|
||||||
}
|
|
||||||
stdout1, _ := cmd.Execf("%s status | grep 状态", f.CmdStr)
|
|
||||||
if stdout1 == "状态: 激活\n" {
|
|
||||||
return "running", nil
|
|
||||||
}
|
|
||||||
return "not running", nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) Version() (string, error) {
|
|
||||||
stdout, err := cmd.Execf("%s version | grep ufw", f.CmdStr)
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("load the firewall status failed, err: %s", stdout)
|
|
||||||
}
|
|
||||||
info := strings.ReplaceAll(stdout, "\n", "")
|
|
||||||
return strings.ReplaceAll(info, "ufw ", ""), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) Start() error {
|
|
||||||
stdout, err := cmd.Execf("echo y | %s enable", f.CmdStr)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("enable the firewall failed, err: %s", stdout)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) Stop() error {
|
|
||||||
stdout, err := cmd.Execf("%s disable", f.CmdStr)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("stop the firewall failed, err: %s", stdout)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) Reload() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) ListPort() ([]FireInfo, error) {
|
|
||||||
stdout, err := cmd.Execf("%s status verbose", f.CmdStr)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
portInfos := strings.Split(stdout, "\n")
|
|
||||||
var datas []FireInfo
|
|
||||||
isStart := false
|
|
||||||
for _, line := range portInfos {
|
|
||||||
if strings.HasPrefix(line, "-") {
|
|
||||||
isStart = true
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if !isStart {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
itemFire := f.loadInfo(line, "port")
|
|
||||||
if len(itemFire.Port) != 0 && itemFire.Port != "Anywhere" && !strings.Contains(itemFire.Port, ".") {
|
|
||||||
itemFire.Port = strings.ReplaceAll(itemFire.Port, ":", "-")
|
|
||||||
datas = append(datas, itemFire)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return datas, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) ListAddress() ([]FireInfo, error) {
|
|
||||||
stdout, err := cmd.Execf("%s status verbose", f.CmdStr)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
portInfos := strings.Split(stdout, "\n")
|
|
||||||
var datas []FireInfo
|
|
||||||
isStart := false
|
|
||||||
for _, line := range portInfos {
|
|
||||||
if strings.HasPrefix(line, "-") {
|
|
||||||
isStart = true
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if !isStart {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if !strings.Contains(line, " IN") {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
itemFire := f.loadInfo(line, "address")
|
|
||||||
if strings.Contains(itemFire.Port, ".") {
|
|
||||||
itemFire.Address += ("-" + itemFire.Port)
|
|
||||||
itemFire.Port = ""
|
|
||||||
}
|
|
||||||
if len(itemFire.Port) == 0 && len(itemFire.Address) != 0 {
|
|
||||||
datas = append(datas, itemFire)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return datas, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) Port(port FireInfo, operation string) error {
|
|
||||||
switch port.Strategy {
|
|
||||||
case "accept":
|
|
||||||
port.Strategy = "allow"
|
|
||||||
case "drop":
|
|
||||||
port.Strategy = "deny"
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("unsupport strategy %s", port.Strategy)
|
|
||||||
}
|
|
||||||
if cmd.CheckIllegal(port.Protocol, port.Port) {
|
|
||||||
return fmt.Errorf("errCmdIllegal %v", port)
|
|
||||||
}
|
|
||||||
|
|
||||||
command := fmt.Sprintf("%s %s %s", f.CmdStr, port.Strategy, port.Port)
|
|
||||||
if operation == "remove" {
|
|
||||||
command = fmt.Sprintf("%s delete %s %s", f.CmdStr, port.Strategy, port.Port)
|
|
||||||
}
|
|
||||||
if len(port.Protocol) != 0 {
|
|
||||||
command += fmt.Sprintf("/%s", port.Protocol)
|
|
||||||
}
|
|
||||||
stdout, err := cmd.Exec(command)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("%s port failed, err: %s", operation, stdout)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) RichRules(rule FireInfo, operation string) error {
|
|
||||||
switch rule.Strategy {
|
|
||||||
case "accept":
|
|
||||||
rule.Strategy = "allow"
|
|
||||||
case "drop":
|
|
||||||
rule.Strategy = "deny"
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("unsupport strategy %s", rule.Strategy)
|
|
||||||
}
|
|
||||||
|
|
||||||
if cmd.CheckIllegal(operation, rule.Protocol, rule.Address, rule.Port) {
|
|
||||||
return fmt.Errorf("errCmdIllegal %v", rule)
|
|
||||||
}
|
|
||||||
|
|
||||||
ruleStr := fmt.Sprintf("%s %s ", f.CmdStr, rule.Strategy)
|
|
||||||
if operation == "remove" {
|
|
||||||
ruleStr = fmt.Sprintf("%s delete %s ", f.CmdStr, rule.Strategy)
|
|
||||||
}
|
|
||||||
if len(rule.Protocol) != 0 {
|
|
||||||
ruleStr += fmt.Sprintf("proto %s ", rule.Protocol)
|
|
||||||
}
|
|
||||||
if strings.Contains(rule.Address, "-") {
|
|
||||||
ruleStr += fmt.Sprintf("from %s to %s ", strings.Split(rule.Address, "-")[0], strings.Split(rule.Address, "-")[1])
|
|
||||||
} else {
|
|
||||||
ruleStr += fmt.Sprintf("from %s ", rule.Address)
|
|
||||||
}
|
|
||||||
if len(rule.Port) != 0 {
|
|
||||||
ruleStr += fmt.Sprintf("to any port %s ", rule.Port)
|
|
||||||
}
|
|
||||||
|
|
||||||
stdout, err := cmd.Exec(ruleStr)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("%s rich rules failed, err: %s", operation, stdout)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) PortForward(info Forward, operation string) error {
|
|
||||||
ruleStr := fmt.Sprintf("firewall-cmd --%s-forward-port=port=%s:proto=%s:toport=%s --permanent", operation, info.Port, info.Protocol, info.Target)
|
|
||||||
if len(info.Address) != 0 {
|
|
||||||
ruleStr = fmt.Sprintf("firewall-cmd --%s-forward-port=port=%s:proto=%s:toaddr=%s:toport=%s --permanent", operation, info.Port, info.Protocol, info.Address, info.Target)
|
|
||||||
}
|
|
||||||
|
|
||||||
stdout, err := cmd.Exec(ruleStr)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("%s port forward failed, err: %s", operation, stdout)
|
|
||||||
}
|
|
||||||
if err := f.Reload(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Ufw) loadInfo(line string, fireType string) FireInfo {
|
|
||||||
fields := strings.Fields(line)
|
|
||||||
var itemInfo FireInfo
|
|
||||||
if len(fields) < 4 {
|
|
||||||
return itemInfo
|
|
||||||
}
|
|
||||||
if fields[1] == "(v6)" {
|
|
||||||
return itemInfo
|
|
||||||
}
|
|
||||||
if fields[0] == "Anywhere" && fireType != "port" {
|
|
||||||
itemInfo.Strategy = "drop"
|
|
||||||
if fields[1] == "ALLOW" {
|
|
||||||
itemInfo.Strategy = "accept"
|
|
||||||
}
|
|
||||||
itemInfo.Address = fields[3]
|
|
||||||
return itemInfo
|
|
||||||
}
|
|
||||||
if strings.Contains(fields[0], "/") {
|
|
||||||
itemInfo.Port = strings.Split(fields[0], "/")[0]
|
|
||||||
itemInfo.Protocol = strings.Split(fields[0], "/")[1]
|
|
||||||
} else {
|
|
||||||
itemInfo.Port = fields[0]
|
|
||||||
itemInfo.Protocol = "tcp/udp"
|
|
||||||
}
|
|
||||||
itemInfo.Family = "ipv4"
|
|
||||||
if fields[1] == "ALLOW" {
|
|
||||||
itemInfo.Strategy = "accept"
|
|
||||||
} else {
|
|
||||||
itemInfo.Strategy = "drop"
|
|
||||||
}
|
|
||||||
itemInfo.Address = fields[3]
|
|
||||||
|
|
||||||
return itemInfo
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package vo
|
package vo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LoginUser 登录用户身份权限信息对象
|
// LoginUser 登录用户身份权限信息对象
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package vo
|
package vo
|
||||||
|
|
||||||
// import sysmenu "ems.agt/features/sys_menu"
|
// import sysmenu "be.ems/features/sys_menu"
|
||||||
|
|
||||||
// TreeSelect 树结构实体类
|
// TreeSelect 树结构实体类
|
||||||
type TreeSelect struct {
|
type TreeSelect struct {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/features/sys_role/model"
|
"be.ems/features/sys_role/model"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/oauth"
|
"be.ems/lib/oauth"
|
||||||
|
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
@@ -228,12 +228,12 @@ func XormGetNeInfo(neType string, neId string) (*NeInfo, error) {
|
|||||||
log.Debug("XormGetNeInfo processing... ")
|
log.Debug("XormGetNeInfo processing... ")
|
||||||
|
|
||||||
neInfo := new(NeInfo)
|
neInfo := new(NeInfo)
|
||||||
has, err := xEngine.Where("status in ('0','3') and ne_type=? and ne_id=?", strings.ToUpper(neType), neId).Get(neInfo)
|
has, err := xEngine.Where("ne_type=? and ne_id=?", strings.ToUpper(neType), neId).Get(neInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to get table ne_info from database:", err)
|
log.Error("Failed to get table ne_info from database:", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if !has {
|
} else if !has {
|
||||||
log.Infof("Not found ne_info from database, status in ('0','3'), neType=%s, neId=%s", neType, neId)
|
log.Infof("Not found ne_info from database, neType=%s, neId=%s", neType, neId)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,12 +245,12 @@ func XormGetNeInfoByRmUID(neType string, rmUID string) (*NeInfo, error) {
|
|||||||
log.Debug("XormGetNeInfoByRmUID processing... ")
|
log.Debug("XormGetNeInfoByRmUID processing... ")
|
||||||
|
|
||||||
neInfo := new(NeInfo)
|
neInfo := new(NeInfo)
|
||||||
has, err := xEngine.Where("status in ('0','3') and ne_type=? and rm_uid=?", strings.ToUpper(neType), rmUID).Get(neInfo)
|
has, err := xEngine.Where("ne_type=? and rm_uid=?", strings.ToUpper(neType), rmUID).Get(neInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to get table ne_info from database:", err)
|
log.Error("Failed to get table ne_info from database:", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if !has {
|
} else if !has {
|
||||||
log.Infof("Not found ne_info from database, status in ('0','3'), neType=%s, neId=%s", neType, rmUID)
|
log.Infof("Not found ne_info from database, neType=%s, neId=%s", neType, rmUID)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ func XormGetAllNeInfo(nes *[]NeInfo) (*[]NeInfo, error) {
|
|||||||
log.Debug("XormGetAllNeInfo processing... ")
|
log.Debug("XormGetAllNeInfo processing... ")
|
||||||
|
|
||||||
ne := new(NeInfo)
|
ne := new(NeInfo)
|
||||||
rows, err := xEngine.Table("ne_info").Where("status in ('0','3')").Rows(ne)
|
rows, err := xEngine.Table("ne_info").Rows(ne)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to get table ne_info from database:", err)
|
log.Error("Failed to get table ne_info from database:", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -284,7 +284,7 @@ func XormGetNeInfoByNeType(neType string, nes *[]NeInfo) error {
|
|||||||
log.Debug("XormGetNeInfoByNeType processing... ")
|
log.Debug("XormGetNeInfoByNeType processing... ")
|
||||||
|
|
||||||
ne := new(NeInfo)
|
ne := new(NeInfo)
|
||||||
rows, err := xEngine.Table("ne_info").Where("status in ('0','3') and ne_type=?", neType).Rows(ne)
|
rows, err := xEngine.Table("ne_info").Where("ne_type=?", neType).Rows(ne)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to get table ne_info from database:", err)
|
log.Error("Failed to get table ne_info from database:", err)
|
||||||
return err
|
return err
|
||||||
@@ -310,12 +310,12 @@ func XormGetNeInfo2(neType string, neIDs []string, nes *[]NeInfo) error {
|
|||||||
var err error
|
var err error
|
||||||
if len(neIDs) == 0 {
|
if len(neIDs) == 0 {
|
||||||
rows, err = xEngine.Table("ne_info").
|
rows, err = xEngine.Table("ne_info").
|
||||||
Where("status in ('0','3') and ne_type=?", neType).
|
Where("ne_type=?", neType).
|
||||||
Rows(ne)
|
Rows(ne)
|
||||||
} else {
|
} else {
|
||||||
rows, err = xEngine.Table("ne_info").
|
rows, err = xEngine.Table("ne_info").
|
||||||
In("ne_id", neIDs).
|
In("ne_id", neIDs).
|
||||||
And("status in ('0','3') and ne_type=?", neType).
|
And("ne_type=?", neType).
|
||||||
Rows(ne)
|
Rows(ne)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 登录策略限制登录时间和访问ip范围
|
// 登录策略限制登录时间和访问ip范围
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"ems.agt/lib/core/cache"
|
"be.ems/lib/core/cache"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/vo"
|
"be.ems/lib/core/vo"
|
||||||
"ems.agt/lib/core/vo/result"
|
"be.ems/lib/core/vo/result"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
commonConstants "ems.agt/src/framework/constants/common"
|
commonConstants "be.ems/src/framework/constants/common"
|
||||||
tokenUtils "ems.agt/src/framework/utils/token"
|
tokenUtils "be.ems/src/framework/utils/token"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Authorize 用户身份授权认证校验
|
// Authorize 用户身份授权认证校验
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
tokenConst "ems.agt/src/framework/constants/token"
|
tokenConst "be.ems/src/framework/constants/token"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/core/datasource"
|
"be.ems/lib/core/datasource"
|
||||||
"ems.agt/lib/core/utils/ctx"
|
"be.ems/lib/core/utils/ctx"
|
||||||
"ems.agt/lib/core/utils/date"
|
"be.ems/lib/core/utils/date"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LogMML mml操作日志搜集
|
// LogMML mml操作日志搜集
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/core/utils/parse"
|
"be.ems/lib/core/utils/parse"
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/src/framework/constants/common"
|
"be.ems/src/framework/constants/common"
|
||||||
"ems.agt/src/framework/middleware/collectlogs"
|
"be.ems/src/framework/middleware/collectlogs"
|
||||||
"ems.agt/src/framework/utils/ip2region"
|
"be.ems/src/framework/utils/ip2region"
|
||||||
"ems.agt/src/modules/system/model"
|
"be.ems/src/modules/system/model"
|
||||||
"ems.agt/src/modules/system/service"
|
"be.ems/src/modules/system/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 敏感属性字段进行掩码
|
// 敏感属性字段进行掩码
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/run"
|
"be.ems/lib/run"
|
||||||
tokenConst "ems.agt/src/framework/constants/token"
|
tokenConst "be.ems/src/framework/constants/token"
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
|
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
|
|||||||
@@ -5,33 +5,33 @@ import (
|
|||||||
|
|
||||||
// "log"
|
// "log"
|
||||||
|
|
||||||
"ems.agt/features/aaaa"
|
"be.ems/features/aaaa"
|
||||||
"ems.agt/features/cdr"
|
"be.ems/features/cdr"
|
||||||
"ems.agt/features/cm"
|
"be.ems/features/cm"
|
||||||
"ems.agt/features/dbrest"
|
"be.ems/features/dbrest"
|
||||||
"ems.agt/features/file"
|
"be.ems/features/file"
|
||||||
"ems.agt/features/fm"
|
"be.ems/features/fm"
|
||||||
"ems.agt/features/lm"
|
"be.ems/features/lm"
|
||||||
"ems.agt/features/mml"
|
"be.ems/features/mml"
|
||||||
"ems.agt/features/monitor/monitor"
|
"be.ems/features/monitor/monitor"
|
||||||
"ems.agt/features/monitor/psnet"
|
"be.ems/features/monitor/psnet"
|
||||||
"ems.agt/features/nbi"
|
"be.ems/features/nbi"
|
||||||
"ems.agt/features/pm"
|
"be.ems/features/pm"
|
||||||
"ems.agt/features/security"
|
"be.ems/features/security"
|
||||||
"ems.agt/features/sm"
|
"be.ems/features/sm"
|
||||||
"ems.agt/features/state"
|
"be.ems/features/state"
|
||||||
sysconfig "ems.agt/features/sys_config"
|
sysconfig "be.ems/features/sys_config"
|
||||||
sysdictdata "ems.agt/features/sys_dict_data"
|
sysdictdata "be.ems/features/sys_dict_data"
|
||||||
sysdicttype "ems.agt/features/sys_dict_type"
|
sysdicttype "be.ems/features/sys_dict_type"
|
||||||
sysmenu "ems.agt/features/sys_menu"
|
sysmenu "be.ems/features/sys_menu"
|
||||||
sysrole "ems.agt/features/sys_role"
|
sysrole "be.ems/features/sys_role"
|
||||||
sysuser "ems.agt/features/sys_user"
|
sysuser "be.ems/features/sys_user"
|
||||||
"ems.agt/features/trace"
|
"be.ems/features/trace"
|
||||||
udmuser "ems.agt/features/udm_user"
|
udmuser "be.ems/features/udm_user"
|
||||||
"ems.agt/features/ue"
|
"be.ems/features/ue"
|
||||||
"ems.agt/lib/midware"
|
"be.ems/lib/midware"
|
||||||
"ems.agt/lib/services"
|
"be.ems/lib/services"
|
||||||
"ems.agt/src/framework/middleware/collectlogs"
|
"be.ems/src/framework/middleware/collectlogs"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
@@ -166,9 +166,6 @@ func init() {
|
|||||||
Register("PUT", cm.CustomUriNeInfo, cm.PutNeInfo, nil)
|
Register("PUT", cm.CustomUriNeInfo, cm.PutNeInfo, nil)
|
||||||
Register("DELETE", cm.CustomUriNeInfo, cm.DeleteNeInfo, nil)
|
Register("DELETE", cm.CustomUriNeInfo, cm.DeleteNeInfo, nil)
|
||||||
|
|
||||||
Register("PUT", cm.UriOmcNeConfig, cm.PutOMCNeConfig, nil)
|
|
||||||
Register("PUT", cm.CustomUriOmcNeConfig, cm.PutOMCNeConfig, nil)
|
|
||||||
|
|
||||||
//ne service action handle
|
//ne service action handle
|
||||||
Register("POST", cm.UriNeService, cm.PostNeServiceAction, nil)
|
Register("POST", cm.UriNeService, cm.PostNeServiceAction, nil)
|
||||||
//ne service action handle
|
//ne service action handle
|
||||||
@@ -177,9 +174,12 @@ func init() {
|
|||||||
Register("POST", mml.UriMML, mml.PostMMLToNF, midware.LogMML)
|
Register("POST", mml.UriMML, mml.PostMMLToNF, midware.LogMML)
|
||||||
Register("POST", mml.UriMMLDiscard, mml.PostMMLToNF, nil)
|
Register("POST", mml.UriMMLDiscard, mml.PostMMLToNF, nil)
|
||||||
Register("POST", mml.UriOmMmlExt, mml.PostMMLToOMC, midware.LogMML)
|
Register("POST", mml.UriOmMmlExt, mml.PostMMLToOMC, midware.LogMML)
|
||||||
|
|
||||||
Register("POST", mml.CustomUriMML, mml.PostMMLToNF, midware.LogMML)
|
Register("POST", mml.CustomUriMML, mml.PostMMLToNF, midware.LogMML)
|
||||||
Register("POST", mml.CustomUriOmMmlExt, mml.PostMMLToOMC, midware.LogMML)
|
Register("POST", mml.CustomUriOmMmlExt, mml.PostMMLToOMC, midware.LogMML)
|
||||||
|
// post mml2 (standard upf port=5002)
|
||||||
|
Register("POST", mml.UriMML2, mml.PostMML2ToNF, midware.LogMML)
|
||||||
|
Register("POST", mml.CustomUriMML2, mml.PostMML2ToNF, midware.LogMML)
|
||||||
|
|
||||||
// Northbound Get NRM
|
// Northbound Get NRM
|
||||||
Register("GET", nbi.GetNRMUri, nbi.NBIGetNRMFromNF, nil)
|
Register("GET", nbi.GetNRMUri, nbi.NBIGetNRMFromNF, nil)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExecCmd(command, path string) ([]byte, error) {
|
func ExecCmd(command, path string) ([]byte, error) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package run
|
|||||||
import (
|
import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExecCmd(command, path string) ([]byte, error) {
|
func ExecCmd(command, path string) ([]byte, error) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package run
|
|||||||
import (
|
import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExecCmd(command, path string) ([]byte, error) {
|
func ExecCmd(command, path string) ([]byte, error) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"ems.agt/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
"ems.agt/lib/global"
|
"be.ems/lib/global"
|
||||||
"ems.agt/lib/log"
|
"be.ems/lib/log"
|
||||||
"ems.agt/lib/oauth"
|
"be.ems/lib/oauth"
|
||||||
"ems.agt/restagent/config"
|
"be.ems/restagent/config"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user