🚚 Move namespace
This commit is contained in:
parent
e158cb8819
commit
232ded4cd4
@ -4,7 +4,7 @@
|
|||||||
"type": "go",
|
"type": "go",
|
||||||
"name": "Run RoadSign",
|
"name": "Run RoadSign",
|
||||||
"goExecPath": "/opt/homebrew/bin/go",
|
"goExecPath": "/opt/homebrew/bin/go",
|
||||||
"buildParams": ["code.smartsheep.studio/goatworks/roadsign/pkg/cmd/server"],
|
"buildParams": ["git.solsynth.dev/goatworks/roadsign/pkg/cmd/server"],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -63,7 +63,7 @@ After that, you can manage your roadsign instance with RoadSign CLI aka. RDC.
|
|||||||
To install it, run this command. (Make sure you have golang toolchain on your computer)
|
To install it, run this command. (Make sure you have golang toolchain on your computer)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
go install code.smartsheep.studio/goatworks/roadsign/pkg/cmd/rdc@latest
|
go install git.solsynth.dev/goatworks/roadsign/pkg/cmd/rdc@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module code.smartsheep.studio/goatworks/roadsign
|
module git.solsynth.dev/goatworks/roadsign
|
||||||
|
|
||||||
go 1.21.4
|
go 1.21.4
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
roadsign "code.smartsheep.studio/goatworks/roadsign/pkg"
|
roadsign "git.solsynth.dev/goatworks/roadsign/pkg"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
jsoniter "github.com/json-iterator/go"
|
jsoniter "github.com/json-iterator/go"
|
||||||
|
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/cmd/rdc/conn"
|
"git.solsynth.dev/goatworks/roadsign/pkg/cmd/rdc/conn"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
|
@ -3,9 +3,9 @@ package main
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
roadsign "code.smartsheep.studio/goatworks/roadsign/pkg"
|
roadsign "git.solsynth.dev/goatworks/roadsign/pkg"
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/cmd/rdc/conn"
|
"git.solsynth.dev/goatworks/roadsign/pkg/cmd/rdc/conn"
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/cmd/rdc/deploy"
|
"git.solsynth.dev/goatworks/roadsign/pkg/cmd/rdc/deploy"
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
roadsign "code.smartsheep.studio/goatworks/roadsign/pkg"
|
roadsign "git.solsynth.dev/goatworks/roadsign/pkg"
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/hypertext"
|
"git.solsynth.dev/goatworks/roadsign/pkg/hypertext"
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/navi"
|
"git.solsynth.dev/goatworks/roadsign/pkg/navi"
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/sideload"
|
"git.solsynth.dev/goatworks/roadsign/pkg/sideload"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/navi"
|
"git.solsynth.dev/goatworks/roadsign/pkg/navi"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package hypertext
|
package hypertext
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/hypertext/status"
|
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
"git.solsynth.dev/goatworks/roadsign/pkg/hypertext/status"
|
||||||
jsoniter "github.com/json-iterator/go"
|
jsoniter "github.com/json-iterator/go"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package status
|
package status
|
||||||
|
|
||||||
import (
|
import (
|
||||||
roadsign "code.smartsheep.studio/goatworks/roadsign/pkg"
|
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
roadsign "git.solsynth.dev/goatworks/roadsign/pkg"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package navi
|
package navi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
roadsign "code.smartsheep.studio/goatworks/roadsign/pkg"
|
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/navi/transformers"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
roadsign "git.solsynth.dev/goatworks/roadsign/pkg"
|
||||||
|
"git.solsynth.dev/goatworks/roadsign/pkg/navi/transformers"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/navi/transformers"
|
"git.solsynth.dev/goatworks/roadsign/pkg/navi/transformers"
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/warden"
|
"git.solsynth.dev/goatworks/roadsign/pkg/warden"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
)
|
)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package navi
|
package navi
|
||||||
|
|
||||||
import "code.smartsheep.studio/goatworks/roadsign/pkg/warden"
|
import "git.solsynth.dev/goatworks/roadsign/pkg/warden"
|
||||||
|
|
||||||
func InitializeWarden(regions []*Region) {
|
func InitializeWarden(regions []*Region) {
|
||||||
pool := make([]*warden.AppInstance, 0)
|
pool := make([]*warden.AppInstance, 0)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package sideload
|
package sideload
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/navi"
|
"git.solsynth.dev/goatworks/roadsign/pkg/navi"
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/warden"
|
"git.solsynth.dev/goatworks/roadsign/pkg/warden"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package sideload
|
package sideload
|
||||||
|
|
||||||
import (
|
import (
|
||||||
roadsign "code.smartsheep.studio/goatworks/roadsign/pkg"
|
roadsign "git.solsynth.dev/goatworks/roadsign/pkg"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package sideload
|
package sideload
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/navi"
|
"git.solsynth.dev/goatworks/roadsign/pkg/navi"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package sideload
|
package sideload
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/warden"
|
|
||||||
"context"
|
"context"
|
||||||
|
"git.solsynth.dev/goatworks/roadsign/pkg/warden"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/navi"
|
"git.solsynth.dev/goatworks/roadsign/pkg/navi"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/navi"
|
"git.solsynth.dev/goatworks/roadsign/pkg/navi"
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/warden"
|
"git.solsynth.dev/goatworks/roadsign/pkg/warden"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/pelletier/go-toml/v2"
|
"github.com/pelletier/go-toml/v2"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
@ -42,7 +42,7 @@ func doSync(c *fiber.Ctx) error {
|
|||||||
file.Write(raw)
|
file.Write(raw)
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
var rebootQueue []*warden.AppInstance
|
var rebootQueue []*warden.AppInstance
|
||||||
if region, ok := lo.Find(navi.R.Regions, func(item *navi.Region) bool {
|
if region, ok := lo.Find(navi.R.Regions, func(item *navi.Region) bool {
|
||||||
return item.ID == id
|
return item.ID == id
|
||||||
@ -57,7 +57,7 @@ func doSync(c *fiber.Ctx) error {
|
|||||||
|
|
||||||
// Reload
|
// Reload
|
||||||
navi.ReadInConfig(viper.GetString("paths.configs"))
|
navi.ReadInConfig(viper.GetString("paths.configs"))
|
||||||
|
|
||||||
// Reboot
|
// Reboot
|
||||||
for _, instance := range rebootQueue {
|
for _, instance := range rebootQueue {
|
||||||
instance.Wake()
|
instance.Wake()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package sideload
|
package sideload
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/navi"
|
"git.solsynth.dev/goatworks/roadsign/pkg/navi"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package sideload
|
package sideload
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/sideload/view"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.solsynth.dev/goatworks/roadsign/pkg/sideload/view"
|
||||||
"github.com/gofiber/fiber/v2/middleware/filesystem"
|
"github.com/gofiber/fiber/v2/middleware/filesystem"
|
||||||
jsoniter "github.com/json-iterator/go"
|
jsoniter "github.com/json-iterator/go"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
roadsign "code.smartsheep.studio/goatworks/roadsign/pkg"
|
roadsign "git.solsynth.dev/goatworks/roadsign/pkg"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/gofiber/fiber/v2/middleware/basicauth"
|
"github.com/gofiber/fiber/v2/middleware/basicauth"
|
||||||
"github.com/gofiber/fiber/v2/middleware/logger"
|
"github.com/gofiber/fiber/v2/middleware/logger"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package sideload
|
package sideload
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/navi"
|
"git.solsynth.dev/goatworks/roadsign/pkg/navi"
|
||||||
"code.smartsheep.studio/goatworks/roadsign/pkg/warden"
|
"git.solsynth.dev/goatworks/roadsign/pkg/warden"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user