ing
This commit is contained in:
@@ -3,14 +3,14 @@ package service
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
"git.loafle.net/commons/configuration-go"
|
||||
cda "git.loafle.net/commons/di-go/annotation"
|
||||
cdr "git.loafle.net/commons/di-go/registry"
|
||||
logging "git.loafle.net/commons/logging-go"
|
||||
crc "git.loafle.net/commons/rpc-go/client"
|
||||
ocnc "git.loafle.net/overflow/commons-go/noauthprobe/config"
|
||||
occn "git.loafle.net/overflow/commons-go/config/noauthprobe"
|
||||
"git.loafle.net/overflow/commons-go/core/util"
|
||||
"git.loafle.net/overflow/probe/client/central"
|
||||
"git.loafle.net/overflow/probe/config"
|
||||
|
||||
@@ -28,7 +28,7 @@ type NoAuthProbeService struct {
|
||||
cda.TypeAnnotation `annotation:"@overflow:AuthRPCService()"`
|
||||
|
||||
Config *config.Config `annotation:"@Resource(name='Config')"`
|
||||
AuthConfig *ocnc.Auth `annotation:"@Resource(name='AuthConfig')"`
|
||||
AuthConfig *occn.Auth `annotation:"@Resource(name='AuthConfig')"`
|
||||
AuthDoneChan chan error `annotation:"@Resource(name='AuthDoneChan')"`
|
||||
|
||||
client *crc.Client
|
||||
@@ -65,7 +65,7 @@ func (s *NoAuthProbeService) DestroyService() {
|
||||
func (s *NoAuthProbeService) Accept(probeKey string) error {
|
||||
logging.Logger().Infof("accepted by central")
|
||||
|
||||
n := time.Now()
|
||||
n := util.Now()
|
||||
s.AuthConfig.AcceptedDate = &n
|
||||
if err := configuration.Save(s.AuthConfig, config.NoAuthProbeConfigFilePath(), true); nil != err {
|
||||
logging.Logger().Error(err)
|
||||
@@ -86,7 +86,7 @@ func (s *NoAuthProbeService) Accept(probeKey string) error {
|
||||
|
||||
func (s *NoAuthProbeService) Deny() error {
|
||||
logging.Logger().Infof("denied by central")
|
||||
n := time.Now()
|
||||
n := util.Now()
|
||||
s.AuthConfig.DeniedDate = &n
|
||||
if err := configuration.Save(s.AuthConfig, config.NoAuthProbeConfigFilePath(), true); nil != err {
|
||||
logging.Logger().Error(err)
|
||||
|
||||
Reference in New Issue
Block a user