add overrides

This commit is contained in:
monalisa 2024-01-11 13:28:55 +05:30
parent 7a68d5a0fa
commit 92c6e96d72
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 4 additions and 2 deletions

View File

@ -2,10 +2,11 @@ package external_locations
import (
"github.com/databricks/cli/libs/cmdio"
"github.com/databricks/databricks-sdk-go/service/catalog"
"github.com/spf13/cobra"
)
func listOverride(listCmd *cobra.Command) {
func listOverride(listCmd *cobra.Command, listReq *catalog.ListExternalLocationsRequest) {
listCmd.Annotations["template"] = cmdio.Heredoc(`
{{header "Name"}} {{header "Credential"}} {{header "URL"}}
{{range .}}{{.Name|green}} {{.CredentialName|cyan}} {{.Url}}

View File

@ -2,10 +2,11 @@ package storage_credentials
import (
"github.com/databricks/cli/libs/cmdio"
"github.com/databricks/databricks-sdk-go/service/catalog"
"github.com/spf13/cobra"
)
func listOverride(listCmd *cobra.Command) {
func listOverride(listCmd *cobra.Command, listReq *catalog.ListStorageCredentialsRequest) {
listCmd.Annotations["template"] = cmdio.Heredoc(`
{{header "ID"}} {{header "Name"}} {{header "Credentials"}}
{{range .}}{{.Id|green}} {{.Name|cyan}} {{if .AwsIamRole}}{{.AwsIamRole.RoleArn}}{{end}}{{if .AzureServicePrincipal}}{{.AzureServicePrincipal.ApplicationId}}{{end}}{{if .DatabricksGcpServiceAccount}}{{.DatabricksGcpServiceAccount.Email}}{{end}}