dashboards

package
v0.42.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 7

Documentation

Overview

These APIs provide specific management operations for Lakeview dashboards.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDashboardRequest added in v0.35.0

type CreateDashboardRequest struct {
	// The display name of the dashboard.
	DisplayName string `json:"display_name"`
	// The workspace path of the folder containing the dashboard. Includes
	// leading slash and no trailing slash.
	ParentPath string `json:"parent_path,omitempty"`
	// The contents of the dashboard in serialized string form.
	SerializedDashboard string `json:"serialized_dashboard,omitempty"`
	// The warehouse ID used to run the dashboard.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (CreateDashboardRequest) MarshalJSON added in v0.35.0

func (s CreateDashboardRequest) MarshalJSON() ([]byte, error)

func (*CreateDashboardRequest) UnmarshalJSON added in v0.35.0

func (s *CreateDashboardRequest) UnmarshalJSON(b []byte) error

type Dashboard added in v0.35.0

type Dashboard struct {
	// The timestamp of when the dashboard was created.
	CreateTime string `json:"create_time,omitempty"`
	// UUID identifying the dashboard.
	DashboardId string `json:"dashboard_id,omitempty"`
	// The display name of the dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// The etag for the dashboard. Can be optionally provided on updates to
	// ensure that the dashboard has not been modified since the last read.
	Etag string `json:"etag,omitempty"`
	// The state of the dashboard resource. Used for tracking trashed status.
	LifecycleState LifecycleState `json:"lifecycle_state,omitempty"`
	// The workspace path of the folder containing the dashboard. Includes
	// leading slash and no trailing slash.
	ParentPath string `json:"parent_path,omitempty"`
	// The workspace path of the dashboard asset, including the file name.
	Path string `json:"path,omitempty"`
	// The contents of the dashboard in serialized string form.
	SerializedDashboard string `json:"serialized_dashboard,omitempty"`
	// The timestamp of when the dashboard was last updated by the user.
	UpdateTime string `json:"update_time,omitempty"`
	// The warehouse ID used to run the dashboard.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (Dashboard) MarshalJSON added in v0.35.0

func (s Dashboard) MarshalJSON() ([]byte, error)

func (*Dashboard) UnmarshalJSON added in v0.35.0

func (s *Dashboard) UnmarshalJSON(b []byte) error

type GetDashboardRequest added in v0.36.0

type GetDashboardRequest struct {
	// UUID identifying the dashboard.
	DashboardId string `json:"-" url:"-"`
}

Get dashboard

type GetPublishedDashboardRequest added in v0.36.0

type GetPublishedDashboardRequest struct {
	// UUID identifying the dashboard to be published.
	DashboardId string `json:"-" url:"-"`
}

Get published dashboard

type LakeviewAPI

type LakeviewAPI struct {
	// contains filtered or unexported fields
}

These APIs provide specific management operations for Lakeview dashboards. Generic resource management can be done with Workspace API (import, export, get-status, list, delete).

func NewLakeview

func NewLakeview(client *client.DatabricksClient) *LakeviewAPI

func (*LakeviewAPI) Create added in v0.35.0

func (a *LakeviewAPI) Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)

Create dashboard.

Create a draft dashboard.

func (*LakeviewAPI) Get added in v0.35.0

func (a *LakeviewAPI) Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)

Get dashboard.

Get a draft dashboard.

func (*LakeviewAPI) GetByDashboardId added in v0.35.0

func (a *LakeviewAPI) GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error)

Get dashboard.

Get a draft dashboard.

func (*LakeviewAPI) GetPublished added in v0.35.0

Get published dashboard.

Get the current published dashboard.

func (*LakeviewAPI) GetPublishedByDashboardId added in v0.35.0

func (a *LakeviewAPI) GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error)

Get published dashboard.

Get the current published dashboard.

func (*LakeviewAPI) Impl

func (a *LakeviewAPI) Impl() LakeviewService

Impl returns low-level Lakeview API implementation Deprecated: use MockLakeviewInterface instead.

func (*LakeviewAPI) Migrate added in v0.37.0

func (a *LakeviewAPI) Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)

Migrate dashboard.

