-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
cmd_bot.go
36 lines (32 loc) · 900 Bytes
/
cmd_bot.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2017 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.
package client
import (
"github.com/keybase/cli"
"github.com/keybase/client/go/libcmdline"
"github.com/keybase/client/go/libkb"
)
func NewCmdBot(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command {
subcommands := []cli.Command{
newCmdBotSignup(cl, g),
newCmdBotToken(cl, g),
}
return cli.Command{
Name: "bot",
Usage: "Manage bot accounts",
ArgumentHelp: "[arguments...]",
Subcommands: subcommands,
}
}
func newCmdBotToken(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command {
subcommands := []cli.Command{
newCmdBotTokenCreate(cl, g),
newCmdBotTokenList(cl, g),
newCmdBotTokenDelete(cl, g),
}
return cli.Command{
Name: "token",
Usage: "Manage bot tokens",
Subcommands: subcommands,
}
}