dashboard

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidJSON is returned when dashboard JSON cannot be parsed
	ErrInvalidJSON = errors.New("invalid JSON format")

	// ErrMissingUID is returned when dashboard doesn't have a UID
	ErrMissingUID = errors.New("dashboard UID is missing")

	// ErrMissingOrganization is returned when organization is not specified
	ErrMissingOrganization = errors.New("dashboard organization is missing")
)

Functions

This section is empty.

Types

type Dashboard

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

Dashboard represents a Grafana dashboard domain object

func New

func New(organization string, content map[string]any) *Dashboard

New creates a new Dashboard domain object, extracting the UID from the content

func (*Dashboard) Content

func (d *Dashboard) Content() map[string]any

Content returns a copy of the content to prevent external mutation

func (*Dashboard) Organization

func (d *Dashboard) Organization() string

func (*Dashboard) String

func (d *Dashboard) String() string

String provides a string representation for debugging

func (*Dashboard) UID

func (d *Dashboard) UID() string

Getters (pure accessors)

func (*Dashboard) Validate

func (d *Dashboard) Validate() []error

Validate performs domain validation logic

Jump to

Keyboard shortcuts

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