alroyso 10 mesiacov pred
rodič
commit
b7a6fe714a
4 zmenil súbory, kde vykonal 10 pridanie a 2 odobranie
  1. 4 1
      go.mod
  2. 2 0
      go.sum
  3. 1 1
      hack/hack.mk
  4. 3 0
      internal/cmd/cmd.go

+ 4 - 1
go.mod

@@ -2,7 +2,10 @@ module goautodownload
 
 go 1.18
 
-require github.com/gogf/gf/v2 v2.5.2
+require (
+	github.com/gogf/gf/v2 v2.5.2
+	github.com/imshuai/alistsdk-go v1.0.1
+)
 
 require (
 	github.com/BurntSushi/toml v1.2.0 // indirect

+ 2 - 0
go.sum

@@ -19,6 +19,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm
 github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
 github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
 github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
+github.com/imshuai/alistsdk-go v1.0.1 h1:/KXS7n44zFjvFeaGLMqFYBpQwu/pBkDx+W7pK0vPs7Q=
+github.com/imshuai/alistsdk-go v1.0.1/go.mod h1:T7hGnP0hBEe6UrFKaUT342LAKlkYJDZmV+MDYBEmxnY=
 github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
 github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
 github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=

+ 1 - 1
hack/hack.mk

@@ -10,7 +10,7 @@ up: cli.install
 build: cli.install
 	@gf build -ew
 
-# Parse api and generate controller/sdk.
+# Parse api and generate controller/aptTools.
 .PHONY: ctrl
 ctrl: cli.install
 	@gf gen ctrl

+ 3 - 0
internal/cmd/cmd.go

@@ -2,6 +2,7 @@ package cmd
 
 import (
 	"context"
+	"goautodownload/internal/controller/alist"
 
 	"github.com/gogf/gf/v2/frame/g"
 	"github.com/gogf/gf/v2/net/ghttp"
@@ -17,10 +18,12 @@ var (
 		Brief: "start http server",
 		Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
 			s := g.Server()
+
 			s.Group("/", func(group *ghttp.RouterGroup) {
 				group.Middleware(ghttp.MiddlewareHandlerResponse)
 				group.Bind(
 					hello.NewV1(),
+					alist.NewV1(),
 				)
 			})
 			s.Run()