librarypanel

package
v0.0.0-cloud Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind struct {
	kindsys.Core
	// contains filtered or unexported fields
}

TODO standard generated docs

func NewKind

func NewKind(rt *thema.Runtime, opts ...thema.BindOption) (*Kind, error)

TODO standard generated docs

func (*Kind) ConvergentLineage

func (k *Kind) ConvergentLineage() thema.ConvergentLineage[*LibraryPanel]

ConvergentLineage returns the same thema.Lineage as Lineage, but bound (see thema.BindType) to the the LibraryPanel type generated from the current schema, v0.0.

func (*Kind) JSONValueMux

func (k *Kind) JSONValueMux(b []byte) (*LibraryPanel, thema.TranslationLacunas, error)

JSONValueMux is a version multiplexer that maps a []byte containing JSON data at any schematized dashboard version to an instance of LibraryPanel.

Validation and translation errors emitted from this func will identify the input bytes as "dashboard.json".

This is a thin wrapper around Thema's vmux.ValueMux.

type LibraryElementDTOMeta

type LibraryElementDTOMeta struct {
	ConnectedDashboards int64                     `json:"connectedDashboards"`
	Created             time.Time                 `json:"created"`
	CreatedBy           LibraryElementDTOMetaUser `json:"createdBy"`
	FolderName          string                    `json:"folderName"`
	FolderUid           string                    `json:"folderUid"`
	Updated             time.Time                 `json:"updated"`
	UpdatedBy           LibraryElementDTOMetaUser `json:"updatedBy"`
}

LibraryElementDTOMeta defines model for LibraryElementDTOMeta.

type LibraryElementDTOMetaUser

type LibraryElementDTOMetaUser struct {
	AvatarUrl string `json:"avatarUrl"`
	Id        int64  `json:"id"`
	Name      string `json:"name"`
}

LibraryElementDTOMetaUser defines model for LibraryElementDTOMetaUser.

type LibraryPanel

type LibraryPanel struct {
	// Panel description
	Description *string `json:"description,omitempty"`

	// Folder UID
	FolderUid *string                `json:"folderUid,omitempty"`
	Meta      *LibraryElementDTOMeta `json:"meta,omitempty"`

	// TODO: should be the same panel schema defined in dashboard
	// Typescript: Omit<Panel, 'gridPos' | 'id' | 'libraryPanel'>;
	Model map[string]interface{} `json:"model"`

	// Panel name (also saved in the model)
	Name string `json:"name"`

	// Dashboard version when this was saved (zero if unknown)
	SchemaVersion *int `json:"schemaVersion,omitempty"`

	// The panel type (from inside the model)
	Type string `json:"type"`

	// Library element UID
	Uid string `json:"uid"`

	// Version panel version, incremented each time the dashboard is updated.
	Version int64 `json:"version"`
}

LibraryPanel defines model for LibraryPanel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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