v0alpha1

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GROUP         = "playlist.grafana.app"
	VERSION       = "v0alpha1"
	APIVERSION    = GROUP + "/" + VERSION
	RESOURCE      = "playlists"
	GROUPRESOURCE = GROUP + "/" + RESOURCE
)

Variables

View Source
var PlaylistResourceInfo = common.NewResourceInfo(GROUP, VERSION,
	RESOURCE, "playlist", "Playlist",
	func() runtime.Object { return &Playlist{} },
	func() runtime.Object { return &PlaylistList{} },
)
View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: GROUP, Version: VERSION}
)

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

Types

type Item

type Item struct {
	// Type of the item.
	Type ItemType `json:"type"`

	// Value depends on type and describes the playlist item.
	//
	//  - dashboard_by_id: The value is an internal numerical identifier set by Grafana. This
	//  is not portable as the numerical identifier is non-deterministic between different instances.
	//  Will be replaced by dashboard_by_uid in the future. (deprecated)
	//  - dashboard_by_tag: The value is a tag which is set on any number of dashboards. All
	//  dashboards behind the tag will be added to the playlist.
	//  - dashboard_by_uid: The value is the dashboard UID
	Value string `json:"value"`
}

Item defines model for Item.

func (*Item) DeepCopy

func (in *Item) DeepCopy() *Item

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Item.

func (*Item) DeepCopyInto

func (in *Item) DeepCopyInto(out *Item)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ItemType

type ItemType string

Type of the item. +enum

const (
	ItemTypeDashboardByTag ItemType = "dashboard_by_tag"
	ItemTypeDashboardByUid ItemType = "dashboard_by_uid"

	// Deprecated -- should use UID
	ItemTypeDashboardById ItemType = "dashboard_by_id"
)

Defines values for ItemType.

type Playlist

type Playlist struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec Spec `json:"spec,omitempty"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*Playlist) DeepCopy

func (in *Playlist) DeepCopy() *Playlist

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Playlist.

func (*Playlist) DeepCopyInto

func (in *Playlist) DeepCopyInto(out *Playlist)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Playlist) DeepCopyObject

func (in *Playlist) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PlaylistList

type PlaylistList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Playlist `json:"items,omitempty"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*PlaylistList) DeepCopy

func (in *PlaylistList) DeepCopy() *PlaylistList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlaylistList.

func (*PlaylistList) DeepCopyInto

func (in *PlaylistList) DeepCopyInto(out *PlaylistList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PlaylistList) DeepCopyObject

func (in *PlaylistList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type Spec

type Spec struct {
	// Name of the playlist.
	Title string `json:"title"`

	// Interval sets the time between switching views in a playlist.
	Interval string `json:"interval"`

	// The ordered list of items that the playlist will iterate over.
	Items []Item `json:"items,omitempty"`
}

Spec defines model for Spec.

func (*Spec) DeepCopy

func (in *Spec) DeepCopy() *Spec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Spec.

func (*Spec) DeepCopyInto

func (in *Spec) DeepCopyInto(out *Spec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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