Skip to content

Commit 993f2fc

Browse files
committed
update deps
1 parent 841b7aa commit 993f2fc

1,565 files changed

Lines changed: 499 additions & 636472 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gopkg.lock

Lines changed: 0 additions & 640 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 83 deletions
This file was deleted.

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,15 @@ docker-build:
4040

4141
docker-push:
4242
docker push hub.yottab.io/yottab-library/cli:$(version)
43+
44+
45+
update-deps: download tidy vendor
46+
47+
download:
48+
GONOSUMDB="gitlab.com/projectxchange,github.com/btcsuite" HTTPS_PROXY=socks5://127.0.0.1:9150 GO111MODULE=on go mod download
49+
50+
tidy:
51+
GONOSUMDB="gitlab.com/projectxchange,github.com/btcsuite" HTTPS_PROXY=socks5://127.0.0.1:9150 GO111MODULE=on go mod tidy -v
52+
53+
vendor:
54+
GONOSUMDB="gitlab.com/projectxchange,github.com/btcsuite" HTTPS_PROXY=socks5://127.0.0.1:9150 GO111MODULE=on go mod vendor

cmd/command_create_update.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ var (
1212
Long: ``,
1313
Run: func(cmd *cobra.Command, args []string) {
1414
if cmd.Flag("compose-file").Changed {
15-
composeCreate(cmd, args)
15+
//NOOP
16+
// composeCreate(cmd, args)
1617
} else {
1718
cmd.Help()
1819
}

cmd/compose.go

Lines changed: 97 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,99 @@
11
package cmd
22

3-
import (
4-
"io/ioutil"
5-
"os"
6-
7-
"github.com/aanand/compose-file/loader"
8-
"github.com/aanand/compose-file/types"
9-
"github.com/spf13/cobra"
10-
)
11-
12-
func buildConfigDetails(source types.Dict) types.ConfigDetails {
13-
workingDir, err := os.Getwd()
14-
if err != nil {
15-
panic(err)
16-
}
17-
18-
return types.ConfigDetails{
19-
WorkingDir: workingDir,
20-
ConfigFiles: []types.ConfigFile{
21-
{Filename: "filename.yml", Config: source},
22-
},
23-
Environment: nil,
24-
}
25-
}
26-
27-
func load(fileYmlName string) (*types.Config, error) {
28-
bytes, err := ioutil.ReadFile(fileYmlName)
29-
if err != nil {
30-
return nil, err
31-
}
32-
33-
dict, err := loader.ParseYAML(bytes)
34-
if err != nil {
35-
return nil, err
36-
}
37-
38-
return loader.Load(buildConfigDetails(dict))
39-
}
40-
41-
func getYamlFilePath(cmd *cobra.Command) *types.Config {
42-
ymlFile := cmd.Flag("compose-file").Value.String()
43-
confObj, err := load(ymlFile)
44-
if err != nil {
45-
log.Fatal("Err load File: ", err)
46-
}
47-
return confObj
48-
}
49-
50-
func composeCreate(cmd *cobra.Command, args []string) {
51-
confObj := getYamlFilePath(cmd)
52-
log.Println("TODO: Kill Me", confObj)
53-
// TODO
54-
/*
55-
for _, srv := range confObj.Services {
56-
log.Println("Name", srv.Name)
57-
58-
log.Println("Volumes", srv.Volumes)
59-
log.Println("DomainName", srv.DomainName)
60-
61-
log.Println("Image", srv.Image)
62-
log.Println("Labels", srv.Labels)
63-
//log.Println("Deploy", srv.Deploy)
64-
log.Println("DependsOn", srv.DependsOn)
65-
//log.Println("Ports", srv.Ports)
66-
67-
log.Println("Environment", srv.Environment)
68-
69-
log.Println("Links", srv.Links)
70-
}
71-
72-
log.Println("-----------------------------------------------")
73-
74-
75-
for key, vol := range confObj.Volumes {
76-
log.Println("key", key)
77-
_, err := VolumeCreate(key, "persistant-2Gi")
78-
79-
log.Println("Err", err)
80-
81-
//log.Println("Driver", vol.Driver)
82-
log.Println("DriverOpts", vol.DriverOpts)
83-
84-
//log.Println("Labels", vol.Labels)
85-
//log.Println("External", vol.External)
86-
}
87-
*/
88-
}
89-
90-
func composeStart(cmd *cobra.Command, args []string) {
91-
confObj := getYamlFilePath(cmd)
92-
log.Println("TODO: Kill Me", confObj)
93-
// TODO
94-
}
95-
96-
func composeStop(cmd *cobra.Command, args []string) {
97-
confObj := getYamlFilePath(cmd)
98-
log.Println("TODO: Kill Me", confObj)
99-
// TODO
100-
}
3+
// import (
4+
// "io/ioutil"
5+
// "os"
6+
7+
// "github.com/aanand/compose-file/loader"
8+
// "github.com/aanand/compose-file/types"
9+
// "github.com/spf13/cobra"
10+
// )
11+
12+
// func buildConfigDetails(source types.Dict) types.ConfigDetails {
13+
// workingDir, err := os.Getwd()
14+
// if err != nil {
15+
// panic(err)
16+
// }
17+
18+
// return types.ConfigDetails{
19+
// WorkingDir: workingDir,
20+
// ConfigFiles: []types.ConfigFile{
21+
// {Filename: "filename.yml", Config: source},
22+
// },
23+
// Environment: nil,
24+
// }
25+
// }
26+
27+
// func load(fileYmlName string) (*types.Config, error) {
28+
// bytes, err := ioutil.ReadFile(fileYmlName)
29+
// if err != nil {
30+
// return nil, err
31+
// }
32+
33+
// dict, err := loader.ParseYAML(bytes)
34+
// if err != nil {
35+
// return nil, err
36+
// }
37+
38+
// return loader.Load(buildConfigDetails(dict))
39+
// }
40+
41+
// func getYamlFilePath(cmd *cobra.Command) *types.Config {
42+
// ymlFile := cmd.Flag("compose-file").Value.String()
43+
// confObj, err := load(ymlFile)
44+
// if err != nil {
45+
// log.Fatal("Err load File: ", err)
46+
// }
47+
// return confObj
48+
// }
49+
50+
// func composeCreate(cmd *cobra.Command, args []string) {
51+
// confObj := getYamlFilePath(cmd)
52+
// log.Println("TODO: Kill Me", confObj)
53+
// // TODO
54+
// /*
55+
// for _, srv := range confObj.Services {
56+
// log.Println("Name", srv.Name)
57+
58+
// log.Println("Volumes", srv.Volumes)
59+
// log.Println("DomainName", srv.DomainName)
60+
61+
// log.Println("Image", srv.Image)
62+
// log.Println("Labels", srv.Labels)
63+
// //log.Println("Deploy", srv.Deploy)
64+
// log.Println("DependsOn", srv.DependsOn)
65+
// //log.Println("Ports", srv.Ports)
66+
67+
// log.Println("Environment", srv.Environment)
68+
69+
// log.Println("Links", srv.Links)
70+
// }
71+
72+
// log.Println("-----------------------------------------------")
73+
74+
// for key, vol := range confObj.Volumes {
75+
// log.Println("key", key)
76+
// _, err := VolumeCreate(key, "persistant-2Gi")
77+
78+
// log.Println("Err", err)
79+
80+
// //log.Println("Driver", vol.Driver)
81+
// log.Println("DriverOpts", vol.DriverOpts)
82+
83+
// //log.Println("Labels", vol.Labels)
84+
// //log.Println("External", vol.External)
85+
// }
86+
// */
87+
// }
88+
89+
// func composeStart(cmd *cobra.Command, args []string) {
90+
// confObj := getYamlFilePath(cmd)
91+
// log.Println("TODO: Kill Me", confObj)
92+
// // TODO
93+
// }
94+
95+
// func composeStop(cmd *cobra.Command, args []string) {
96+
// confObj := getYamlFilePath(cmd)
97+
// log.Println("TODO: Kill Me", confObj)
98+
// // TODO
99+
// }

cmd/ui.go

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313

1414
"google.golang.org/grpc/codes"
1515

16-
"github.com/Sirupsen/logrus"
1716
"github.com/pkg/browser"
17+
"github.com/sirupsen/logrus"
1818
ybApi "github.com/yottab/proto-api/proto"
1919

2020
"google.golang.org/grpc/status"
@@ -130,17 +130,17 @@ func uiList(list interface{}) {
130130
log.Printf(" Created: %v , Updated: %v ", toTime(v.Created), toTime(v.Updated))
131131
}
132132
return
133-
case *ybApi.WorkerListRes:
134-
itemList := list.(*ybApi.WorkerListRes)
135-
log.Printf("# Count: %d\t", len(itemList.Services))
136-
for _, v := range itemList.Services {
137-
log.Printf("- Name: %s", v.Name)
138-
log.Printf(" State: %s", v.State.String())
139-
log.Printf(" Image: %s", v.Config.Image)
140-
log.Printf(" Port: %d", v.Config.Port)
141-
log.Printf(" Created: %v , Updated: %v ", toTime(v.Created), toTime(v.Updated))
142-
}
143-
return
133+
// case *ybApi.WorkerListRes:
134+
// itemList := list.(*ybApi.WorkerListRes)
135+
// log.Printf("# Count: %d\t", len(itemList.Services))
136+
// for _, v := range itemList.Services {
137+
// log.Printf("- Name: %s", v.Name)
138+
// log.Printf(" State: %s", v.State.String())
139+
// log.Printf(" Image: %s", v.Config.Image)
140+
// log.Printf(" Port: %d", v.Config.Port)
141+
// log.Printf(" Created: %v , Updated: %v ", toTime(v.Created), toTime(v.Updated))
142+
// }
143+
// return
144144
default:
145145
return
146146
}
@@ -347,12 +347,13 @@ func uiApplicationStatus(app *ybApi.AppStatusRes) {
347347

348348
}
349349

350-
func uiWorkerStatus(worker *ybApi.WorkerRes) {
351-
log.Printf("Service Name: %s ", worker.Name)
352-
log.Printf("State: %v ", worker.State)
353-
log.Printf("Config: %v ", worker.Config)
354-
log.Printf("Created: %v , Updated: %v ", toTime(worker.Created), toTime(worker.Updated))
355-
}
350+
//Deprecated
351+
// func uiWorkerStatus(worker *ybApi.WorkerRes) {
352+
// log.Printf("Service Name: %s ", worker.Name)
353+
// log.Printf("State: %v ", worker.State)
354+
// log.Printf("Config: %v ", worker.Config)
355+
// log.Printf("Created: %v , Updated: %v ", toTime(worker.Created), toTime(worker.Updated))
356+
// }
356357

357358
func uiAttachedDomains(domains []*ybApi.AttachedDomainInfo) {
358359
if len(domains) == 0 {

go.mod

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module github.com/yottab/cli
2+
3+
go 1.13
4+
5+
require (
6+
github.com/blang/semver v3.5.1+incompatible
7+
github.com/go-ini/ini v1.51.1 // indirect
8+
github.com/grpc-ecosystem/grpc-gateway v1.12.1 // indirect
9+
github.com/minio/minio-go v6.0.14+incompatible
10+
github.com/mitchellh/go-homedir v1.1.0
11+
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4
12+
github.com/rhysd/go-github-selfupdate v1.2.1
13+
github.com/sirupsen/logrus v1.4.2
14+
github.com/smartystreets/goconvey v1.6.4 // indirect
15+
github.com/spf13/cobra v0.0.5
16+
github.com/spf13/viper v1.3.2
17+
github.com/yottab/proto-api v2.5.0+incompatible
18+
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
19+
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
20+
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb // indirect
21+
google.golang.org/grpc v1.26.0
22+
gopkg.in/ini.v1 v1.51.1 // indirect
23+
gopkg.in/src-d/go-git.v4 v4.13.1
24+
k8s.io/client-go v0.17.1
25+
)

0 commit comments

Comments
 (0)