File tree 17 files changed +27
-24
lines changed
17 files changed +27
-24
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ WINDOWS=$(EXECUTABLE)_windows.exe
3
3
LINUX =$(EXECUTABLE ) _linux
4
4
DARWIN =$(EXECUTABLE ) _darwin
5
5
VERSION =$(shell cat VERSION)
6
- XPKG ="github.com/jyny/outliner/pkg/cmd "
6
+ XPKG ="github.com/jyny/outliner/command "
7
7
8
8
all : build shell_completion
9
9
cp ./build/outliner_$(shell go env GOOS) ./outliner
@@ -19,7 +19,7 @@ build : mod embedded fmt
19
19
env GOOS=windows GOARCH=amd64 go build -o ./build/$(WINDOWS ) -ldflags=" -X $( XPKG) .version=$( VERSION) " .
20
20
21
21
embedded :
22
- @pushd pkg/agent > /dev/null && \
22
+ @pushd pkg/deployer/ssh > /dev/null && \
23
23
go run gen/gen.go \
24
24
&& popd > /dev/null
25
25
Original file line number Diff line number Diff line change 1
- package cmd
1
+ package command
2
2
3
3
import (
4
4
"github.com/spf13/cobra"
Original file line number Diff line number Diff line change 1
- package cmd
1
+ package command
2
2
3
3
import (
4
4
"github.com/spf13/cobra"
Original file line number Diff line number Diff line change 1
- package cmd
1
+ package command
2
2
3
3
import (
4
4
"github.com/spf13/cobra"
Original file line number Diff line number Diff line change 1
- package cmd
1
+ package command
2
2
3
3
import (
4
4
"github.com/spf13/cobra"
Original file line number Diff line number Diff line change 1
- package cmd
1
+ package command
2
2
3
3
import (
4
4
"github.com/spf13/cobra"
Original file line number Diff line number Diff line change 1
- package cmd
1
+ package command
2
2
3
3
import (
4
4
"os/user"
@@ -7,10 +7,13 @@ import (
7
7
"github.com/spf13/cobra"
8
8
"github.com/spf13/viper"
9
9
10
- "github.com/jyny/outliner/pkg/agent"
11
10
ol "github.com/jyny/outliner/pkg/outliner"
12
11
"github.com/jyny/outliner/pkg/util"
13
12
13
+ // deployer agnet
14
+ "github.com/jyny/outliner/pkg/deployer/ssh"
15
+
16
+ // cloud provider
14
17
"github.com/jyny/outliner/pkg/cloud/linode"
15
18
//"github.com/jyny/outliner/pkg/cloud/vultr"
16
19
//"github.com/jyny/outliner/pkg/cloud/digitalocean"
@@ -71,7 +74,7 @@ func init() {
71
74
func initOutliner () {
72
75
// register deployer agent
73
76
deployer .RegisterAgent (
74
- agent . New (),
77
+ ssh . NewAgent (),
75
78
)
76
79
77
80
// Activate & register cloud providers
Original file line number Diff line number Diff line change 1
- package cmd
1
+ package command
2
2
3
3
import (
4
4
"github.com/spf13/cobra"
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
3
import (
4
- "github.com/jyny/outliner/pkg/cmd "
4
+ "github.com/jyny/outliner/command "
5
5
)
6
6
7
7
func main () {
8
- err := cmd .RootCmd .GenBashCompletionFile ("build/outliner_bash_completion" )
8
+ err := command .RootCmd .GenBashCompletionFile ("build/outliner_bash_completion" )
9
9
if err != nil {
10
10
panic (err )
11
11
}
12
- err = cmd .RootCmd .GenZshCompletionFile ("build/outliner_zsh_completion" )
12
+ err = command .RootCmd .GenZshCompletionFile ("build/outliner_zsh_completion" )
13
13
if err != nil {
14
14
panic (err )
15
15
}
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
3
import (
4
- "github.com/jyny/outliner/pkg/cmd "
4
+ "github.com/jyny/outliner/command "
5
5
"log"
6
6
)
7
7
@@ -12,5 +12,5 @@ func main() {
12
12
}
13
13
}()
14
14
15
- cmd .Execute ()
15
+ command .Execute ()
16
16
}
Original file line number Diff line number Diff line change 1
- package agent
1
+ package ssh
2
2
3
3
import (
4
4
"bufio"
@@ -14,7 +14,7 @@ import (
14
14
"github.com/pkg/sftp"
15
15
"golang.org/x/crypto/ssh"
16
16
17
- "github.com/jyny/outliner/pkg/agent /consts"
17
+ "github.com/jyny/outliner/pkg/deployer/ssh /consts"
18
18
ol "github.com/jyny/outliner/pkg/outliner"
19
19
)
20
20
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const ScriptName = "./deploy.sh"
10
10
const VariableName = "Script"
11
11
12
12
// PackageName for gen vfsdata
13
- const PackageName = "agent "
13
+ const PackageName = "ssh "
14
14
15
15
// ssh key path
16
16
const SSHKeyPubPath = "/.ssh/id_rsa.pub"
Original file line number Diff line number Diff line change 4
4
"github.com/shurcooL/vfsgen"
5
5
"net/http"
6
6
7
- "github.com/jyny/outliner/pkg/agent /consts"
7
+ "github.com/jyny/outliner/pkg/deployer/ssh /consts"
8
8
)
9
9
10
10
func main () {
Original file line number Diff line number Diff line change 1
- package agent
1
+ package ssh
2
2
3
3
import (
4
4
"crypto/rand"
@@ -13,12 +13,12 @@ import (
13
13
"path/filepath"
14
14
"strings"
15
15
16
- "github.com/jyny/outliner/pkg/agent /consts"
16
+ "github.com/jyny/outliner/pkg/deployer/ssh /consts"
17
17
ol "github.com/jyny/outliner/pkg/outliner"
18
18
"github.com/jyny/outliner/pkg/util"
19
19
)
20
20
21
- func New () ol.Agent {
21
+ func NewAgent () ol.Agent {
22
22
certok := true
23
23
u , _ := user .Current ()
24
24
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments