diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 96844794..6b8123fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,7 +81,7 @@ jobs: sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev go test -p 1 ./... -v go install honnef.co/go/tools/cmd/staticcheck@latest - { ~/go/bin/staticcheck -tags=ee ./... ; ~/go/bin/staticcheck ./... ; } | ~/go/bin/staticcheck -merge + { ~/go/bin/staticcheck -tags=ee ./... ; } env: DATABASE: sqlite CLIENT_MODE: "off" diff --git a/ee/license.go b/ee/license.go index ff4d291c..eb614cb2 100644 --- a/ee/license.go +++ b/ee/license.go @@ -239,13 +239,3 @@ func getCachedResponse() ([]byte, error) { func ClearLicenseCache() error { return database.DeleteRecord(database.CACHE_TABLE_NAME, license_cache_key) } - -func getServerCount() int { - if record, err := database.FetchRecord(database.SERVERCONF_TABLE_NAME, server_id_key); err == nil { - currentServerIDs := serverIDs{} - if err = json.Unmarshal([]byte(record), ¤tServerIDs); err == nil { - return len(currentServerIDs.ServerIDs) - } - } - return 1 -} diff --git a/ee/types.go b/ee/types.go index d802e1af..2e6a7c41 100644 --- a/ee/types.go +++ b/ee/types.go @@ -81,7 +81,3 @@ type ValidateLicenseRequest struct { type licenseResponseCache struct { Body []byte `json:"body" binding:"required"` } - -type serverIDs struct { - ServerIDs []string `json:"server_ids" binding:"required"` -} diff --git a/models/accessToken.go b/models/accessToken.go index 6c3d704d..61cd3a08 100644 --- a/models/accessToken.go +++ b/models/accessToken.go @@ -1,10 +1,12 @@ package models +// AccessToken - token used to access netmaker type AccessToken struct { APIConnString string `json:"apiconnstring"` ClientConfig } +// ClientConfig - the config of the client type ClientConfig struct { Network string `json:"network"` Key string `json:"key"`