Migrates a classic SQL dashboard to Lakeview.

func (*LakeviewAPI) Publish

func (a *LakeviewAPI) Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)

Publish dashboard.

Publish the current draft dashboard.

func (*LakeviewAPI) Trash added in v0.35.0

func (a *LakeviewAPI) Trash(ctx context.Context, request TrashDashboardRequest) error

Trash dashboard.

Trash a dashboard.

func (*LakeviewAPI) TrashByDashboardId added in v0.35.0

func (a *LakeviewAPI) TrashByDashboardId(ctx context.Context, dashboardId string) error

Trash dashboard.

Trash a dashboard.

func (*LakeviewAPI) Unpublish added in v0.37.0

func (a *LakeviewAPI) Unpublish(ctx context.Context, request UnpublishDashboardRequest) error

Unpublish dashboard.

Unpublish the dashboard.

func (*LakeviewAPI) UnpublishByDashboardId added in v0.37.0

func (a *LakeviewAPI) UnpublishByDashboardId(ctx context.Context, dashboardId string) error

Unpublish dashboard.

Unpublish the dashboard.

func (*LakeviewAPI) Update added in v0.35.0

func (a *LakeviewAPI) Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)

Update dashboard.

Update a draft dashboard.

func (*LakeviewAPI) WithImpl

func (a *LakeviewAPI) WithImpl(impl LakeviewService) LakeviewInterface

WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks. Deprecated: use MockLakeviewInterface instead.

type LakeviewInterface

type LakeviewInterface interface {
	// WithImpl could be used to override low-level API implementations for unit
	// testing purposes with [github.com/golang/mock] or other mocking frameworks.
	// Deprecated: use MockLakeviewInterface instead.
	WithImpl(impl LakeviewService) LakeviewInterface

	// Impl returns low-level Lakeview API implementation
	// Deprecated: use MockLakeviewInterface instead.
	Impl() LakeviewService

	// Create dashboard.
	//
	// Create a draft dashboard.
	Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)

	// Get dashboard.
	//
	// Get a draft dashboard.
	Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)

	// Get dashboard.
	//
	// Get a draft dashboard.
	GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error)

	// Get published dashboard.
	//
	// Get the current published dashboard.
	GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)

	// Get published dashboard.
	//
	// Get the current published dashboard.
	GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error)

	// Migrate dashboard.
	//
	// Migrates a classic SQL dashboard to Lakeview.
	Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)

	// Publish dashboard.
	//
	// Publish the current draft dashboard.
	Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)

	// Trash dashboard.
	//
	// Trash a dashboard.
	Trash(ctx context.Context, request TrashDashboardRequest) error

	// Trash dashboard.
	//
	// Trash a dashboard.
	TrashByDashboardId(ctx context.Context, dashboardId string) error

	// Unpublish dashboard.
	//
	// Unpublish the dashboard.
	Unpublish(ctx context.Context, request UnpublishDashboardRequest) error

	// Unpublish dashboard.
	//
	// Unpublish the dashboard.
	UnpublishByDashboardId(ctx context.Context, dashboardId string) error

	// Update dashboard.
	//
	// Update a draft dashboard.
	Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)
}

type LakeviewService

type LakeviewService interface {

	// Create dashboard.
	//
	// Create a draft dashboard.
	Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)

	// Get dashboard.
	//
	// Get a draft dashboard.
	Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)

	// Get published dashboard.
	//
	// Get the current published dashboard.
	GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)

	// Migrate dashboard.
	//
	// Migrates a classic SQL dashboard to Lakeview.
	Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)

	// Publish dashboard.
	//
	// Publish the current draft dashboard.
	Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)

	// Trash dashboard.
	//
	// Trash a dashboard.
	Trash(ctx context.Context, request TrashDashboardRequest) error

	// Unpublish dashboard.
	//
	// Unpublish the dashboard.
	Unpublish(ctx context.Context, request UnpublishDashboardRequest) error

	// Update dashboard.
	//
	// Update a draft dashboard.
	Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)
}

These APIs provide specific management operations for Lakeview dashboards. Generic resource management can be done with Workspace API (import, export, get-status, list, delete).

type LifecycleState added in v0.35.0

