Skip to content

Commit

Permalink
修改包目录
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamans committed Jan 10, 2019
1 parent b567597 commit 0a22b65
Show file tree
Hide file tree
Showing 53 changed files with 150 additions and 191 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License

Copyright (c) 2018 syncd
Copyright (c) 2018 Rsy
Copyright (c) 2018 dreamans

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion api.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand Down
9 changes: 4 additions & 5 deletions cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -11,9 +11,9 @@ import (
"os"

"github.com/Unknwon/goconfig"
"github.com/tinystack/syncd"
"github.com/tinystack/syncd/route"
handlerModule "github.com/tinystack/syncd/module/handler"
"github.com/dreamans/syncd"
"github.com/dreamans/syncd/route"
handlerModule "github.com/dreamans/syncd/module/handler"
)

var (
Expand Down Expand Up @@ -161,4 +161,3 @@ func run() {
func main() {
run()
}

5 changes: 2 additions & 3 deletions model/deploy_apply/deploy_apply.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -7,7 +7,7 @@ package deploy_apply
import (
"time"

"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type DeployApply struct {
Expand Down Expand Up @@ -61,4 +61,3 @@ func Get(id int) (DeployApply, bool) {
ok := model.GetByPk(TableName, &data, id)
return data, ok
}

5 changes: 2 additions & 3 deletions model/deploy_task/deploy_task.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

package deploy_task

import (
"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type DeployTask struct {
Expand Down Expand Up @@ -55,4 +55,3 @@ func DeleteByApplyId(id int) bool {
})
return ok
}

5 changes: 2 additions & 3 deletions model/model.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -9,7 +9,7 @@ import (
"fmt"
"strings"

"github.com/tinystack/syncd"
"github.com/dreamans/syncd"
"github.com/jinzhu/gorm"
)

Expand Down Expand Up @@ -159,4 +159,3 @@ func setTableName(rawName string) string {
rawName,
}, "")
}

5 changes: 2 additions & 3 deletions model/operate_log/operate_log.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -7,7 +7,7 @@ package operate_log
import (
"time"

"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type OperateLog struct {
Expand Down Expand Up @@ -35,4 +35,3 @@ func List(query model.QueryParam) ([]OperateLog, bool) {
ok := model.GetMulti(TableName, &data, query)
return data, ok
}

5 changes: 2 additions & 3 deletions model/project/project.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -7,7 +7,7 @@ package project
import (
"time"

"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type Project struct {
Expand Down Expand Up @@ -112,4 +112,3 @@ func UpdateFields(id int, data map[string]interface{}) bool {
})
return ok
}

