corekind

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KindSet = wire.NewSet(
	NewBase,
)

KindSet contains all of the wire-style providers related to kinds.

Functions

This section is empty.

Types

type Base

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

Base is a registry of all Grafana core kinds. It is designed for use both inside of Grafana itself, and for import by external Go programs wanting to work with Grafana's kind system.

The registry provides two modes for accessing core kinds:

Prefer the individual named methods for use cases where the particular kind(s) that are needed are known to the caller. For example, a dashboard linter can know that it specifically wants the dashboard kind.

Prefer All() when performing operations generically across all kinds. For example, a generic HTTP middleware for validating request bodies expected to contain some kind-schematized type.

func NewBase

func NewBase(rt *thema.Runtime) *Base

NewBase provides a registry of all core raw and structured kinds, without any composition of slot kinds.

All calling code within grafana/grafana is expected to use Grafana's singleton thema.Runtime, returned from cuectx.GrafanaThemaRuntime. If nil is passed, the singleton will be used.

func (*Base) AccessPolicy

func (b *Base) AccessPolicy() *accesspolicy.Kind

AccessPolicy returns the kindsys.Interface implementation for the accesspolicy kind.

func (*Base) All

func (b *Base) All() []kindsys.Core

All returns a slice of kindsys.Core containing all core Grafana kinds.

The returned slice is sorted lexicographically by kind machine name.

func (*Base) Dashboard

func (b *Base) Dashboard() *dashboard.Kind

Dashboard returns the kindsys.Interface implementation for the dashboard kind.

func (*Base) Folder

func (b *Base) Folder() *folder.Kind

Folder returns the kindsys.Interface implementation for the folder kind.

func (*Base) LibraryPanel

func (b *Base) LibraryPanel() *librarypanel.Kind

LibraryPanel returns the kindsys.Interface implementation for the librarypanel kind.

func (*Base) Playlist

func (b *Base) Playlist() *playlist.Kind

Playlist returns the kindsys.Interface implementation for the playlist kind.

func (*Base) Preferences

func (b *Base) Preferences() *preferences.Kind

Preferences returns the kindsys.Interface implementation for the preferences kind.

func (*Base) PublicDashboard

func (b *Base) PublicDashboard() *publicdashboard.Kind

PublicDashboard returns the kindsys.Interface implementation for the publicdashboard kind.

func (*Base) Role

func (b *Base) Role() *role.Kind

Role returns the kindsys.Interface implementation for the role kind.

func (*Base) RoleBinding

func (b *Base) RoleBinding() *rolebinding.Kind

RoleBinding returns the kindsys.Interface implementation for the rolebinding kind.

func (*Base) Team

func (b *Base) Team() *team.Kind

Team returns the kindsys.Interface implementation for the team kind.

Jump to

Keyboard shortcuts

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