mirror of
https://gitee.com/god-jason/iot-master.git
synced 2025-12-06 06:58:55 +08:00
优化导入
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package calc
|
||||
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/PaesslerAG/gval"
|
||||
"github.com/spf13/cast"
|
||||
"math"
|
||||
)
|
||||
|
||||
func tarFunc(fun func(x float64) float64) func(x any) float64 {
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
_ "github.com/busy-cloud/boat-ui"
|
||||
_ "github.com/busy-cloud/boat/apis"
|
||||
_ "github.com/busy-cloud/boat/apps"
|
||||
@@ -19,10 +24,6 @@ import (
|
||||
_ "github.com/god-jason/iot-master" //主程序
|
||||
"github.com/spf13/pflag"
|
||||
"github.com/spf13/viper"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
func Startup() error {
|
||||
|
||||
4
go.mod
4
go.mod
@@ -2,15 +2,13 @@ module github.com/god-jason/iot-master
|
||||
|
||||
go 1.24.0
|
||||
|
||||
toolchain go1.24.6
|
||||
|
||||
require (
|
||||
github.com/PaesslerAG/gval v1.2.4
|
||||
github.com/busy-cloud/boat v0.6.19
|
||||
github.com/busy-cloud/boat-ui v0.5.9
|
||||
github.com/busy-cloud/dash v0.5.0
|
||||
github.com/busy-cloud/influxdb v0.5.0
|
||||
github.com/busy-cloud/modbus v0.5.1
|
||||
github.com/busy-cloud/modbus v0.5.2
|
||||
github.com/busy-cloud/saas v0.5.0
|
||||
github.com/busy-cloud/serial-port v0.5.0
|
||||
github.com/busy-cloud/tcp-client v0.5.0
|
||||
|
||||
4
go.sum
4
go.sum
@@ -20,8 +20,8 @@ github.com/busy-cloud/dash v0.5.0 h1:v7onTsSlRKKPN/OHnczyAfPL8+h0pIzrF6FHNh1IJT8
|
||||
github.com/busy-cloud/dash v0.5.0/go.mod h1:YpLLCh50vwRy47NM9FFrAeg07Mh0qLxz6dzqYPJZm9c=
|
||||
github.com/busy-cloud/influxdb v0.5.0 h1:4f3MYHOXbc9WQ3pMd4vEz46/iLHBXUrhRlHgxh64q98=
|
||||
github.com/busy-cloud/influxdb v0.5.0/go.mod h1:qDqN+0fbxovdble0l7+VgbTtvij0W08+rDvigQKGD9c=
|
||||
github.com/busy-cloud/modbus v0.5.1 h1:pVcDJlsaQ7Yxm0a/10eP85VMx9hmYSnV3azTxLLKRBQ=
|
||||
github.com/busy-cloud/modbus v0.5.1/go.mod h1:VFGDov4WJpvKQoPalX3A76vcIuQzfIO/IhK51r8VUdY=
|
||||
github.com/busy-cloud/modbus v0.5.2 h1:RefbKg2X1eMltg8JW+xmAetDeEweWX//B+51+tiyqVQ=
|
||||
github.com/busy-cloud/modbus v0.5.2/go.mod h1:HgKz0IH+ienGiv/5mTUY8w1LGqVvISopeaXfICLKRKc=
|
||||
github.com/busy-cloud/saas v0.5.0 h1:bXYw3hIpz6GFxWgWyCcyrC406Hg20/H8M3ree/dT5WY=
|
||||
github.com/busy-cloud/saas v0.5.0/go.mod h1:R+w5szBS+OSJigv32YuAJZdtDSvX5wLQ/j0/dc7riwM=
|
||||
github.com/busy-cloud/serial-port v0.5.0 h1:PZ8wSfijbTJoAuYSYPEG3I5lqty4hZanMyCfDO054EI=
|
||||
|
||||
@@ -2,10 +2,11 @@ package internal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/busy-cloud/boat/db"
|
||||
"github.com/busy-cloud/boat/lib"
|
||||
"github.com/god-jason/iot-master/product"
|
||||
"strings"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,10 +3,11 @@ package internal
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/busy-cloud/boat/log"
|
||||
"github.com/busy-cloud/boat/mqtt"
|
||||
"github.com/god-jason/iot-master/protocol"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func mqttSubscribeDevice() {
|
||||
|
||||
@@ -2,15 +2,16 @@ package internal
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/busy-cloud/boat/db"
|
||||
"github.com/busy-cloud/boat/lib"
|
||||
"github.com/busy-cloud/boat/log"
|
||||
"github.com/busy-cloud/boat/mqtt"
|
||||
"github.com/god-jason/iot-master/product"
|
||||
"github.com/god-jason/iot-master/protocol"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Property struct {
|
||||
|
||||
@@ -2,6 +2,7 @@ package internal
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/busy-cloud/boat/db"
|
||||
"github.com/busy-cloud/boat/lib"
|
||||
)
|
||||
|
||||
@@ -2,10 +2,11 @@ package internal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/busy-cloud/boat/db"
|
||||
"github.com/busy-cloud/boat/log"
|
||||
"github.com/busy-cloud/boat/mqtt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func mqttSubscribeLink() {
|
||||
|
||||
@@ -2,10 +2,11 @@ package internal
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/busy-cloud/boat/db"
|
||||
"github.com/busy-cloud/boat/lib"
|
||||
"github.com/busy-cloud/boat/mqtt"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Link struct {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/busy-cloud/boat/api"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -3,13 +3,14 @@ package internal
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/PaesslerAG/gval"
|
||||
"github.com/god-jason/iot-master/calc"
|
||||
"github.com/god-jason/iot-master/product"
|
||||
"github.com/spf13/cast"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Validator struct {
|
||||
|
||||
1
main.go
1
main.go
@@ -3,6 +3,7 @@ package iot_master
|
||||
import (
|
||||
"embed"
|
||||
"encoding/json"
|
||||
|
||||
_ "github.com/busy-cloud/boat-ui"
|
||||
"github.com/busy-cloud/boat/apps"
|
||||
"github.com/busy-cloud/boat/log"
|
||||
|
||||
@@ -2,6 +2,7 @@ package product
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package protocol
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/busy-cloud/boat/log"
|
||||
"github.com/busy-cloud/boat/mqtt"
|
||||
"github.com/god-jason/iot-master/product"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func Create(protocol *Protocol, manager MasterManager) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package protocol
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/god-jason/iot-master/bin"
|
||||
"github.com/god-jason/iot-master/product"
|
||||
"github.com/spf13/cast"
|
||||
|
||||
@@ -3,6 +3,10 @@ package main
|
||||
import (
|
||||
_ "embed"
|
||||
"encoding/json"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
_ "github.com/busy-cloud/boat-ui"
|
||||
_ "github.com/busy-cloud/boat/apis"
|
||||
"github.com/busy-cloud/boat/apps"
|
||||
@@ -22,9 +26,6 @@ import (
|
||||
_ "github.com/busy-cloud/tcp-server"
|
||||
_ "github.com/god-jason/iot-master"
|
||||
"github.com/spf13/viper"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
Reference in New Issue
Block a user