changed
pacaget
agent -> probe
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
type NoAuthProbeService struct {
|
||||
}
|
||||
|
||||
func NewNoAuthAgentService() *NoAuthProbeService {
|
||||
func NewNoAuthProbeService() *NoAuthProbeService {
|
||||
return &NoAuthProbeService{}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type NoAuthProbe struct {
|
||||
}
|
||||
|
||||
|
||||
func NewNoAuthAgent(apikey string, localIp int64, hostName string) *NoAuthProbe {
|
||||
func NewNoAuthProbe(apikey string, localIp int64, hostName string) *NoAuthProbe {
|
||||
|
||||
na := &NoAuthProbe{
|
||||
Date:timestamp.Now(),
|
||||
@@ -41,7 +41,7 @@ func NewNoAuthAgent(apikey string, localIp int64, hostName string) *NoAuthProbe
|
||||
}
|
||||
|
||||
|
||||
func(as *NoAuthProbeService)SaveNoAuthAgent(na *NoAuthProbe) (string, error) {
|
||||
func(as *NoAuthProbeService)Save(na *NoAuthProbe) (string, error) {
|
||||
|
||||
|
||||
bytes, err := json.Marshal(na)
|
||||
@@ -52,7 +52,7 @@ func(as *NoAuthProbeService)SaveNoAuthAgent(na *NoAuthProbe) (string, error) {
|
||||
memMap := make(map[string]string)
|
||||
memMap["com.loafle.overflow.noauthprobe.model.NoAuthProbe"] = string(bytes);
|
||||
|
||||
out, err := proxy.InvokeDB("noauthAgent", "create", memMap);
|
||||
out, err := proxy.InvokeDB("noauthProbe", "create", memMap);
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -65,7 +65,7 @@ func(as *NoAuthProbeService)CheckAuth(tempKey string) (string,error) {
|
||||
|
||||
memMap := make(map[string]string)
|
||||
|
||||
na := NewNoAuthAgent("", 0, "")
|
||||
na := NewNoAuthProbe("", 0, "")
|
||||
na.TempKey = tempKey
|
||||
|
||||
bytes, err := json.Marshal(na)
|
||||
@@ -75,7 +75,7 @@ func(as *NoAuthProbeService)CheckAuth(tempKey string) (string,error) {
|
||||
|
||||
memMap["com.loafle.overflow.noauthprobe.model.NoAuthProbe"] = string(bytes);
|
||||
|
||||
out, err := proxy.InvokeDB("noauthAgent", "findByTempKey", memMap);
|
||||
out, err := proxy.InvokeDB("noauthProbe", "findByTempKey", memMap);
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -92,11 +92,11 @@ func(as *NoAuthProbeService)CheckAuth(tempKey string) (string,error) {
|
||||
}
|
||||
|
||||
|
||||
func(as *NoAuthProbeService)GetNoAuthList(excludeStatus string) (string,error) {
|
||||
func(as *NoAuthProbeService)GetList(excludeStatus string) (string,error) {
|
||||
|
||||
memMap := make(map[string]string)
|
||||
|
||||
na := NewNoAuthAgent("", 0, "")
|
||||
na := NewNoAuthProbe("", 0, "")
|
||||
na.AuthStatus = excludeStatus
|
||||
|
||||
bytes, err := json.Marshal(na)
|
||||
@@ -106,7 +106,7 @@ func(as *NoAuthProbeService)GetNoAuthList(excludeStatus string) (string,error) {
|
||||
|
||||
memMap["com.loafle.overflow.noauthprobe.model.NoAuthProbe"] = string(bytes);
|
||||
|
||||
out, err := proxy.InvokeDB("noauthAgent", "findAllByNoAuth", memMap);
|
||||
out, err := proxy.InvokeDB("noauthProbe", "findAllByNoAuth", memMap);
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -127,7 +127,7 @@ func (as *NoAuthProbeService)RequestAuth(noauthAgt NoAuthProbe, memberId, desc s
|
||||
return "", err;
|
||||
}
|
||||
paramMap["com.loafle.overflow.noauthprobe.model.NoAuthProbe"] = string(bytes)
|
||||
out, err := proxy.InvokeDB("noauthAgent", "update", paramMap)
|
||||
out, err := proxy.InvokeDB("noauthProbe", "update", paramMap)
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -139,7 +139,7 @@ func (as *NoAuthProbeService)RequestAuth(noauthAgt NoAuthProbe, memberId, desc s
|
||||
m := member.Member{}
|
||||
m.Id = json.Number(memberId)
|
||||
newAgent := probe.NewAgent(desc, m)
|
||||
newone, err := probe.NewAgentService().SaveAgent(newAgent)
|
||||
newone, err := probe.NewProbeService().SaveAgent(newAgent)
|
||||
if err!= nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -147,10 +147,10 @@ func (as *NoAuthProbeService)RequestAuth(noauthAgt NoAuthProbe, memberId, desc s
|
||||
return newone, nil
|
||||
}
|
||||
|
||||
func (as *NoAuthProbeService)ReadNoAuthAgent(id string) (string, error){
|
||||
func (as *NoAuthProbeService)Read(id string) (string, error){
|
||||
mm := make(map[string]string)
|
||||
mm["id"] = id
|
||||
out, err := proxy.InvokeDB("noauthAgent", "find", mm)
|
||||
out, err := proxy.InvokeDB("noauthProbe", "find", mm)
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user