Browse Source

change module name

joe 4 years ago
parent
commit
53536d6ceb

+ 6 - 6
cmd/install.go

@@ -2,10 +2,10 @@ package cmd
 
 import (
 	"fmt"
+	"git.wanbits.cc/sin/flytalk/config"
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/tools"
 	"github.com/spf13/cobra"
-	"github.com/wenstudio/gofly/config"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/tools"
 	"io/ioutil"
 	"os"
 	"strings"
@@ -13,18 +13,18 @@ import (
 
 var installCmd = &cobra.Command{
 	Use:   "install",
-	Short: "example:gofly install",
+	Short: "example:flytalk install",
 	Run: func(cmd *cobra.Command, args []string) {
 		install()
 	},
 }
 
 func install() {
-	sqlFile := config.Dir + "go-fly.sql"
+	sqlFile := config.Dir + "flytalk.sql"
 	isExit, _ := tools.IsFileExist(config.MysqlConf)
 	dataExit, _ := tools.IsFileExist(sqlFile)
 	if !isExit || !dataExit {
-		fmt.Println("config/mysql.json 数据库配置文件或者数据库文件go-fly.sql不存在")
+		fmt.Println("config/mysql.json 数据库配置文件或者数据库文件flytalk.sql不存在")
 		os.Exit(1)
 	}
 	sqls, _ := ioutil.ReadFile(sqlFile)

+ 3 - 3
cmd/root.go

@@ -8,9 +8,9 @@ import (
 )
 
 var rootCmd = &cobra.Command{
-	Use:   "gofly",
-	Short: "gofly",
-	Long:  `简洁快速的GO语言WEB在线客服`,
+	Use:   "flytalk",
+	Short: "flytalk",
+	Long:  `简洁快速的在线 Web 客服系统`,
 	Args:  args,
 	Run: func(cmd *cobra.Command, args []string) {
 

+ 8 - 8
cmd/server.go

@@ -1,15 +1,15 @@
 package cmd
 
 import (
+	"git.wanbits.cc/sin/flytalk/config"
+	"git.wanbits.cc/sin/flytalk/docs"
+	"git.wanbits.cc/sin/flytalk/router"
+	"git.wanbits.cc/sin/flytalk/tools"
 	"github.com/gin-contrib/cors"
 	"github.com/gin-gonic/gin"
 	"github.com/spf13/cobra"
 	ginSwagger "github.com/swaggo/gin-swagger"
 	"github.com/swaggo/gin-swagger/swaggerFiles"
-	"github.com/wenstudio/gofly/config"
-	"github.com/wenstudio/gofly/docs"
-	"github.com/wenstudio/gofly/router"
-	"github.com/wenstudio/gofly/tools"
 	"log"
 	"os"
 	"os/exec"
@@ -25,8 +25,8 @@ var (
 )
 var serverCmd = &cobra.Command{
 	Use:     "server",
-	Short:   "example:gofly server port 8081",
-	Example: "gofly server -c config/",
+	Short:   "example:flytalk server port 8081",
+	Example: "flytalk server -c config/",
 	Run: func(cmd *cobra.Command, args []string) {
 		run()
 	},
@@ -69,10 +69,10 @@ func run() {
 
 	//文档服务
 	docs.SwaggerInfo.Title = "接口文档"
-	docs.SwaggerInfo.Description = "go-fly即时通讯web客服管理系统 , 测试账户:kefu2 测试密码:123 类型:kefu"
+	docs.SwaggerInfo.Description = "flytalk 客服系统 , 测试账户:kefu2 测试密码:123 类型:kefu"
 	docs.SwaggerInfo.Version = "0.0.7"
 	//docs.SwaggerInfo.Host = "127.0.0.1:"+port
-	docs.SwaggerInfo.Host = "gofly.sopans.com"
+	docs.SwaggerInfo.Host = "flytalk.sopans.com"
 	docs.SwaggerInfo.BasePath = "/"
 	docs.SwaggerInfo.Schemes = []string{"https"}
 	engine.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))

+ 3 - 3
cmd/version.go

@@ -2,14 +2,14 @@ package cmd
 
 import (
 	"fmt"
+	"git.wanbits.cc/sin/flytalk/config"
 	"github.com/spf13/cobra"
-	"github.com/wenstudio/gofly/config"
 )
 
 var versionCmd = &cobra.Command{
 	Use:   "version",
-	Short: "example:gofly version",
+	Short: "example:flytalk version",
 	Run: func(cmd *cobra.Command, args []string) {
-		fmt.Println("gofly " + config.Version)
+		fmt.Println("flytalk " + config.Version)
 	},
 }

+ 1 - 1
config/config.go

@@ -3,7 +3,7 @@ package config
 import (
 	"encoding/json"
 	"fmt"
-	"github.com/wenstudio/gofly/tools"
+	"git.wanbits.cc/sin/flytalk/tools"
 	"io/ioutil"
 	"os"
 )

+ 0 - 0
config/go-fly.sql → config/flytalk.sql


+ 1 - 1
controller/about.go

@@ -1,8 +1,8 @@
 package controller
 
 import (
+	"git.wanbits.cc/sin/flytalk/models"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/models"
 )
 
 func GetAbout(c *gin.Context) {

+ 3 - 3
controller/auth.go

@@ -1,9 +1,9 @@
 package controller
 
 import (
-	"github.com/wenstudio/gofly/config"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/tools"
+	"git.wanbits.cc/sin/flytalk/config"
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/tools"
 )
 
 func CheckPass(username string, password string) string {

+ 2 - 2
controller/chat.go

@@ -2,10 +2,10 @@ package controller
 
 import (
 	"encoding/json"
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/ws"
 	"github.com/gin-gonic/gin"
 	"github.com/gorilla/websocket"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/ws"
 	"log"
 	"net/http"
 	"sort"

+ 3 - 3
controller/folder.go

@@ -2,10 +2,10 @@ package controller
 
 import (
 	"encoding/json"
+	"git.wanbits.cc/sin/flytalk/config"
+	"git.wanbits.cc/sin/flytalk/tmpl"
+	"git.wanbits.cc/sin/flytalk/tools"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/config"
-	"github.com/wenstudio/gofly/tmpl"
-	"github.com/wenstudio/gofly/tools"
 	"io/ioutil"
 	"net/http"
 	"strconv"

+ 1 - 1
controller/index.go

@@ -1,8 +1,8 @@
 package controller
 
 import (
+	"git.wanbits.cc/sin/flytalk/models"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/models"
 )
 
 func Index(c *gin.Context) {

+ 2 - 2
controller/ip.go

@@ -1,9 +1,9 @@
 package controller
 
 import (
+	"git.wanbits.cc/sin/flytalk/config"
+	"git.wanbits.cc/sin/flytalk/models"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/config"
-	"github.com/wenstudio/gofly/models"
 	"strconv"
 )
 

+ 2 - 2
controller/kefu.go

@@ -1,9 +1,9 @@
 package controller
 
 import (
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/tools"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/tools"
 	"strconv"
 )
 

+ 1 - 1
controller/login.go

@@ -1,8 +1,8 @@
 package controller
 
 import (
+	"git.wanbits.cc/sin/flytalk/tools"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/tools"
 	"time"
 )
 

+ 3 - 3
controller/main.go

@@ -1,10 +1,10 @@
 package controller
 
 import (
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/tmpl"
+	"git.wanbits.cc/sin/flytalk/tools"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/tmpl"
-	"github.com/wenstudio/gofly/tools"
 	"net/http"
 )
 

+ 5 - 5
controller/message.go

@@ -3,13 +3,13 @@ package controller
 import (
 	"encoding/json"
 	"fmt"
+	"git.wanbits.cc/sin/flytalk/config"
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/tools"
+	"git.wanbits.cc/sin/flytalk/tools/store"
+	"git.wanbits.cc/sin/flytalk/ws"
 	"github.com/gin-gonic/gin"
 	"github.com/gorilla/websocket"
-	"github.com/wenstudio/gofly/config"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/tools"
-	"github.com/wenstudio/gofly/tools/store"
-	"github.com/wenstudio/gofly/ws"
 	"os"
 	"path"
 	"strings"

+ 3 - 3
controller/mysql.go

@@ -2,10 +2,10 @@ package controller
 
 import (
 	"fmt"
+	"git.wanbits.cc/sin/flytalk/config"
+	"git.wanbits.cc/sin/flytalk/database"
+	"git.wanbits.cc/sin/flytalk/tools"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/config"
-	"github.com/wenstudio/gofly/database"
-	"github.com/wenstudio/gofly/tools"
 	"os"
 )
 

+ 2 - 2
controller/notice.go

@@ -3,10 +3,10 @@ package controller
 import (
 	"encoding/json"
 	"fmt"
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/tools"
 	"github.com/gin-gonic/gin"
 	"github.com/gorilla/websocket"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/tools"
 	"log"
 	"net/http"
 	"time"

+ 1 - 1
controller/role.go

@@ -1,8 +1,8 @@
 package controller
 
 import (
+	"git.wanbits.cc/sin/flytalk/models"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/models"
 )
 
 func GetRoleList(c *gin.Context) {

+ 1 - 1
controller/setting.go

@@ -1,8 +1,8 @@
 package controller
 
 import (
+	"git.wanbits.cc/sin/flytalk/models"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/models"
 )
 
 func GetConfigs(c *gin.Context) {

+ 3 - 3
controller/shout.go

@@ -2,8 +2,8 @@ package controller
 
 import (
 	"fmt"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/tools"
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/tools"
 	"log"
 	"strconv"
 )
@@ -16,7 +16,7 @@ func SendServerJiang(content string) string {
 		return ""
 	}
 	sendStr := fmt.Sprintf("%s,访客来了", content)
-	desp := "[登录](https://gofly.sopans.com/main)"
+	desp := "[登录](https://flytalk.sopans.com/main)"
 	url := serverJiangAPI + "?text=" + sendStr + "&desp=" + desp
 	//log.Println(url)
 	res := tools.Get(url)

+ 4 - 4
controller/visitor.go

@@ -2,12 +2,12 @@ package controller
 
 import (
 	"encoding/json"
+	"git.wanbits.cc/sin/flytalk/config"
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/tools"
+	"git.wanbits.cc/sin/flytalk/user/provider/twong"
 	"github.com/gin-gonic/gin"
 	"github.com/gorilla/websocket"
-	"github.com/wenstudio/gofly/config"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/tools"
-	"github.com/wenstudio/gofly/user/provider/twong"
 	"log"
 	"strconv"
 )

+ 1 - 1
controller/weixin.go

@@ -3,8 +3,8 @@ package controller
 import (
 	"crypto/sha1"
 	"encoding/hex"
+	"git.wanbits.cc/sin/flytalk/models"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/models"
 	"log"
 	"sort"
 )

+ 1 - 1
database/mysql.go

@@ -3,8 +3,8 @@ package database
 import (
 	"database/sql"
 	"fmt"
+	"git.wanbits.cc/sin/flytalk/config"
 	_ "github.com/go-sql-driver/mysql"
-	"github.com/wenstudio/gofly/config"
 )
 
 type Mysql struct {

+ 1 - 1
go-fly.go → flytalk.go

@@ -1,7 +1,7 @@
 package main
 
 import (
-	"github.com/wenstudio/gofly/cmd"
+	"git.wanbits.cc/sin/flytalk/cmd"
 )
 
 func main() {

+ 1 - 1
go.mod

@@ -1,4 +1,4 @@
-module github.com/wenstudio/gofly
+module git.wanbits.cc/sin/flytalk
 
 go 1.14
 

+ 1 - 1
middleware/ipblack.go

@@ -1,8 +1,8 @@
 package middleware
 
 import (
+	"git.wanbits.cc/sin/flytalk/models"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/models"
 )
 
 func Ipblack(c *gin.Context) {

+ 1 - 1
middleware/jwt.go

@@ -1,8 +1,8 @@
 package middleware
 
 import (
+	"git.wanbits.cc/sin/flytalk/tools"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/tools"
 	"time"
 )
 

+ 1 - 1
middleware/rbac.go

@@ -1,8 +1,8 @@
 package middleware
 
 import (
+	"git.wanbits.cc/sin/flytalk/models"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/models"
 	"strings"
 )
 

+ 1 - 1
models/models.go

@@ -2,8 +2,8 @@ package models
 
 import (
 	"fmt"
+	"git.wanbits.cc/sin/flytalk/config"
 	"github.com/jinzhu/gorm"
-	"github.com/wenstudio/gofly/config"
 	"time"
 )
 

+ 3 - 3
router/api.go

@@ -1,10 +1,10 @@
 package router
 
 import (
+	"git.wanbits.cc/sin/flytalk/controller"
+	"git.wanbits.cc/sin/flytalk/middleware"
+	"git.wanbits.cc/sin/flytalk/ws"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/controller"
-	"github.com/wenstudio/gofly/middleware"
-	"github.com/wenstudio/gofly/ws"
 )
 
 func InitApiRouter(engine *gin.Engine) {

+ 2 - 2
router/view.go

@@ -1,9 +1,9 @@
 package router
 
 import (
+	"git.wanbits.cc/sin/flytalk/middleware"
+	"git.wanbits.cc/sin/flytalk/tmpl"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/middleware"
-	"github.com/wenstudio/gofly/tmpl"
 )
 
 func InitViewRouter(engine *gin.Engine) {

+ 1 - 1
tmpl/chat.go

@@ -1,8 +1,8 @@
 package tmpl
 
 import (
+	"git.wanbits.cc/sin/flytalk/config"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/config"
 	"net/http"
 )
 

+ 3 - 3
tmpl/common.go

@@ -1,10 +1,10 @@
 package tmpl
 
 import (
+	"git.wanbits.cc/sin/flytalk/config"
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/tools"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/config"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/tools"
 	"html"
 	"html/template"
 	"net/http"

+ 1 - 1
tmpl/setting.go

@@ -1,8 +1,8 @@
 package tmpl
 
 import (
+	"git.wanbits.cc/sin/flytalk/config"
 	"github.com/gin-gonic/gin"
-	"github.com/wenstudio/gofly/config"
 	"net/http"
 )
 

+ 3 - 3
tools/store/qiniu_test.go

@@ -1,12 +1,12 @@
 package store
 
 import (
-	"github.com/wenstudio/gofly/config"
+	"git.wanbits.cc/sin/flytalk/config"
 	"testing"
 )
 
 func TestQn_Upload(t *testing.T) {
-	c := config.CreateQiniu("/home/yyk/github/gofly/" + config.QiniuFile)
+	c := config.CreateQiniu("/home/yyk/github/flytalk/" + config.QiniuFile)
 	t.Log(c)
 	q := NewQn(c.Access, c.Secret, c.Bucket, c.Zone)
 	f, err := q.Upload("/home/yyk/github/shotshock/assets/img/gongzhonghao.jpg")
@@ -17,7 +17,7 @@ func TestQn_Upload(t *testing.T) {
 }
 
 func TestQn_Delete(t *testing.T) {
-	c := config.CreateQiniu("/home/yyk/github/gofly/" + config.QiniuFile)
+	c := config.CreateQiniu("/home/yyk/github/flytalk/" + config.QiniuFile)
 	t.Log(c)
 	q := NewQn(c.Access, c.Secret, c.Bucket, c.Zone)
 	err := q.Delete("http://twongpicd.shotshock.shop/gongzhonghao.jpg")

+ 1 - 1
user/iuser.go

@@ -1,6 +1,6 @@
 package user
 
-import "github.com/wenstudio/gofly/models"
+import "git.wanbits.cc/sin/flytalk/models"
 
 /**
 user 模块定义一个接口,

+ 4 - 4
user/provider/twong/user.go

@@ -3,11 +3,11 @@ package twong
 import (
 	"errors"
 	"fmt"
+	"git.wanbits.cc/sin/flytalk/config"
+	"git.wanbits.cc/sin/flytalk/models"
+	"git.wanbits.cc/sin/flytalk/tools"
+	"git.wanbits.cc/sin/flytalk/user"
 	"github.com/jinzhu/gorm"
-	"github.com/wenstudio/gofly/config"
-	"github.com/wenstudio/gofly/models"
-	"github.com/wenstudio/gofly/tools"
-	"github.com/wenstudio/gofly/user"
 )
 
 /**

+ 1 - 1
ws/user.go

@@ -2,9 +2,9 @@ package ws
 
 import (
 	"encoding/json"
+	"git.wanbits.cc/sin/flytalk/models"
 	"github.com/gin-gonic/gin"
 	"github.com/gorilla/websocket"
-	"github.com/wenstudio/gofly/models"
 	"log"
 )
 

+ 1 - 1
ws/visitor.go

@@ -2,9 +2,9 @@ package ws
 
 import (
 	"encoding/json"
+	"git.wanbits.cc/sin/flytalk/models"
 	"github.com/gin-gonic/gin"
 	"github.com/gorilla/websocket"
-	"github.com/wenstudio/gofly/models"
 	"log"
 )