Update Go SDK to v0.30.1 (#1162)

## Changes
Update Go SDK to 0.30.1

## Tests
```
make fmt && make test
```
This commit is contained in:
hectorcast-db 2024-01-29 16:25:10 +01:00 committed by GitHub
parent 2f1b81cba0
commit e3d2dbb0ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 18 deletions

View File

@ -46,13 +46,13 @@ func New() *cobra.Command {
// Functions can be added from the `init()` function in manually curated files in this directory. // Functions can be added from the `init()` function in manually curated files in this directory.
var createOverrides []func( var createOverrides []func(
*cobra.Command, *cobra.Command,
*sql.CreateDashboardRequest, *sql.DashboardPostContent,
) )
func newCreate() *cobra.Command { func newCreate() *cobra.Command {
cmd := &cobra.Command{} cmd := &cobra.Command{}
var createReq sql.CreateDashboardRequest var createReq sql.DashboardPostContent
var createJson flags.JsonFlag var createJson flags.JsonFlag
// TODO: short flags // TODO: short flags
@ -122,7 +122,7 @@ func newDelete() *cobra.Command {
cmd.Use = "delete DASHBOARD_ID" cmd.Use = "delete DASHBOARD_ID"
cmd.Short = `Remove a dashboard.` cmd.Short = `Remove a dashboard.`
cmd.Long = `Remove a dashboard. cmd.Long = `Remove a dashboard.
Moves a dashboard to the trash. Trashed dashboards do not appear in list views Moves a dashboard to the trash. Trashed dashboards do not appear in list views
or searches, and cannot be shared.` or searches, and cannot be shared.`
@ -196,7 +196,7 @@ func newGet() *cobra.Command {
cmd.Use = "get DASHBOARD_ID" cmd.Use = "get DASHBOARD_ID"
cmd.Short = `Retrieve a definition.` cmd.Short = `Retrieve a definition.`
cmd.Long = `Retrieve a definition. cmd.Long = `Retrieve a definition.
Returns a JSON representation of a dashboard object, including its Returns a JSON representation of a dashboard object, including its
visualization and query objects.` visualization and query objects.`
@ -275,7 +275,7 @@ func newList() *cobra.Command {
cmd.Use = "list" cmd.Use = "list"
cmd.Short = `Get dashboard objects.` cmd.Short = `Get dashboard objects.`
cmd.Long = `Get dashboard objects. cmd.Long = `Get dashboard objects.
Fetch a paginated list of dashboard objects.` Fetch a paginated list of dashboard objects.`
cmd.Annotations = make(map[string]string) cmd.Annotations = make(map[string]string)
@ -334,7 +334,7 @@ func newRestore() *cobra.Command {
cmd.Use = "restore DASHBOARD_ID" cmd.Use = "restore DASHBOARD_ID"
cmd.Short = `Restore a dashboard.` cmd.Short = `Restore a dashboard.`
cmd.Long = `Restore a dashboard. cmd.Long = `Restore a dashboard.
A restored dashboard appears in list views and searches and can be shared.` A restored dashboard appears in list views and searches and can be shared.`
cmd.Annotations = make(map[string]string) cmd.Annotations = make(map[string]string)

View File

@ -60,7 +60,7 @@ func newCreateOboToken() *cobra.Command {
cmd.Use = "create-obo-token APPLICATION_ID LIFETIME_SECONDS" cmd.Use = "create-obo-token APPLICATION_ID LIFETIME_SECONDS"
cmd.Short = `Create on-behalf token.` cmd.Short = `Create on-behalf token.`
cmd.Long = `Create on-behalf token. cmd.Long = `Create on-behalf token.
Creates a token on behalf of a service principal. Creates a token on behalf of a service principal.
Arguments: Arguments:
@ -146,7 +146,7 @@ func newDelete() *cobra.Command {
cmd.Use = "delete TOKEN_ID" cmd.Use = "delete TOKEN_ID"
cmd.Short = `Delete a token.` cmd.Short = `Delete a token.`
cmd.Long = `Delete a token. cmd.Long = `Delete a token.
Deletes a token, specified by its ID. Deletes a token, specified by its ID.
Arguments: Arguments:
@ -222,7 +222,7 @@ func newGet() *cobra.Command {
cmd.Use = "get TOKEN_ID" cmd.Use = "get TOKEN_ID"
cmd.Short = `Get token info.` cmd.Short = `Get token info.`
cmd.Long = `Get token info. cmd.Long = `Get token info.
Gets information about a token, specified by its ID. Gets information about a token, specified by its ID.
Arguments: Arguments:
@ -293,7 +293,7 @@ func newGetPermissionLevels() *cobra.Command {
cmd.Use = "get-permission-levels" cmd.Use = "get-permission-levels"
cmd.Short = `Get token permission levels.` cmd.Short = `Get token permission levels.`
cmd.Long = `Get token permission levels. cmd.Long = `Get token permission levels.
Gets the permission levels that a user can have on an object.` Gets the permission levels that a user can have on an object.`
cmd.Annotations = make(map[string]string) cmd.Annotations = make(map[string]string)
@ -341,7 +341,7 @@ func newGetPermissions() *cobra.Command {
cmd.Use = "get-permissions" cmd.Use = "get-permissions"
cmd.Short = `Get token permissions.` cmd.Short = `Get token permissions.`
cmd.Long = `Get token permissions. cmd.Long = `Get token permissions.
Gets the permissions of all tokens. Tokens can inherit permissions from their Gets the permissions of all tokens. Tokens can inherit permissions from their
root object.` root object.`
@ -392,13 +392,13 @@ func newList() *cobra.Command {
// TODO: short flags // TODO: short flags
cmd.Flags().StringVar(&listReq.CreatedById, "created-by-id", listReq.CreatedById, `User ID of the user that created the token.`) cmd.Flags().Int64Var(&listReq.CreatedById, "created-by-id", listReq.CreatedById, `User ID of the user that created the token.`)
cmd.Flags().StringVar(&listReq.CreatedByUsername, "created-by-username", listReq.CreatedByUsername, `Username of the user that created the token.`) cmd.Flags().StringVar(&listReq.CreatedByUsername, "created-by-username", listReq.CreatedByUsername, `Username of the user that created the token.`)
cmd.Use = "list" cmd.Use = "list"
cmd.Short = `List all tokens.` cmd.Short = `List all tokens.`
cmd.Long = `List all tokens. cmd.Long = `List all tokens.
Lists all tokens associated with the specified workspace or user.` Lists all tokens associated with the specified workspace or user.`
cmd.Annotations = make(map[string]string) cmd.Annotations = make(map[string]string)
@ -461,7 +461,7 @@ func newSetPermissions() *cobra.Command {
cmd.Use = "set-permissions" cmd.Use = "set-permissions"
cmd.Short = `Set token permissions.` cmd.Short = `Set token permissions.`
cmd.Long = `Set token permissions. cmd.Long = `Set token permissions.
Sets permissions on all tokens. Tokens can inherit permissions from their root Sets permissions on all tokens. Tokens can inherit permissions from their root
object.` object.`
@ -532,7 +532,7 @@ func newUpdatePermissions() *cobra.Command {
cmd.Use = "update-permissions" cmd.Use = "update-permissions"
cmd.Short = `Update token permissions.` cmd.Short = `Update token permissions.`
cmd.Long = `Update token permissions. cmd.Long = `Update token permissions.
Updates the permissions on all tokens. Tokens can inherit permissions from Updates the permissions on all tokens. Tokens can inherit permissions from
their root object.` their root object.`

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.21
require ( require (
github.com/briandowns/spinner v1.23.0 // Apache 2.0 github.com/briandowns/spinner v1.23.0 // Apache 2.0
github.com/databricks/databricks-sdk-go v0.29.1 // Apache 2.0 github.com/databricks/databricks-sdk-go v0.30.1 // Apache 2.0
github.com/fatih/color v1.16.0 // MIT github.com/fatih/color v1.16.0 // MIT
github.com/ghodss/yaml v1.0.0 // MIT + NOTICE github.com/ghodss/yaml v1.0.0 // MIT + NOTICE
github.com/google/uuid v1.5.0 // BSD-3-Clause github.com/google/uuid v1.5.0 // BSD-3-Clause

4
go.sum generated
View File

@ -30,8 +30,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
github.com/databricks/databricks-sdk-go v0.29.1 h1:b0/cgl16iFQMhB8g2smxp2MiX8DqOUPea+hwE4LQjOU= github.com/databricks/databricks-sdk-go v0.30.1 h1:ux6I3aHqUH/AOLZEaEHBmwkbHuSAmb+42mTfvh2A7bE=
github.com/databricks/databricks-sdk-go v0.29.1/go.mod h1:4Iy1e1XZiMC15BfWMQVrtr6va8wSEkiUXv0ZRMfgo3w= github.com/databricks/databricks-sdk-go v0.30.1/go.mod h1:QB64wT8EmR9T4ZPqeTRKjfIF4tPZuP9M9kM8Hcr019Q=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=