2018-09-03 06:43:00 +00:00
|
|
|
// Copyright 2018 The Gitea Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
2020-09-30 05:11:33 +00:00
|
|
|
"code.gitea.io/tea/cmd/login"
|
2018-09-03 06:43:00 +00:00
|
|
|
|
2020-01-04 17:44:25 +00:00
|
|
|
"github.com/urfave/cli/v2"
|
2018-09-03 06:43:00 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// CmdLogin represents to login a gitea server.
|
|
|
|
var CmdLogin = cli.Command{
|
2020-10-02 15:46:51 +00:00
|
|
|
Name: "logins",
|
|
|
|
Aliases: []string{"login"},
|
2019-11-03 20:34:41 +00:00
|
|
|
Usage: "Log in to a Gitea server",
|
|
|
|
Description: `Log in to a Gitea server`,
|
2020-09-30 05:11:33 +00:00
|
|
|
Action: login.RunLoginAddInteractive, // TODO show list if no arg & detail if login as arg
|
2020-01-04 17:44:25 +00:00
|
|
|
Subcommands: []*cli.Command{
|
2020-09-30 05:11:33 +00:00
|
|
|
&login.CmdLoginList,
|
|
|
|
&login.CmdLoginAdd,
|
|
|
|
&login.CmdLoginEdit,
|
|
|
|
&login.CmdLoginSetDefault,
|
2018-09-03 06:43:00 +00:00
|
|
|
},
|
|
|
|
}
|