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
10 changes: 5 additions & 5 deletions cmd/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ func newRepositoryGrantCmd() *cobra.Command {
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
cmd.SilenceUsage = true
return runRepositoryGrantCreate(args[0], &createInput)
return runRepositoryGrantCreate(cmd, args[0], &createInput)
},
}
repositoryGrantCreateCmd.Flags().StringArrayVar(&createInput.conditions, "condition", nil, "Recipient project attribute condition; repeat a key to accept a set of values, or write key=* to accept any value")
Expand Down Expand Up @@ -480,7 +480,7 @@ func newRepositoryGrantCmd() *cobra.Command {
return repositoryGrantCmd
}

func runRepositoryGrantCreate(name string, input *repositoryGrantCreateInput) error {
func runRepositoryGrantCreate(cmd *cobra.Command, name string, input *repositoryGrantCreateInput) error {
ctx := context.Background()

action, err := grants.ResolveRepoAction(input.action)
Expand All @@ -492,7 +492,7 @@ func runRepositoryGrantCreate(name string, input *repositoryGrantCreateInput) er
return err
}

mdClient, err := massdriver.NewClient()
mdClient, err := newMassdriverClient(cmd)
if err != nil {
return fmt.Errorf("error initializing massdriver client: %w", err)
}
Expand Down Expand Up @@ -520,7 +520,7 @@ func runRepositoryGrantList(cmd *cobra.Command, args []string) error {

cmd.SilenceUsage = true

mdClient, err := massdriver.NewClient()
mdClient, err := newMassdriverClient(cmd)
if err != nil {
return fmt.Errorf("error initializing massdriver client: %w", err)
}
Expand All @@ -539,7 +539,7 @@ func runRepositoryGrantDelete(cmd *cobra.Command, args []string) error {
return validateErr
}

mdClient, err := massdriver.NewClient()
mdClient, err := newMassdriverClient(cmd)
if err != nil {
return fmt.Errorf("error initializing massdriver client: %w", err)
}
Expand Down
10 changes: 5 additions & 5 deletions cmd/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func newResourceGrantCmd() *cobra.Command {
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
cmd.SilenceUsage = true
return runResourceGrantCreate(args[0], &createInput)
return runResourceGrantCreate(cmd, args[0], &createInput)
},
}
resourceGrantCreateCmd.Flags().StringArrayVar(&createInput.conditions, "condition", nil, "Recipient environment attribute condition; repeat a key to accept a set of values, or write key=* to accept any value")
Expand Down Expand Up @@ -483,7 +483,7 @@ func newResourceGrantCmd() *cobra.Command {
return resourceGrantCmd
}

func runResourceGrantCreate(resourceID string, input *resourceGrantCreateInput) error {
func runResourceGrantCreate(cmd *cobra.Command, resourceID string, input *resourceGrantCreateInput) error {
ctx := context.Background()

action, err := grants.ResolveResourceAction(input.action)
Expand All @@ -495,7 +495,7 @@ func runResourceGrantCreate(resourceID string, input *resourceGrantCreateInput)
return err
}

mdClient, err := massdriver.NewClient()
mdClient, err := newMassdriverClient(cmd)
if err != nil {
return fmt.Errorf("error initializing massdriver client: %w", err)
}
Expand Down Expand Up @@ -523,7 +523,7 @@ func runResourceGrantList(cmd *cobra.Command, args []string) error {

cmd.SilenceUsage = true

mdClient, err := massdriver.NewClient()
mdClient, err := newMassdriverClient(cmd)
if err != nil {
return fmt.Errorf("error initializing massdriver client: %w", err)
}
Expand All @@ -542,7 +542,7 @@ func runResourceGrantDelete(cmd *cobra.Command, args []string) error {
return validateErr
}

mdClient, err := massdriver.NewClient()
mdClient, err := newMassdriverClient(cmd)
if err != nil {
return fmt.Errorf("error initializing massdriver client: %w", err)
}
Expand Down
6 changes: 6 additions & 0 deletions docs/generated/mass_repository_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ mass repository grant delete <grant-id>
-h, --help help for grant
```

### Options inherited from parent commands

```
--profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile)
```

### SEE ALSO

* [mass repository](/cli/commands/mass_repository) - Manage OCI repositories (bundles and resource types)
Expand Down
6 changes: 6 additions & 0 deletions docs/generated/mass_repository_grant_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ mass repository grant create <name> [flags]
-h, --help help for create
```

### Options inherited from parent commands

```
--profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile)
```

### SEE ALSO

* [mass repository grant](/cli/commands/mass_repository_grant) - Manage sharing grants on an OCI repository
6 changes: 6 additions & 0 deletions docs/generated/mass_repository_grant_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ mass repository grant delete <grant-id> [flags]
-h, --help help for delete
```

### Options inherited from parent commands

```
--profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile)
```

### SEE ALSO

* [mass repository grant](/cli/commands/mass_repository_grant) - Manage sharing grants on an OCI repository
6 changes: 6 additions & 0 deletions docs/generated/mass_repository_grant_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ mass repository grant list <name> [flags]
-o, --output string Output format (table, json) (default "table")
```

### Options inherited from parent commands

```
--profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile)
```

### SEE ALSO

* [mass repository grant](/cli/commands/mass_repository_grant) - Manage sharing grants on an OCI repository
6 changes: 6 additions & 0 deletions docs/generated/mass_resource_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ mass resource grant delete <grant-id>
-h, --help help for grant
```

### Options inherited from parent commands

```
--profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile)
```

### SEE ALSO

* [mass resource](/cli/commands/mass_resource) - Manage resources
Expand Down
6 changes: 6 additions & 0 deletions docs/generated/mass_resource_grant_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ mass resource grant create <resource-id> [flags]
-h, --help help for create
```

### Options inherited from parent commands

```
--profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile)
```

### SEE ALSO

* [mass resource grant](/cli/commands/mass_resource_grant) - Manage sharing grants on a resource
6 changes: 6 additions & 0 deletions docs/generated/mass_resource_grant_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ mass resource grant delete <grant-id> [flags]
-h, --help help for delete
```

### Options inherited from parent commands

```
--profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile)
```

### SEE ALSO

* [mass resource grant](/cli/commands/mass_resource_grant) - Manage sharing grants on a resource
6 changes: 6 additions & 0 deletions docs/generated/mass_resource_grant_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ mass resource grant list <resource-id> [flags]
-o, --output string Output format (table, json) (default "table")
```

### Options inherited from parent commands

```
--profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile)
```

### SEE ALSO

* [mass resource grant](/cli/commands/mass_resource_grant) - Manage sharing grants on a resource
Loading