Help us shape the future of Go! Take the 2026 Go Developer Survey

user

package
v0.28.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommandUpdate = &cli.Command{
	Name:        "user",
	Description: "Use this command to update a user.",
	Usage:       "Update a user from the provided configuration",
	Action:      update,
	Flags: []cli.Flag{

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_USER_NAME", "USER_NAME"),
			Name:    internal.FlagName,
			Usage:   "provide the name of the user",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_USER_ADD_FAVORITES", "USER_ADD_FAVORITES"),
			Name:    "add-favorites",
			Usage:   "provide the list of repositories to add as favorites for the user",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_USER_DROP_FAVORITES", "USER_DROP_FAVORITES"),
			Name:    "drop-favorites",
			Usage:   "provide the list of repositories to remove from favorites of the user",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_USER_ADD_DASHBOARDS", "USER_ADD_DASHBOARDS"),
			Name:    "add-dashboards",
			Usage:   "provide the list of UUIDs for dashboards to add to the user",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_USER_DROP_DASHBOARDS", "USER_DROP_DASHBOARDS"),
			Name:    "drop-dashboards",
			Usage:   "provide the list of UUIDs for dashboareds to remove from the user",
		},

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_OUTPUT", "REPO_OUTPUT"),
			Name:    internal.FlagOutput,
			Aliases: []string{"op"},
			Usage:   "format the output in json, spew or yaml",
		},
	},
	CustomHelpTemplate: fmt.Sprintf(`%s
EXAMPLES:
  1. Update current user to add a repository to favorites.
    $ {{.FullName}} --add-favorites Org-1/Repo-1
  2. Update current user to remove a repository from favorites.
    $ {{.FullName}} --drop-favorites Org-1/Repo-1
  3. Update current user to add a dashboard.
    $ {{.FullName}} --add-dashboards c8da1302-07d6-11ea-882f-4893bca275b8
  4. Update current user to remove a dashboard.
    $ {{.FullName}} --drop-dashboards c8da1302-07d6-11ea-882f-4893bca275b8

DOCUMENTATION:

  https://go-vela.github.io/docs/reference/cli/user/update/
`, cli.CommandHelpTemplate),
}

CommandUpdate defines the command for updating a user.

View Source
var CommandView = &cli.Command{
	Name:        "user",
	Description: "Use this command to view a user.",
	Usage:       "View details of the provided user",
	Action:      view,
	Flags: []cli.Flag{

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_USER_NAME", "USER_NAME"),
			Name:    internal.FlagName,
			Aliases: []string{"n"},
			Usage:   "provide the name of the user to view",
		},

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_OUTPUT", "REPO_OUTPUT"),
			Name:    internal.FlagOutput,
			Aliases: []string{"op"},
			Usage:   "format the output in json, spew or yaml",
			Value:   "yaml",
		},
	},
	CustomHelpTemplate: fmt.Sprintf(`%s
EXAMPLES:
  1. View details of the current user.
    $ {{.FullName}}
  2. View details of another user (admin).
    $ {{.FullName}} --name Octocat
  3. View details of current user with json output.
    $ {{.FullName}} --output json

DOCUMENTATION:

  https://go-vela.github.io/docs/reference/cli/repo/view/
`, cli.CommandHelpTemplate),
}

CommandView defines the command for inspecting a user.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL