added
noaauth agent service
This commit is contained in:
parent
67a881d800
commit
403352195e
|
@ -1,7 +1,7 @@
|
|||
package noauthagent
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
|
||||
"git.loafle.net/overflow/commons_go/model/timestamp"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy"
|
||||
"encoding/json"
|
||||
|
@ -26,6 +26,9 @@ type NoAuthAgent struct {
|
|||
HostName string `json:"hostName,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
func NewNoAuthAgent(apikey string, localIp int64, hostName string) *NoAuthAgent {
|
||||
|
||||
na := &NoAuthAgent{
|
||||
|
@ -37,18 +40,6 @@ func NewNoAuthAgent(apikey string, localIp int64, hostName string) *NoAuthAgent
|
|||
return na
|
||||
}
|
||||
|
||||
func(as *NoAuthAgentService)CreateTempKey(na *NoAuthAgent) (error) {
|
||||
|
||||
uu, err := uuid.NewUUID();
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
na.TempKey = uu.String()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func(as *NoAuthAgentService)SaveNoAuthAgent(na *NoAuthAgent) (string, error) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user