-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcli.go
More file actions
30 lines (24 loc) · 971 Bytes
/
cli.go
File metadata and controls
30 lines (24 loc) · 971 Bytes
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
package app
import (
"fmt"
"github.com/alecthomas/kong"
"github.com/aserto-dev/ds-load/sdk/common/version"
)
type CLI struct {
Config kong.ConfigFlag `help:"Configuration file path" short:"c"`
Version VersionCmd `cmd:"" help:"version information"`
Fetch FetchCmd `cmd:"" help:"fetch auth0 data"`
Transform TransformCmd `cmd:"" help:"transform auth0 data"`
ExportTransform ExportTransformCmd `cmd:"" help:"export default transform template"`
Exec ExecCmd `cmd:"" help:"fetch and transform auth0 data" default:"withargs"`
Verbosity int `short:"v" type:"counter" help:"Use to increase output verbosity."`
Verify VerifyCmd `cmd:"verify" help:"verify fetcher configuration and credentials"`
}
type VersionCmd struct{}
func (cmd *VersionCmd) Run() error {
fmt.Printf("%s - %s\n",
AppName,
version.GetInfo().String(),
)
return nil
}