Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/api/test_data/test_create.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"attributes":{"accountFilter":"!(nativeIdentity.startsWith(\"*DELETED*\"))","accountPropertyFilter":"(groups.containsAll({'Admin'}) || location == 'Austin')","accountReturnFirstLink":false,"accountSortAttribute":"created","accountSortDescending":false,"attributeName":"DEPARTMENT","input":{"attributes":{"attributeName":"first_name","sourceName":"Source"},"type":"accountAttribute"},"requiresPeriodicRefresh":false,"sourceName":"Workday"},"name":"mIDDPlMZlGQSKYZR","type":"dateFormat"}
{"attributes":{"accountFilter":"!(nativeIdentity.startsWith(\"*DELETED*\"))","accountPropertyFilter":"(groups.containsAll({'Admin'}) || location == 'Austin')","accountReturnFirstLink":false,"accountSortAttribute":"created","accountSortDescending":false,"attributeName":"DEPARTMENT","input":{"attributes":{"attributeName":"first_name","sourceName":"Source"},"type":"accountAttribute"},"requiresPeriodicRefresh":false,"sourceName":"Workday"},"name":"PRithHMFRWGzvlna","type":"dateFormat"}
24 changes: 9 additions & 15 deletions cmd/sdk/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,35 @@
package sdk

import (
"embed"
"fmt"

"github.com/sailpoint-oss/sailpoint-cli/internal/initialize"
"github.com/spf13/cobra"
)

//go:embed golang/*
var goTemplateContents embed.FS

const goTemplateDirName = "golang"
const (
goTemplateRepoOwner = "sailpoint-oss"
goTemplateRepoName = "golang-sdk-template"
)

func newGolangCommand() *cobra.Command {

cmd := &cobra.Command{
Use: "golang",
Short: "Initialize a new GO SDK project",
Long: "\nInitialize a new GO SDK project\n\n",
Long: "\nInitialize a new GO SDK project by fetching the template from GitHub.\n\n",
Example: "sail sdk init golang\nsail sdk init go example-project",
Aliases: []string{"go"},
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
var projName string
var err error

projName := "go-template"
if len(args) > 0 {
projName = args[0]
} else {
projName = "go-template"
}

err = initialize.InitializeProject(goTemplateContents, goTemplateDirName, projName)
err := initialize.FetchAndInitProject(goTemplateRepoOwner, goTemplateRepoName, "", projName)
if err != nil {
return err
}

_, _ = fmt.Fprintf(cmd.OutOrStdout(), "Run `cd %s && go mod tidy` to download dependencies.\n", projName)
return nil
},
}
Expand Down
30 changes: 0 additions & 30 deletions cmd/sdk/golang/go.mod.file

This file was deleted.

501 changes: 0 additions & 501 deletions cmd/sdk/golang/go.sum

This file was deleted.

94 changes: 0 additions & 94 deletions cmd/sdk/golang/sdk.go

This file was deleted.

28 changes: 0 additions & 28 deletions cmd/sdk/powershell/paginate.ps1

This file was deleted.

14 changes: 0 additions & 14 deletions cmd/sdk/powershell/paginateAccounts.ps1

This file was deleted.

14 changes: 0 additions & 14 deletions cmd/sdk/powershell/patchEntitlement.ps1

This file was deleted.

14 changes: 0 additions & 14 deletions cmd/sdk/powershell/sdk.ps1

This file was deleted.

22 changes: 0 additions & 22 deletions cmd/sdk/powershell/search.ps1

This file was deleted.

24 changes: 0 additions & 24 deletions cmd/sdk/powershell/transform.ps1

This file was deleted.

24 changes: 9 additions & 15 deletions cmd/sdk/pwsh.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,35 @@
package sdk

import (
"embed"
"fmt"

"github.com/sailpoint-oss/sailpoint-cli/internal/initialize"
"github.com/spf13/cobra"
)

//go:embed powershell/*
var pwshTemplateContents embed.FS

const pwshTemplateDirName = "powershell"
const (
pwshTemplateRepoOwner = "sailpoint-oss"
pwshTemplateRepoName = "powershell-sdk-template"
)

func newPowerShellCommand() *cobra.Command {

cmd := &cobra.Command{
Use: "powershell",
Short: "Initialize a new PowerShell SDK project",
Long: "\nInitialize a new PowerShell SDK project\n\n",
Long: "\nInitialize a new PowerShell SDK project by fetching the template from GitHub.\n\n",
Example: "sail sdk init powershell\nsail sdk init pwsh example-project",
Aliases: []string{"pwsh"},
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
var projName string
var err error

projName := "powershell-template"
if len(args) > 0 {
projName = args[0]
} else {
projName = "powershell-template"
}

err = initialize.InitializeProject(pwshTemplateContents, pwshTemplateDirName, projName)
err := initialize.FetchAndInitProject(pwshTemplateRepoOwner, pwshTemplateRepoName, "", projName)
if err != nil {
return err
}

_, _ = fmt.Fprintf(cmd.OutOrStdout(), "Project created. Configure your SailPoint CLI environment and run the scripts.\n")
return nil
},
}
Expand Down
Loading
Loading