added meta
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"git.loafle.net/overflow/overflow_service/proxy/domain"
|
||||
"errors"
|
||||
"git.loafle.net/overflow/overflow_service/proxy/utils"
|
||||
"git.loafle.net/overflow/overflow_service/proxy/meta"
|
||||
)
|
||||
|
||||
type NoAuthProbeService struct {
|
||||
@@ -28,14 +29,14 @@ type NoAuthProbe struct {
|
||||
IpAddress int64 `json:"ipAddress,omitempty"`
|
||||
|
||||
// P rocess, A ccept, D eny
|
||||
Status string `json:"status,omitempty"`
|
||||
Status *meta.MetaNoAuthProbeStatus `json:"status,omitempty"`
|
||||
|
||||
TempProbeKey string `json:"tempProbeKey,omitempty"`
|
||||
|
||||
CreateDate timestamp.Timestamp`json:"createDate,omitempty"`
|
||||
ApiKey string `json:"apiKey,omitempty"`
|
||||
Domain domain.Domain `json:"domain,omitempty"`
|
||||
Probe probe.Probe `json:"probe,omitempty"`
|
||||
Domain *domain.Domain `json:"domain,omitempty"`
|
||||
Probe *probe.Probe `json:"probe,omitempty"`
|
||||
|
||||
}
|
||||
|
||||
@@ -55,17 +56,6 @@ func NewNoAuthProbe(apikey string, ipAddress int64, hostName string, md int64) *
|
||||
|
||||
func(as *NoAuthProbeService)Save(na *NoAuthProbe) (string, error) {
|
||||
|
||||
|
||||
//bytes, err := json.Marshal(na)
|
||||
//if err != nil {
|
||||
// return "",err
|
||||
//}
|
||||
//
|
||||
//memMap := make(map[string]string)
|
||||
//memMap["com.loafle.overflow.module.noauthprobe.model.NoAuthProbe"] = string(bytes);
|
||||
//
|
||||
//out, err := proxy.InvokeDB("noauthProbe", "save", memMap);
|
||||
|
||||
out, err := utils.InvokeDBByModel("noauthProbe", "save", na, "com.loafle.overflow.module.noauthprobe.model.NoAuthProbe")
|
||||
|
||||
if err != nil {
|
||||
@@ -110,20 +100,6 @@ func(as *NoAuthProbeService)CheckAuth(tempKey string) (string,error) {
|
||||
|
||||
func(as *NoAuthProbeService)GetList(d *domain.Domain) (string,error) {
|
||||
|
||||
//memMap := make(map[string]string)
|
||||
//
|
||||
//na := NewNoAuthProbe("", 0, "", 0)
|
||||
//na.Status = excludeStatus
|
||||
//
|
||||
//bytes, err := json.Marshal(na)
|
||||
//if err != nil {
|
||||
// return "", err;
|
||||
//}
|
||||
//
|
||||
//memMap["com.loafle.overflow.noauthprobe.model.NoAuthProbe"] = string(bytes);
|
||||
//
|
||||
//out, err := proxy.InvokeDB("noauthProbe", "findAllByNoAuth", memMap);
|
||||
|
||||
out, err := utils.InvokeDBByModel("noauthProbe","findAllByDomain", d, "com.loafle.overflow.module.domain.model.Domain");
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user