Skip to content
This repository was archived by the owner on Jun 15, 2021. It is now read-only.

Commit e5dab32

Browse files
committed
v0.4.1-dev.0 Rename project to Gortctl
1 parent 0cf1337 commit e5dab32

30 files changed

+1068
-142
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@
1111
# Output of the go coverage tool, specifically when used with LiteIDE
1212
*.out
1313

14-
cogctl
15-
cogctl2
14+
gortctl

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
# cogctl2
1+
# gortctl
22

3-
`cogctl` is a CLI tool for administering a
4-
[Cog2](https://github.com/clockworksoul/cog2) chatops server installation.
3+
`gortctl` is a CLI tool for administering a
4+
[Gort](https://github.com/clockworksoul/gort) chatops server installation.
55

66
# Configuring
77

8-
`cogctl` uses an INI-formatted configuration file, conventionally
9-
named `.cogctl` in your home directory. This is where you can store
10-
connection credentials to allow `cogctl` to interact with Cog's REST
8+
`gortctl` uses an INI-formatted configuration file, conventionally
9+
named `.gortctl` in your home directory. This is where you can store
10+
connection credentials to allow `gortctl` to interact with gort's REST
1111
API.
1212

1313
An example file might look like this:
1414
```
1515
[defaults]
16-
profile = cog
16+
profile = gort
1717
18-
[cog]
18+
[gort]
1919
password = "seekrit#password"
20-
url = https://cog.mycompany.com:4000
20+
url = https://gort.mycompany.com:4000
2121
user = me
2222
2323
[preprod]
2424
password = "anotherseekrit#password"
25-
url = https://cog.preprod.mycompany.com:4000
25+
url = https://gort.preprod.mycompany.com:4000
2626
user = me
2727
```
2828

2929
Comments begin with a `#` character; if your password contains a `#`,
3030
surround the entire password in quotes, as illustrated above.
3131

3232
You can store multiple "profiles" in this file, with a different name
33-
for each (here, we have `cog` and `preprod`). Whichever one is noted
33+
for each (here, we have `gort` and `preprod`). Whichever one is noted
3434
as the default (in the `defaults` section) will be used by
35-
`cogctl`. However, you can pass the `--profile=$PROFILE` option to
36-
`cogctl` to use a different set of credentials.
35+
`gortctl`. However, you can pass the `--profile=$PROFILE` option to
36+
`gortctl` to use a different set of credentials.
3737

3838
While you can add profiles to this file manually, you can also use the
39-
`cogctl profile create` command to help.
39+
`gortctl profile create` command to help.
4040

4141
# Getting Help
4242

43-
The `cogctl` executable contains a number of commands and
43+
The `gortctl` executable contains a number of commands and
4444
subcommands. Help is available for all of them by passing the `--help`
45-
option. Start with `cogctl --help`, and go from there.
45+
option. Start with `gortctl --help`, and go from there.

cmd/bootstrap.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,37 @@ package cmd
33
import (
44
"fmt"
55

6-
"github.com/clockworksoul/cog2/client"
7-
"github.com/clockworksoul/cog2/data/rest"
6+
"github.com/clockworksoul/gort/client"
7+
"github.com/clockworksoul/gort/data/rest"
88
"github.com/spf13/cobra"
99
)
1010

1111
const (
1212
bootstrapUse = "bootstrap"
13-
bootstrapShort = "Bootstrap a Cog server"
13+
bootstrapShort = "Bootstrap a Gort server"
1414
bootstrapLong = `Bootstrap can be used on a brand new server, addressable at the specified URL,
1515
to create the administrative user ("admin"). Bootstrapping will only work on
1616
an instance that doesn't yet have any users defined.
1717
1818
Following a successful bootstrapping, the returned password and user
19-
information are added to cogctl's configuration file as a new profile. If this
19+
information are added to gortctl's configuration file as a new profile. If this
2020
is the first profile to be added to this configuration file, it will be marked
2121
as the default.
2222
2323
By default, the new profile will be named for the hostname of the server being
2424
bootstrapped. This can be overridden using the -P or --profile flags.`
2525

2626
bootstrapUsage = `Usage:
27-
cogctl bootstrap [flags] [URL]
27+
gortctl bootstrap [flags] [URL]
2828
2929
Flags:
30-
-e, --email string Email for the bootstrapped user (default "admin@cog")
30+
-e, --email string Email for the bootstrapped user (default "admin@gort")
3131
-h, --help help for bootstrap
32-
-n, --name string Full name of the bootstrapped user (default "Cog Administrator")
32+
-n, --name string Full name of the bootstrapped user (default "Gort Administrator")
3333
-p, --password string Password for the bootstrapped user (default generated)
3434
3535
Global Flags:
36-
-P, --profile string Cog profile to use
36+
-P, --profile string Gort profile to use
3737
`
3838
)
3939

@@ -53,8 +53,8 @@ func GetBootstrapCmd() *cobra.Command {
5353
Args: cobra.ExactArgs(1),
5454
}
5555

56-
cmd.Flags().StringVarP(&flagBootstrapEmail, "email", "e", "admin@cog", "Email for the bootstrapped user")
57-
cmd.Flags().StringVarP(&flagBootstrapName, "name", "n", "Cog Administrator", "Full name of the bootstrapped user")
56+
cmd.Flags().StringVarP(&flagBootstrapEmail, "email", "e", "admin@gort", "Email for the bootstrapped user")
57+
cmd.Flags().StringVarP(&flagBootstrapName, "name", "n", "Gort Administrator", "Full name of the bootstrapped user")
5858
cmd.Flags().StringVarP(&flagBootstrapPassword, "password", "p", "", "Password for bootstrapped user (default generated)")
5959

6060
cmd.SetUsageTemplate(bootstrapUsage)
@@ -64,11 +64,11 @@ func GetBootstrapCmd() *cobra.Command {
6464

6565
func bootstrapCmd(cmd *cobra.Command, args []string) error {
6666
entry := client.ProfileEntry{
67-
Name: FlagCogProfile,
67+
Name: FlagGortProfile,
6868
URLString: args[0],
6969
}
7070

71-
cogClient, err := client.ConnectWithNewProfile(entry)
71+
gortClient, err := client.ConnectWithNewProfile(entry)
7272
if err != nil {
7373
return err
7474
}
@@ -79,14 +79,14 @@ func bootstrapCmd(cmd *cobra.Command, args []string) error {
7979
Password: flagBootstrapPassword,
8080
}
8181

82-
// Client Bootstrap will create the cog config if necessary, and append
82+
// Client Bootstrap will create the gort config if necessary, and append
8383
// the new credentials to it.
84-
user, err = cogClient.Bootstrap(user)
84+
user, err = gortClient.Bootstrap(user)
8585
if err != nil {
8686
return err
8787
}
8888

89-
fmt.Printf("User %q created and credentials appended to cog config.\n", user.Username)
89+
fmt.Printf("User %q created and credentials appended to gort config.\n", user.Username)
9090

9191
return nil
9292
}

cmd/bundle-disable.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cmd
33
import (
44
"fmt"
55

6-
"github.com/clockworksoul/cog2/client"
6+
"github.com/clockworksoul/gort/client"
77
"github.com/spf13/cobra"
88
)
99

@@ -30,7 +30,7 @@ func bundleDisableCmd(cmd *cobra.Command, args []string) error {
3030
bundleName := args[0]
3131
bundleVersion := args[1]
3232

33-
c, err := client.Connect(FlagCogProfile)
33+
c, err := client.Connect(FlagGortProfile)
3434
if err != nil {
3535
return err
3636
}

cmd/bundle-enable.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cmd
33
import (
44
"fmt"
55

6-
"github.com/clockworksoul/cog2/client"
6+
"github.com/clockworksoul/gort/client"
77
"github.com/spf13/cobra"
88
)
99

@@ -30,7 +30,7 @@ func bundleEnableCmd(cmd *cobra.Command, args []string) error {
3030
bundleName := args[0]
3131
bundleVersion := args[1]
3232

33-
c, err := client.Connect(FlagCogProfile)
33+
c, err := client.Connect(FlagGortProfile)
3434
if err != nil {
3535
return err
3636
}

cmd/bundle-info.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"strings"
66

7-
"github.com/clockworksoul/cog2/client"
8-
"github.com/clockworksoul/cog2/data"
7+
"github.com/clockworksoul/gort/client"
8+
"github.com/clockworksoul/gort/data"
99
"github.com/spf13/cobra"
1010
)
1111

@@ -49,12 +49,12 @@ func bundleInfoCmd(cmd *cobra.Command, args []string) error {
4949
}
5050

5151
func doBundleInfoAll(name string) error {
52-
cogClient, err := client.Connect(FlagCogProfile)
52+
gortClient, err := client.Connect(FlagGortProfile)
5353
if err != nil {
5454
return err
5555
}
5656

57-
bundles, err := cogClient.BundleListVersions(name)
57+
bundles, err := gortClient.BundleListVersions(name)
5858
if err != nil {
5959
return err
6060
}
@@ -92,12 +92,12 @@ func doBundleInfoAll(name string) error {
9292
}
9393

9494
func doBundleInfoVersion(name, version string) error {
95-
cogClient, err := client.Connect(FlagCogProfile)
95+
gortClient, err := client.Connect(FlagGortProfile)
9696
if err != nil {
9797
return err
9898
}
9999

100-
bundle, err := cogClient.BundleGet(name, version)
100+
bundle, err := gortClient.BundleGet(name, version)
101101
if err != nil {
102102
return err
103103
}

cmd/bundle-install.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package cmd
33
import (
44
"fmt"
55

6-
"github.com/clockworksoul/cog2/bundle"
7-
"github.com/clockworksoul/cog2/client"
6+
"github.com/clockworksoul/gort/bundle"
7+
"github.com/clockworksoul/gort/client"
88
"github.com/spf13/cobra"
99
)
1010

@@ -30,7 +30,7 @@ func GetBundleInstallCmd() *cobra.Command {
3030
func bundleInstallCmd(cmd *cobra.Command, args []string) error {
3131
bundlefile := args[0]
3232

33-
c, err := client.Connect(FlagCogProfile)
33+
c, err := client.Connect(FlagGortProfile)
3434
if err != nil {
3535
return err
3636
}

cmd/bundle-list.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cmd
33
import (
44
"fmt"
55

6-
"github.com/clockworksoul/cog2/client"
6+
"github.com/clockworksoul/gort/client"
77
"github.com/spf13/cobra"
88
)
99

@@ -13,8 +13,8 @@ const (
1313
bundleListLong = "List all existing bundles."
1414
)
1515

16-
// $ cogctl bundle --help
17-
// Usage: cogctl bundle [OPTIONS] COMMAND [ARGS]...
16+
// $ gortctl bundle --help
17+
// Usage: gortctl bundle [OPTIONS] COMMAND [ARGS]...
1818

1919
// Manage command bundles and their config.
2020

@@ -42,12 +42,12 @@ func GetBundleListCmd() *cobra.Command {
4242
func bundleListCmd(cmd *cobra.Command, args []string) error {
4343
const format = "%-12s%-10s%s\n"
4444

45-
cogClient, err := client.Connect(FlagCogProfile)
45+
gortClient, err := client.Connect(FlagGortProfile)
4646
if err != nil {
4747
return err
4848
}
4949

50-
bundles, err := cogClient.BundleList()
50+
bundles, err := gortClient.BundleList()
5151
if err != nil {
5252
return err
5353
}

cmd/bundle-uninstall.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cmd
33
import (
44
"fmt"
55

6-
"github.com/clockworksoul/cog2/client"
6+
"github.com/clockworksoul/gort/client"
77
"github.com/spf13/cobra"
88
)
99

@@ -30,7 +30,7 @@ func bundleUninstallCmd(cmd *cobra.Command, args []string) error {
3030
bundleName := args[0]
3131
bundleVersion := args[1]
3232

33-
c, err := client.Connect(FlagCogProfile)
33+
c, err := client.Connect(FlagGortProfile)
3434
if err != nil {
3535
return err
3636
}

cmd/bundle-yaml.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package cmd
33
import (
44
"fmt"
55

6-
"github.com/clockworksoul/cog2/client"
6+
"github.com/clockworksoul/gort/client"
77
"github.com/spf13/cobra"
8-
yaml "gopkg.in/yaml.v2"
8+
yaml "gopkg.in/yaml.v3"
99
)
1010

1111
const (
@@ -33,12 +33,12 @@ func bundleYamlCmd(cmd *cobra.Command, args []string) error {
3333

3434
// TODO Implement that no specifed version returns enabled version.
3535

36-
cogClient, err := client.Connect(FlagCogProfile)
36+
gortClient, err := client.Connect(FlagGortProfile)
3737
if err != nil {
3838
return err
3939
}
4040

41-
bundle, err := cogClient.BundleGet(name, version)
41+
bundle, err := gortClient.BundleGet(name, version)
4242
if err != nil {
4343
return err
4444
}

0 commit comments

Comments
 (0)