Skip to content

Commit

Permalink
Update SDK version to v1.18 (#101)
Browse files Browse the repository at this point in the history
* Update SDK version

* Remove unused func
  • Loading branch information
loganintech authored Aug 20, 2024
1 parent d58f088 commit 6399426
Show file tree
Hide file tree
Showing 720 changed files with 41,295 additions and 35,188 deletions.
4 changes: 2 additions & 2 deletions cmd/cone/get_drop_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ func getEntitlementDetails(ctx context.Context, c client.C1Client, v *viper.Vipe
entitlements, err := c.SearchEntitlements(ctx, &client.SearchEntitlementsFilter{
EntitlementAlias: alias,
Query: query,
GrantedStatus: shared.RequestCatalogSearchServiceSearchEntitlementsRequestGrantedStatusAll,
GrantedStatus: shared.GrantedStatusAll,
})
if err != nil {
return "", "", err
Expand Down Expand Up @@ -465,7 +465,7 @@ func handleWaitBehavior(ctx context.Context, c client.C1Client, task *shared.Tas
return nil
}

var processStateToString = map[shared.TaskProcessing]string{
var processStateToString = map[shared.Processing]string{
"TASK_PROCESSING_TYPE_UNSPECIFIED": "Unknown Processing",
"TASK_PROCESSING_TYPE_PROCESSING": "Processing",
"TASK_PROCESSING_TYPE_WAITING": "Waiting for Action",
Expand Down
5 changes: 3 additions & 2 deletions cmd/cone/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/spf13/cobra"

"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"

"github.com/conductorone/cone/pkg/client"
"github.com/conductorone/cone/pkg/output"
)
Expand All @@ -32,7 +33,7 @@ func taskRun(cmd *cobra.Command, _ []string) error {
}

func (r *Task) Pretext() string {
return fmt.Sprintf("Ticket URL: %s/task/%s", r.client.BaseURL(), client.StringFromPtr(r.task.NumericID))
return fmt.Sprintf("Ticket URL: %s/task/%s", r.client.BaseURL(), client.StringFromIntPtr(r.task.NumericID))
}

type Task struct {
Expand All @@ -50,7 +51,7 @@ func (r *Task) WideHeader() []string {

func (r *Task) rows() []string {
return []string{
client.StringFromPtr(r.task.NumericID),
client.StringFromIntPtr(r.task.NumericID),
client.StringFromPtr(r.task.DisplayName),
taskStateToString[*r.task.State],
processStateToString[*r.task.Processing],
Expand Down
3 changes: 2 additions & 1 deletion cmd/cone/task_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/spf13/cobra"

"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"

"github.com/conductorone/cone/pkg/client"
"github.com/conductorone/cone/pkg/output"
)
Expand Down Expand Up @@ -59,7 +60,7 @@ func (t *TaskCommentResponse) Header() []string {
func (t *TaskCommentResponse) Rows() [][]string {
return [][]string{
{
client.StringFromPtr(t.TaskView.Task.NumericID),
client.StringFromIntPtr(t.TaskView.Task.NumericID),
client.StringFromPtr(t.TaskView.Task.DisplayName),
taskStateToString[*t.TaskView.Task.State],
},
Expand Down
3 changes: 2 additions & 1 deletion cmd/cone/task_escalate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/spf13/cobra"

"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"

"github.com/conductorone/cone/pkg/client"
"github.com/conductorone/cone/pkg/output"
)
Expand Down Expand Up @@ -57,7 +58,7 @@ func (t *TaskServiceActionResponse) Header() []string {
func (t *TaskServiceActionResponse) Rows() [][]string {
return [][]string{
{
client.StringFromPtr(t.TaskView.Task.NumericID),
client.StringFromIntPtr(t.TaskView.Task.NumericID),
client.StringFromPtr(t.TaskView.Task.DisplayName),
taskStateToString[*t.TaskView.Task.State],
},
Expand Down
3 changes: 2 additions & 1 deletion cmd/cone/task_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/spf13/cobra"

"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"

"github.com/conductorone/cone/pkg/client"
"github.com/conductorone/cone/pkg/output"
)
Expand Down Expand Up @@ -61,7 +62,7 @@ func (r *TaskGetResponse) WideHeader() []string {
}
func (r *TaskGetResponse) rows() []string {
return []string{
client.StringFromPtr(r.NumericID),
client.StringFromIntPtr(r.NumericID),
client.StringFromPtr(r.DisplayName),
taskStateToString[*r.State],
processStateToString[*r.Processing],
Expand Down
8 changes: 4 additions & 4 deletions cmd/cone/task_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ func searchTasksRun(cmd *cobra.Command, args []string) error {
query = &queryVal
}

var state []shared.TaskSearchRequestTaskStates
var state []shared.TaskStates
switch strings.ToLower(v.GetString(stateFlag)) {
case "open", "task_state_open":
state = []shared.TaskSearchRequestTaskStates{shared.TaskSearchRequestTaskStatesTaskStateOpen}
state = []shared.TaskStates{shared.TaskStatesTaskStateOpen}
case "closed", "task_state_closed":
state = []shared.TaskSearchRequestTaskStates{shared.TaskSearchRequestTaskStatesTaskStateClosed}
state = []shared.TaskStates{shared.TaskStatesTaskStateClosed}
case "":
}

Expand All @@ -79,7 +79,7 @@ func searchTasksRun(cmd *cobra.Command, args []string) error {
taskTypes = []shared.TaskTypeInput{*taskType}
}

taskResp, err := c.SearchTasks(ctx, shared.TaskSearchRequestInput{
taskResp, err := c.SearchTasks(ctx, shared.TaskSearchRequest{
AccessReviewIds: v.GetStringSlice(accessReviewIDsFlag),
AppEntitlementIds: v.GetStringSlice(appEntitlementIDsFlag),
AppResourceIds: v.GetStringSlice(appResourceIDsFlag),
Expand Down
32 changes: 15 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,37 @@ module github.com/conductorone/cone
go 1.21

require (
go.uber.org/zap v1.26.0
golang.org/x/net v0.17.0
google.golang.org/grpc v1.58.3
google.golang.org/protobuf v1.31.0
go.uber.org/zap v1.27.0
golang.org/x/net v0.27.0
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)

require (
github.com/conductorone/conductorone-sdk-go v1.14.0
github.com/conductorone/conductorone-sdk-go v1.18.3
github.com/pterm/pterm v0.12.62
github.com/toqueteos/webbrowser v1.2.0
github.com/xhit/go-str2duration/v2 v2.1.0
golang.org/x/sync v0.3.0
golang.org/x/sync v0.7.0
)

require (
atomicgo.dev/cursor v0.1.1 // indirect
atomicgo.dev/keyboard v0.2.9 // indirect
atomicgo.dev/schedule v0.0.2 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 // indirect
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/ericlagergren/decimal v0.0.0-20240411145413-00de7ca16731 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/gookit/color v1.5.3 // indirect
github.com/lithammer/fuzzysearch v1.1.8 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/term v0.13.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/term v0.22.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a // indirect
)

require (
Expand All @@ -55,9 +53,9 @@ require (
github.com/spf13/viper v1.15.0
github.com/subosito/gotenv v1.4.2 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
golang.org/x/oauth2 v0.13.0
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/oauth2 v0.21.0
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 6399426

Please sign in to comment.