Documentation ¶
Index ¶
- Variables
- type Base
- func (b *Base) AccessPolicy() *accesspolicy.Kind
- func (b *Base) All() []kindsys.Core
- func (b *Base) Dashboard() *dashboard.Kind
- func (b *Base) Folder() *folder.Kind
- func (b *Base) LibraryPanel() *librarypanel.Kind
- func (b *Base) Playlist() *playlist.Kind
- func (b *Base) Preferences() *preferences.Kind
- func (b *Base) PublicDashboard() *publicdashboard.Kind
- func (b *Base) Role() *role.Kind
- func (b *Base) RoleBinding() *rolebinding.Kind
- func (b *Base) Team() *team.Kind
Constants ¶
This section is empty.
Variables ¶
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:
- Per-kind methods, which return the kind-specific type, e.g. Dashboard() returns dashboard.Dashboard.
- All(), which returns a slice of kindsys.Core.
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 ¶
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 ¶
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 ¶
Dashboard returns the kindsys.Interface implementation for the dashboard kind.
func (*Base) Folder ¶
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 ¶
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 ¶
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.