5 changes: 2 additions & 3 deletions model/project_space/project_space.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -7,7 +7,7 @@ package space
import (
"time"

"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type ProjectSpace struct {
Expand Down Expand Up @@ -66,4 +66,3 @@ func Delete(id int) bool {
ok := model.DeleteByPk(TableName, ProjectSpace{ID: id})
return ok
}

5 changes: 2 additions & 3 deletions model/project_user/project_user.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -8,7 +8,7 @@ package user
import (
"time"

"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type ProjectUser struct {
Expand Down Expand Up @@ -75,4 +75,3 @@ func Delete(id int) bool {
ok := model.DeleteByPk(TableName, ProjectUser{ID: id})
return ok
}

5 changes: 2 additions & 3 deletions model/server/server.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -7,7 +7,7 @@ package server
import (
"time"

"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type Server struct {
Expand Down Expand Up @@ -62,4 +62,3 @@ func Delete(id int) bool {
ok := model.DeleteByPk(TableName, Server{ID: id})
return ok
}

5 changes: 2 additions & 3 deletions model/server_group/server_group.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -8,7 +8,7 @@ package server_group
import (
"time"

"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type ServerGroup struct {
Expand Down Expand Up @@ -60,4 +60,3 @@ func Delete(id int) bool {
ok := model.DeleteByPk(TableName, ServerGroup{ID: id})
return ok
}

5 changes: 2 additions & 3 deletions model/user/user.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -7,7 +7,7 @@ package user
import (
"time"

"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type User struct {
Expand Down Expand Up @@ -74,4 +74,3 @@ func Delete(id int) bool {
ok := model.DeleteByPk(TableName, User{ID: id})
return ok
}

5 changes: 2 additions & 3 deletions model/user_group/user_group.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -7,7 +7,7 @@ package group
import (
"time"

"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type UserGroup struct {
Expand Down Expand Up @@ -60,4 +60,3 @@ func Delete(id int) bool {
ok := model.DeleteByPk(TableName, UserGroup{ID: id})
return ok
}

4 changes: 2 additions & 2 deletions model/user_token/user_token.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -7,7 +7,7 @@ package token
import (
"time"

"github.com/tinystack/syncd/model"
"github.com/dreamans/syncd/model"
)

type UserToken struct {
Expand Down
19 changes: 9 additions & 10 deletions module/deploy/apply.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -12,14 +12,14 @@ import (
"github.com/tinystack/goutil/gostring"
"github.com/tinystack/goutil/goslice"
"github.com/tinystack/goweb"
"github.com/tinystack/syncd"
projectService "github.com/tinystack/syncd/service/project"
deployService "github.com/tinystack/syncd/service/deploy"
repoService "github.com/tinystack/syncd/service/repo"
taskService "github.com/tinystack/syncd/service/task"
userService "github.com/tinystack/syncd/service/user"
logService "github.com/tinystack/syncd/service/operate_log"
mailService "github.com/tinystack/syncd/service/mail"
"github.com/dreamans/syncd"
projectService "github.com/dreamans/syncd/service/project"
deployService "github.com/dreamans/syncd/service/deploy"
repoService "github.com/dreamans/syncd/service/repo"
taskService "github.com/dreamans/syncd/service/task"
userService "github.com/dreamans/syncd/service/user"
logService "github.com/dreamans/syncd/service/operate_log"
mailService "github.com/dreamans/syncd/service/mail"
)

type ApplyParamValid struct {
Expand Down Expand Up @@ -604,4 +604,3 @@ func applyCheckUserInSpace(spaceId, userId int) error {
}
return nil
}

21 changes: 10 additions & 11 deletions module/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import (

"github.com/tinystack/goutil/gostring"
"github.com/tinystack/goweb"
"github.com/tinystack/syncd"
projectService "github.com/tinystack/syncd/service/project"
deployService "github.com/tinystack/syncd/service/deploy"
userService "github.com/tinystack/syncd/service/user"
repoService "github.com/tinystack/syncd/service/repo"
serverService "github.com/tinystack/syncd/service/server"
taskService "github.com/tinystack/syncd/service/task"
mailService "github.com/tinystack/syncd/service/mail"
logService "github.com/tinystack/syncd/service/operate_log"
"github.com/dreamans/syncd"
projectService "github.com/dreamans/syncd/service/project"
deployService "github.com/dreamans/syncd/service/deploy"
userService "github.com/dreamans/syncd/service/user"
repoService "github.com/dreamans/syncd/service/repo"
serverService "github.com/dreamans/syncd/service/server"
taskService "github.com/dreamans/syncd/service/task"
mailService "github.com/dreamans/syncd/service/mail"
logService "github.com/dreamans/syncd/service/operate_log"
)

func DeployStop(c *goweb.Context) error {
Expand Down Expand Up @@ -148,7 +148,7 @@ func DeployStart(c *goweb.Context) error {
},
}

//tar zcvf
//tar zcvf
exFiles := gostring.StrFilterSliceEmpty(strings.Split(project.ExcludeFiles, "\n"))
packRepoCmd := repo.PackRepo(exFiles)
deployTasks = append(deployTasks, &deployService.DeployTask{
Expand Down Expand Up @@ -347,4 +347,3 @@ func deployRecordErrorLog(msg string) {
func deployRecordInfoLog(msg string) {
syncd.Logger.Info("DEPLOY_TASK_INFO, %s", msg)
}

6 changes: 3 additions & 3 deletions module/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/tinystack/goweb"
"github.com/tinystack/goutil/gostring"
"github.com/tinystack/goutil/goslice"
"github.com/tinystack/syncd"
"github.com/tinystack/goutil/goaes"
userService "github.com/tinystack/syncd/service/user"
"github.com/dreamans/syncd"
userService "github.com/dreamans/syncd/service/user"
)

func BeforeHandler(c *goweb.Context) error {
Expand Down Expand Up @@ -113,7 +113,7 @@ func apiPrivCheck(c *goweb.Context) error {
func resetReqParams(c *goweb.Context) {
limit := c.QueryInt("limit")
if limit > 999 {
limit = 999
limit = 999
}
if limit == 0 {
limit = 10
Expand Down
8 changes: 4 additions & 4 deletions module/project/project.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 tinystack Author. All Rights Reserved.
// Copyright 2018 syncd Author. All Rights Reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand All @@ -10,9 +10,9 @@ import (
"github.com/tinystack/goutil/gostring"
"github.com/tinystack/goweb"
"github.com/tinystack/govalidate"
"github.com/tinystack/syncd"
projectService "github.com/tinystack/syncd/service/project"
serverService "github.com/tinystack/syncd/service/server"
"github.com/dreamans/syncd"
projectService "github.com/dreamans/syncd/service/project"
serverService "github.com/dreamans/syncd/service/server"
)

type ProjectParamValid struct {
Expand Down
Loading

0 comments on commit 0a22b65

Please sign in to comment.