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      = "dashboardsnapshot.grafana.app"
	VERSION    = "v0alpha1"
	APIVERSION = GROUP + "/" + VERSION
)

Variables

View Source
var DashboardSnapshotResourceInfo = common.NewResourceInfo(GROUP, VERSION,
	"dashboardsnapshots", "dashboardsnapshot", "DashboardSnapshot",
	func() runtime.Object { return &DashboardSnapshot{} },
	func() runtime.Object { return &DashboardSnapshotList{} },
)
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 DashboardCreateCommand

type DashboardCreateCommand struct {
	metav1.TypeMeta `json:",inline"`

	// Snapshot name
	// required:false
	Name string `json:"name"`

	// The complete dashboard model.
	// required:true
	Dashboard *common.Unstructured `json:"dashboard" binding:"Required"`

	// When the snapshot should expire in seconds in seconds. Default is never to expire.
	// required:false
	// default:0
	Expires int64 `json:"expires"`

	// these are passed when storing an external snapshot ref
	// Save the snapshot on an external server rather than locally.
	// required:false
	// default: false
	External bool `json:"external"`
}

These are the values expected to be sent from an end user +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*DashboardCreateCommand) DeepCopy

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

func (*DashboardCreateCommand) DeepCopyInto

func (in *DashboardCreateCommand) DeepCopyInto(out *DashboardCreateCommand)

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

func (*DashboardCreateCommand) DeepCopyObject

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

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

type DashboardCreateResponse

type DashboardCreateResponse struct {
	metav1.TypeMeta `json:",inline"`

	// The unique key
	Key string `json:"key"`

	// A unique key that will allow delete
	DeleteKey string `json:"deleteKey"`

	// Absolute URL to show the dashboard
	URL string `json:"url"`

	// URL that will delete the response
	DeleteURL string `json:"deleteUrl"`
}

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

func (*DashboardCreateResponse) DeepCopy

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

func (*DashboardCreateResponse) DeepCopyInto

func (in *DashboardCreateResponse) DeepCopyInto(out *DashboardCreateResponse)

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

func (*DashboardCreateResponse) DeepCopyObject

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

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

type DashboardSnapshot

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

	// Snapshot summary info
	Spec SnapshotInfo `json:"spec"`
}

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

func (*DashboardSnapshot) DeepCopy

func (in *DashboardSnapshot) DeepCopy() *DashboardSnapshot

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

func (*DashboardSnapshot) DeepCopyInto

func (in *DashboardSnapshot) DeepCopyInto(out *DashboardSnapshot)

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

func (*DashboardSnapshot) DeepCopyObject

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

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

type DashboardSnapshotList

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

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

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

func (*DashboardSnapshotList) DeepCopy

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

func (*DashboardSnapshotList) DeepCopyInto

func (in *DashboardSnapshotList) DeepCopyInto(out *DashboardSnapshotList)

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

func (*DashboardSnapshotList) DeepCopyObject

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

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

type DashboardSnapshotWithDeleteKey

type DashboardSnapshotWithDeleteKey struct {
	DashboardSnapshot `json:",inline"`

	// The delete key is only returned when the item is created.  It is not returned from a get request
	DeleteKey string `json:"deleteKey,omitempty"`
}

This is returned from the POST command +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*DashboardSnapshotWithDeleteKey) DeepCopy

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

func (*DashboardSnapshotWithDeleteKey) DeepCopyInto

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

func (*DashboardSnapshotWithDeleteKey) DeepCopyObject

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

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

type FullDashboardSnapshot

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

	// Snapshot summary info
	Info SnapshotInfo `json:"info"`

	// The raw dashboard (unstructured for now)
	Dashboard common.Unstructured `json:"dashboard"`
}

This is the snapshot returned from the subresource +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*FullDashboardSnapshot) DeepCopy

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

func (*FullDashboardSnapshot) DeepCopyInto

func (in *FullDashboardSnapshot) DeepCopyInto(out *FullDashboardSnapshot)

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

func (*FullDashboardSnapshot) DeepCopyObject

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

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

type SharingOptions

type SharingOptions struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Show the options inline
	Spec SnapshotSharingOptions `json:"spec"`
}

Represents an options object that must be named for each namespace/team/user +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SharingOptions) DeepCopy

func (in *SharingOptions) DeepCopy() *SharingOptions

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

func (*SharingOptions) DeepCopyInto

func (in *SharingOptions) DeepCopyInto(out *SharingOptions)

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

func (*SharingOptions) DeepCopyObject

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

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

type SharingOptionsList

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

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

Represents a list of namespaced options +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SharingOptionsList) DeepCopy

func (in *SharingOptionsList) DeepCopy() *SharingOptionsList

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

func (*SharingOptionsList) DeepCopyInto

func (in *SharingOptionsList) DeepCopyInto(out *SharingOptionsList)

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

func (*SharingOptionsList) DeepCopyObject

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

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

type SnapshotInfo

type SnapshotInfo struct {
	Title string `json:"title,omitempty"`
	// Optionally auto-remove the snapshot at a future date
	Expires int64 `json:"expires,omitempty"`
	// When set to true, the snapshot exists in a remote server
	External bool `json:"external,omitempty"`
	// The external URL where the snapshot can be seen
	ExternalURL string `json:"externalUrl,omitempty"`
	// The URL that created the dashboard originally
	OriginalUrl string `json:"originalUrl,omitempty"`
	// Snapshot creation timestamp
	Timestamp string `json:"timestamp,omitempty"`
}

func (*SnapshotInfo) DeepCopy

func (in *SnapshotInfo) DeepCopy() *SnapshotInfo

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

func (*SnapshotInfo) DeepCopyInto

func (in *SnapshotInfo) DeepCopyInto(out *SnapshotInfo)

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

type SnapshotSharingOptions

type SnapshotSharingOptions struct {
	SnapshotsEnabled     bool   `json:"snapshotEnabled"`
	ExternalSnapshotURL  string `json:"externalSnapshotURL,omitempty"`
	ExternalSnapshotName string `json:"externalSnapshotName,omitempty"`
	ExternalEnabled      bool   `json:"externalEnabled,omitempty"`
}

Each tenant, may have different sharing options This is currently set using custom.ini, but multi-tenant support will need to be managed differently

func (*SnapshotSharingOptions) DeepCopy

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

func (*SnapshotSharingOptions) DeepCopyInto

func (in *SnapshotSharingOptions) DeepCopyInto(out *SnapshotSharingOptions)

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