type LifecycleState string
const LifecycleStateActive LifecycleState = `ACTIVE`
const LifecycleStateTrashed LifecycleState = `TRASHED`

func (*LifecycleState) Set added in v0.35.0

func (f *LifecycleState) Set(v string) error

Set raw string value and validate it against allowed values

func (*LifecycleState) String added in v0.35.0

func (f *LifecycleState) String() string

String representation for fmt.Print

func (*LifecycleState) Type added in v0.35.0

func (f *LifecycleState) Type() string

Type always returns LifecycleState to satisfy [pflag.Value] interface

type MigrateDashboardRequest added in v0.37.0

type MigrateDashboardRequest struct {
	// Display name for the new Lakeview dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// The workspace path of the folder to contain the migrated Lakeview
	// dashboard.
	ParentPath string `json:"parent_path,omitempty"`
	// UUID of the dashboard to be migrated.
	SourceDashboardId string `json:"source_dashboard_id"`

	ForceSendFields []string `json:"-"`
}

func (MigrateDashboardRequest) MarshalJSON added in v0.37.0

func (s MigrateDashboardRequest) MarshalJSON() ([]byte, error)

func (*MigrateDashboardRequest) UnmarshalJSON added in v0.37.0

func (s *MigrateDashboardRequest) UnmarshalJSON(b []byte) error

type PublishRequest

type PublishRequest struct {
	// UUID identifying the dashboard to be published.
	DashboardId string `json:"-" url:"-"`
	// Flag to indicate if the publisher's credentials should be embedded in the
	// published dashboard. These embedded credentials will be used to execute
	// the published dashboard's queries.
	EmbedCredentials bool `json:"embed_credentials,omitempty"`
	// The ID of the warehouse that can be used to override the warehouse which
	// was set in the draft.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (PublishRequest) MarshalJSON

func (s PublishRequest) MarshalJSON() ([]byte, error)

func (*PublishRequest) UnmarshalJSON

func (s *PublishRequest) UnmarshalJSON(b []byte) error

type PublishedDashboard added in v0.35.0

type PublishedDashboard struct {
	// The display name of the published dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// Indicates whether credentials are embedded in the published dashboard.
	EmbedCredentials bool `json:"embed_credentials,omitempty"`
	// The timestamp of when the published dashboard was last revised.
	RevisionCreateTime string `json:"revision_create_time,omitempty"`
	// The warehouse ID used to run the published dashboard.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (PublishedDashboard) MarshalJSON added in v0.35.0

func (s PublishedDashboard) MarshalJSON() ([]byte, error)

func (*PublishedDashboard) UnmarshalJSON added in v0.35.0

func (s *PublishedDashboard) UnmarshalJSON(b []byte) error

type TrashDashboardRequest added in v0.36.0

type TrashDashboardRequest struct {
	// UUID identifying the dashboard.
	DashboardId string `json:"-" url:"-"`
}

Trash dashboard

type TrashDashboardResponse added in v0.35.0

type TrashDashboardResponse struct {
}

type UnpublishDashboardRequest added in v0.37.0

type UnpublishDashboardRequest struct {
	// UUID identifying the dashboard to be published.
	DashboardId string `json:"-" url:"-"`
}

Unpublish dashboard

type UnpublishDashboardResponse added in v0.37.0

type UnpublishDashboardResponse struct {
}

type UpdateDashboardRequest added in v0.35.0

type UpdateDashboardRequest struct {
	// UUID identifying the dashboard.
	DashboardId string `json:"-" url:"-"`
	// The display name of the dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// The etag for the dashboard. Can be optionally provided on updates to
	// ensure that the dashboard has not been modified since the last read.
	Etag string `json:"etag,omitempty"`
	// The contents of the dashboard in serialized string form.
	SerializedDashboard string `json:"serialized_dashboard,omitempty"`
	// The warehouse ID used to run the dashboard.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (UpdateDashboardRequest) MarshalJSON added in v0.35.0

func (s UpdateDashboardRequest) MarshalJSON() ([]byte, error)

func (*UpdateDashboardRequest) UnmarshalJSON added in v0.35.0

func (s *UpdateDashboardRequest) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL