-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli.go
30 lines (25 loc) · 969 Bytes
/
cli.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
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 okta data"`
Transform TransformCmd `cmd:"" help:"transform okta data"`
ExportTransform ExportTransformCmd `cmd:"" help:"export default transform template"`
Exec ExecCmd `cmd:"" help:"fetch and transform okta 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
}