Rename rest to code.
This commit is contained in:
parent
46256439da
commit
ce84a9c9f0
14
build/doc/dependency.md
Normal file
14
build/doc/dependency.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Package dependency
|
||||||
|
|
||||||
|
```
|
||||||
|
main
|
||||||
|
├── bin
|
||||||
|
├── pkg
|
||||||
|
├── src
|
||||||
|
│ ├── github.com
|
||||||
|
│ ├── golang.org
|
||||||
|
│ ├── tank
|
||||||
|
│ │ ├── build
|
||||||
|
│ │ │ ├── conf
|
||||||
|
│ │ │ ├── doc
|
||||||
|
```
|
@ -1,12 +1,12 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/json-iterator/go"
|
"github.com/json-iterator/go"
|
||||||
"go/types"
|
"go/types"
|
||||||
"net/http"
|
"net/http"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IController interface {
|
type IController interface {
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
type BaseDao struct {
|
type BaseDao struct {
|
||||||
Bean
|
Bean
|
@ -1,9 +1,9 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"math"
|
"math"
|
||||||
"reflect"
|
"reflect"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"tank/rest/logger"
|
"tank/code/logger"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IBean interface {
|
type IBean interface {
|
2
rest/cache/cache.go → code/cache/cache.go
vendored
2
rest/cache/cache.go → code/cache/cache.go
vendored
@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -3,8 +3,8 @@ package config
|
|||||||
import (
|
import (
|
||||||
"github.com/json-iterator/go"
|
"github.com/json-iterator/go"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"tank/rest/logger"
|
"tank/code/logger"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
@ -1,12 +1,12 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
"reflect"
|
"reflect"
|
||||||
"tank/rest/cache"
|
"tank/code/cache"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"tank/rest/logger"
|
"tank/code/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
//全局唯一的上下文(在main函数中初始化)
|
//全局唯一的上下文(在main函数中初始化)
|
@ -1,9 +1,9 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DashboardController struct {
|
type DashboardController struct {
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
@ -1,6 +1,6 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import "tank/rest/config"
|
import "tank/code/config"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统的所有访问记录均记录在此
|
* 系统的所有访问记录均记录在此
|
@ -1,7 +1,7 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -10,8 +10,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"tank/rest/dav/xml"
|
"tank/code/dav/xml"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Proppatch describes a property update instruction as defined in RFC 4918.
|
// Proppatch describes a property update instruction as defined in RFC 4918.
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
@ -7,8 +7,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,12 +1,12 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
"tank/rest/dav"
|
"tank/code/dav"
|
||||||
"tank/rest/dav/xml"
|
"tank/code/dav/xml"
|
||||||
)
|
)
|
||||||
|
|
||||||
//访问前缀,这个是特殊入口
|
//访问前缀,这个是特殊入口
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -7,10 +7,10 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/rest/dav"
|
"tank/code/dav"
|
||||||
"tank/rest/dav/xml"
|
"tank/code/dav/xml"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
@ -11,8 +11,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FootprintController struct {
|
type FootprintController struct {
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
@ -1,6 +1,6 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import "tank/rest/config"
|
import "tank/code/config"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统的所有访问记录均记录在此
|
* 系统的所有访问记录均记录在此
|
@ -1,10 +1,10 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ImageCacheController struct {
|
type ImageCacheController struct {
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -6,7 +6,7 @@ import (
|
|||||||
"github.com/nu7hatch/gouuid"
|
"github.com/nu7hatch/gouuid"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -9,7 +9,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
)
|
)
|
||||||
|
|
||||||
//@Service
|
//@Service
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -11,9 +11,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import "github.com/jinzhu/gorm"
|
import "github.com/jinzhu/gorm"
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -5,9 +5,9 @@ import (
|
|||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"tank/rest"
|
"tank/code"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"tank/rest/logger"
|
"tank/code/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -20,10 +20,10 @@ func main() {
|
|||||||
config.CONFIG.Init()
|
config.CONFIG.Init()
|
||||||
|
|
||||||
//全局运行的上下文
|
//全局运行的上下文
|
||||||
rest.CONTEXT.Init()
|
code.CONTEXT.Init()
|
||||||
defer rest.CONTEXT.Destroy()
|
defer code.CONTEXT.Destroy()
|
||||||
|
|
||||||
http.Handle("/", rest.CONTEXT.Router)
|
http.Handle("/", code.CONTEXT.Router)
|
||||||
|
|
||||||
logger.LOGGER.Info("App started at http://localhost:%v", config.CONFIG.ServerPort)
|
logger.LOGGER.Info("App started at http://localhost:%v", config.CONFIG.ServerPort)
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MatterController struct {
|
type MatterController struct {
|
@ -1,12 +1,12 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
"github.com/nu7hatch/gouuid"
|
"github.com/nu7hatch/gouuid"
|
||||||
"os"
|
"os"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
@ -6,9 +6,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/rest/download"
|
"tank/code/download"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,9 +1,9 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PreferenceController struct {
|
type PreferenceController struct {
|
@ -1,8 +1,8 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nu7hatch/gouuid"
|
"github.com/nu7hatch/gouuid"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import "tank/rest/config"
|
import "tank/code/config"
|
||||||
|
|
||||||
type Preference struct {
|
type Preference struct {
|
||||||
Base
|
Base
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
//@Service
|
//@Service
|
||||||
type PreferenceService struct {
|
type PreferenceService struct {
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -7,10 +7,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"tank/rest/logger"
|
"tank/code/logger"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
//@Service
|
//@Service
|
||||||
type SessionService struct {
|
type SessionService struct {
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
type OrderPair struct {
|
type OrderPair struct {
|
||||||
key string
|
key string
|
@ -2,8 +2,8 @@ package test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"tank/rest/dav"
|
"tank/code/dav"
|
||||||
"tank/rest/dav/xml"
|
"tank/code/dav/xml"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
@ -9,7 +9,7 @@ import (
|
|||||||
"os/user"
|
"os/user"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
//判断文件或文件夹是否已经存在
|
//判断文件或文件夹是否已经存在
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,12 +1,12 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"tank/rest/tool"
|
"tank/code/tool"
|
||||||
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
@ -1,4 +1,4 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nu7hatch/gouuid"
|
"github.com/nu7hatch/gouuid"
|
@ -1,7 +1,7 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
package rest
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"tank/rest/cache"
|
"tank/code/cache"
|
||||||
"tank/rest/config"
|
"tank/code/config"
|
||||||
"tank/rest/result"
|
"tank/code/result"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user