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