Skip to content

Commit

Permalink
feat(cdsctl): aliases cmd (#5376)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored Aug 18, 2020
1 parent b03ce85 commit 7cf81cc
Show file tree
Hide file tree
Showing 28 changed files with 82 additions and 54 deletions.
5 changes: 3 additions & 2 deletions cli/cdsctl/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import (
const actionPathArg = "action-path"

var actionCmd = cli.Command{
Name: "action",
Short: "Manage CDS action",
Name: "action",
Aliases: []string{"actions"},
Short: "Manage CDS action",
}

var actionBuiltinCmd = cli.Command{
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/admin_broadcasts.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import (
)

var adminBroadcastsCmd = cli.Command{
Name: "broadcasts",
Short: "Manage CDS broadcasts",
Name: "broadcasts",
Aliases: []string{"broadcast"},
Short: "Manage CDS broadcasts",
}

func adminBroadcasts() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/admin_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import (
)

var adminFeaturesCmd = cli.Command{
Name: "features",
Short: "Manage CDS feature flipping rules",
Name: "features",
Aliases: []string{"feature"},
Short: "Manage CDS feature flipping rules",
}

func adminFeatures() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/admin_migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
)

var adminMigrationsCmd = cli.Command{
Name: "migration",
Short: "Manage CDS Migrations",
Name: "migration",
Aliases: []string{"migrations"},
Short: "Manage CDS Migrations",
Long: `Theses commands manage CDS Migration and DO NOT concern database migrations.
A CDS Migration is an internal routine. This helps manage a complex data migration with code included
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/admin_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ import (
)

var adminPluginsCmd = cli.Command{
Name: "plugins",
Short: "Manage CDS Plugins",
Name: "plugins",
Short: "Manage CDS Plugins",
Aliases: []string{"plugin"},
}

func adminPlugins() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import (
)

var applicationCmd = cli.Command{
Name: "application",
Short: "Manage CDS application",
Name: "application",
Aliases: []string{"applications"},
Short: "Manage CDS application",
}

func application() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/application_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
)

var applicationKeyCmd = cli.Command{
Name: "keys",
Short: "Manage CDS application keys",
Name: "keys",
Aliases: []string{"key"},
Short: "Manage CDS application keys",
}

func applicationKey() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/application_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
)

var applicationVariableCmd = cli.Command{
Name: "variable",
Short: "Manage CDS application variables",
Name: "variable",
Aliases: []string{"variables"},
Short: "Manage CDS application variables",
}

func applicationVariable() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ const consumerIDArg = "consumer-id"

func consumer() *cobra.Command {
cmd := cli.Command{
Name: "consumer",
Short: "Manage CDS auth consumers",
Name: "consumer",
Aliases: []string{"consumers"},
Short: "Manage CDS auth consumers",
}

return cli.NewCommand(cmd, nil,
Expand Down
1 change: 1 addition & 0 deletions cli/cdsctl/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var environmentCmd = cli.Command{
Short: "Manage CDS environment",
Aliases: []string{
"env",
"environments",
},
}

Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/environment_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
)

var environmentKeyCmd = cli.Command{
Name: "keys",
Short: "Manage CDS environment keys",
Name: "keys",
Aliases: []string{"key"},
Short: "Manage CDS environment keys",
}

func environmentKey() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/environment_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
)

var environmentVariableCmd = cli.Command{
Name: "variable",
Short: "Manage CDS environment variables",
Name: "variable",
Aliases: []string{"variables"},
Short: "Manage CDS environment variables",
}

func environmentVariable() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import (
)

var eventsCmd = cli.Command{
Name: "events",
Short: "Listen CDS Events",
Name: "events",
Aliases: []string{"event"},
Short: "Listen CDS Events",
}

func events() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import (
)

var groupCmd = cli.Command{
Name: "group",
Short: "Manage CDS group",
Name: "group",
Aliases: []string{"groups"},
Short: "Manage CDS group",
}

func group() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/group_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
)

var groupMemberCmd = cli.Command{
Name: "member",
Short: "Manage group's member",
Name: "member",
Aliases: []string{"members"},
Short: "Manage group's member",
}

func groupMember() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import (
)

var pipelineCmd = cli.Command{
Name: "pipeline",
Short: "Manage CDS pipeline",
Name: "pipeline",
Aliases: []string{"pipelines"},
Short: "Manage CDS pipeline",
}

func pipeline() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import (
)

var projectCmd = cli.Command{
Name: "project",
Short: "Manage CDS project",
Name: "project",
Aliases: []string{"projects"},
Short: "Manage CDS project",
}

func projectCommands() []*cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/project_favorite.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
)

var projectFavoriteCmd = cli.Command{
Name: "favorite",
Short: "Add or delete a CDS project to your personal bookmarks",
Name: "favorite",
Aliases: []string{"favorites"},
Short: "Add or delete a CDS project to your personal bookmarks",
Ctx: []cli.Arg{
{Name: _ProjectKey},
},
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/project_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import (
)

var projectGroupCmd = cli.Command{
Name: "group",
Short: "Manage CDS group linked to a project",
Name: "group",
Aliases: []string{"groups"},
Short: "Manage CDS group linked to a project",
}

func projectGroup() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/project_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import (
)

var projectIntegrationCmd = cli.Command{
Name: "integration",
Short: "Manage CDS integrations",
Name: "integration",
Aliases: []string{"integrations"},
Short: "Manage CDS integrations",
}

func projectIntegration() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/project_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
)

var projectKeyCmd = cli.Command{
Name: "keys",
Short: "Manage CDS project keys",
Name: "keys",
Aliases: []string{"key"},
Short: "Manage CDS project keys",
}

func projectKey() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/project_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
)

var projectVariableCmd = cli.Command{
Name: "variable",
Short: "Manage CDS project variables",
Name: "variable",
Aliases: []string{"variables"},
Short: "Manage CDS project variables",
}

func projectVariable() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ import (
)

var templateCmd = cli.Command{
Name: "template",
Short: "Manage CDS workflow template",
Name: "template",
Aliases: []string{"templates"},
Short: "Manage CDS workflow template",
}

func template() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ const (
)

var toolsCmd = cli.Command{
Name: "tools",
Short: "Some tooling for CDS",
Name: "tools",
Aliases: []string{"tool"},
Short: "Some tooling for CDS",
}

func tools() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
)

var userCmd = cli.Command{
Name: "user",
Short: "Manage CDS user",
Name: "user",
Aliases: []string{"users"},
Short: "Manage CDS user",
}

func usr() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/worker_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import (
)

var workerModelCmd = cli.Command{
Name: "model",
Short: "Manage Worker Model",
Name: "model",
Aliases: []string{"models"},
Short: "Manage Worker Model",
}

func workerModel() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import (
)

var workflowCmd = cli.Command{
Name: "workflow",
Short: "Manage CDS workflow",
Name: "workflow",
Aliases: []string{"workflows"},
Short: "Manage CDS workflow",
}

func workflow() *cobra.Command {
Expand Down
5 changes: 3 additions & 2 deletions cli/cdsctl/workflow_artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import (
)

var workflowArtifactCmd = cli.Command{
Name: "artifact",
Short: "Manage Workflow Artifact",
Name: "artifact",
Aliases: []string{"artifacts"},
Short: "Manage Workflow Artifact",
}

func workflowArtifact() *cobra.Command {
Expand Down

0 comments on commit 7cf81cc

Please sign in to comment.