minor refactor of config values, update go mod
This commit is contained in:
@@ -27,7 +27,7 @@ func Run() {
|
||||
config := GetConfig(*configPath)
|
||||
log.Printf("[INFO] initialized config from %s", *configPath)
|
||||
|
||||
token := fmt.Sprintf(`%s@%s!%s`, config.PVE.Token.USER, config.PVE.Token.REALM, config.PVE.Token.ID)
|
||||
token := fmt.Sprintf(`%s@%s!%s`, config.PVE.Token.User, config.PVE.Token.Realm, config.PVE.Token.ID)
|
||||
client = NewClient(config.PVE.URL, token, config.PVE.Token.Secret)
|
||||
|
||||
router := gin.Default()
|
||||
|
||||
@@ -14,8 +14,8 @@ type Config struct {
|
||||
PVE struct {
|
||||
URL string `json:"url"`
|
||||
Token struct {
|
||||
USER string `json:"user"`
|
||||
REALM string `json:"realm"`
|
||||
User string `json:"user"`
|
||||
Realm string `json:"realm"`
|
||||
ID string `json:"id"`
|
||||
Secret string `json:"uuid"`
|
||||
}
|
||||
|
||||
12
go.mod
12
go.mod
@@ -4,23 +4,23 @@ go 1.26.0
|
||||
|
||||
require (
|
||||
github.com/gin-gonic/gin v1.12.0
|
||||
github.com/luthermonson/go-proxmox v0.4.0
|
||||
github.com/luthermonson/go-proxmox v0.4.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/buger/goterm v1.0.4 // indirect
|
||||
github.com/bytedance/gopkg v0.1.4 // indirect
|
||||
github.com/bytedance/sonic v1.15.0 // indirect
|
||||
github.com/bytedance/sonic/loader v0.5.0 // indirect
|
||||
github.com/bytedance/sonic/loader v0.5.1 // indirect
|
||||
github.com/cloudwego/base64x v0.1.6 // indirect
|
||||
github.com/diskfs/go-diskfs v1.8.0 // indirect
|
||||
github.com/diskfs/go-diskfs v1.9.1 // indirect
|
||||
github.com/djherbis/times v1.6.0 // indirect
|
||||
github.com/elliotwutingfeng/asciiset v0.0.0-20260129054604-cfde2086bc57 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.13 // indirect
|
||||
github.com/gin-contrib/sse v1.1.0 // indirect
|
||||
github.com/gin-contrib/sse v1.1.1 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.30.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.30.2 // indirect
|
||||
github.com/goccy/go-json v0.10.6 // indirect
|
||||
github.com/goccy/go-yaml v1.19.2 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
@@ -30,7 +30,7 @@ require (
|
||||
github.com/klauspost/compress v1.18.4 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/magefile/mage v1.16.1 // indirect
|
||||
github.com/magefile/mage v1.17.1 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
|
||||
Reference in New Issue
Block a user