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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GROUP      = "query.grafana.app"
	VERSION    = "v0alpha1"
	APIVERSION = GROUP + "/" + VERSION
)

Variables

View Source
var DataSourceApiServerResourceInfo = common.NewResourceInfo(GROUP, VERSION,
	"datasourceapiservers", "datasourceapiserver", "DataSourceApiServer",
	func() runtime.Object { return &DataSourceApiServer{} },
	func() runtime.Object { return &DataSourceApiServerList{} },
)
View Source
var QueryTypeDefinitionResourceInfo = common.NewResourceInfo(GROUP, VERSION,
	"querytypes", "querytype", "QueryTypeDefinition",
	func() runtime.Object { return &QueryTypeDefinition{} },
	func() runtime.Object { return &QueryTypeDefinitionList{} },
)
View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: GROUP, Version: VERSION}
)

Functions

func GetResponseCode

func GetResponseCode(rsp *backend.QueryDataResponse) int

If errors exist, return multi-status

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 DataSourceApiServer

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

	// The display name
	Title string `json:"title"`

	// Describe the plugin
	Description string `json:"description,omitempty"`

	// The group + preferred version
	GroupVersion string `json:"groupVersion"`

	// Possible alternative plugin IDs
	AliasIDs []string `json:"aliasIDs,omitempty"`
}

The data source resource is a reflection of the individual datasource instances that are exposed in the groups: {datasource}.datasource.grafana.app The status is updated periodically. The name is the plugin id

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

func (*DataSourceApiServer) DeepCopy

func (in *DataSourceApiServer) DeepCopy() *DataSourceApiServer

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

func (*DataSourceApiServer) DeepCopyInto

func (in *DataSourceApiServer) DeepCopyInto(out *DataSourceApiServer)

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

func (*DataSourceApiServer) DeepCopyObject

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

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

type DataSourceApiServerList

type DataSourceApiServerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

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

List of datasource plugins +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*DataSourceApiServerList) DeepCopy

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

func (*DataSourceApiServerList) DeepCopyInto

func (in *DataSourceApiServerList) DeepCopyInto(out *DataSourceApiServerList)

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

func (*DataSourceApiServerList) DeepCopyObject

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

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

type DataSourceApiServerRegistry

type DataSourceApiServerRegistry interface {
	// Get the group and preferred version for a plugin
	GetDatasourceGroupVersion(pluginId string) (schema.GroupVersion, error)

	// Get the list of available datasource api servers
	// The values will be managed though API discovery/reconciliation
	GetDatasourceApiServers(ctx context.Context) (*DataSourceApiServerList, error)
}

type QueryDataRequest

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

	// The time range used when not included on each query
	data.QueryDataRequest `json:",inline"`
}

Generic query request with shared time across all values Copied from: https://github.com/grafana/grafana/blob/main/pkg/api/dtos/models.go#L62 +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*QueryDataRequest) DeepCopy

func (in *QueryDataRequest) DeepCopy() *QueryDataRequest

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

func (*QueryDataRequest) DeepCopyInto

func (in *QueryDataRequest) DeepCopyInto(out *QueryDataRequest)

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

func (*QueryDataRequest) DeepCopyObject

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

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

type QueryDataResponse

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

	// Backend wrapper (external dependency)
	backend.QueryDataResponse `json:",inline"`
}

Wraps backend.QueryDataResponse, however it includes TypeMeta and implements runtime.Object +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*QueryDataResponse) DeepCopy

func (in *QueryDataResponse) DeepCopy() *QueryDataResponse

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

func (*QueryDataResponse) DeepCopyInto

func (in *QueryDataResponse) DeepCopyInto(out *QueryDataResponse)

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

func (*QueryDataResponse) DeepCopyObject

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

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

type QueryTypeDefinition

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

	Spec data.QueryTypeDefinitionSpec `json:"spec,omitempty"`
}

Defines a query behavior in a datasource. This is a similar model to a CRD where the payload describes a valid query +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*QueryTypeDefinition) DeepCopy

func (in *QueryTypeDefinition) DeepCopy() *QueryTypeDefinition

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

func (*QueryTypeDefinition) DeepCopyInto

func (in *QueryTypeDefinition) DeepCopyInto(out *QueryTypeDefinition)

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

func (*QueryTypeDefinition) DeepCopyObject

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

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

type QueryTypeDefinitionList

type QueryTypeDefinitionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

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

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

func (*QueryTypeDefinitionList) DeepCopy

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

func (*QueryTypeDefinitionList) DeepCopyInto

func (in *QueryTypeDefinitionList) DeepCopyInto(out *QueryTypeDefinitionList)

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

func (*QueryTypeDefinitionList) DeepCopyObject

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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