mirror of
https://github.com/LukeHagar/sailpoint-cli.git
synced 2025-12-06 04:21:15 +00:00
42 lines
1.0 KiB
Go
42 lines
1.0 KiB
Go
// Copyright (c) 2021, SailPoint Technologies, Inc. All rights reserved.
|
|
package transform
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/sailpoint-oss/sailpoint-cli/client"
|
|
"github.com/spf13/cobra"
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
const (
|
|
transformsEndpoint = "/v3/transforms"
|
|
previewEndpoint = "/cc/api/user/preview"
|
|
identityProfileEndpoint = "/v3/identity-profiles"
|
|
userEndpoint = "/cc/api/identity/list"
|
|
)
|
|
|
|
func NewTransformCmd(client client.Client) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "transforms",
|
|
Short: "Manage transforms",
|
|
Aliases: []string{"trans"},
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
_, _ = fmt.Fprintf(cmd.OutOrStdout(), cmd.UsageString())
|
|
},
|
|
}
|
|
|
|
cmd.PersistentFlags().StringP("transforms-endpoint", "e", viper.GetString("baseurl")+transformsEndpoint, "Override transforms endpoint")
|
|
|
|
cmd.AddCommand(
|
|
newListCmd(client),
|
|
newDownloadCmd(client),
|
|
newCreateCmd(client),
|
|
newUpdateCmd(client),
|
|
newDeleteCmd(client),
|
|
newPreviewCmd(client),
|
|
)
|
|
|
|
return cmd
|
|
}
|