mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 04:52:10 +08:00
348 lines
14 KiB
Go
348 lines
14 KiB
Go
//go:build !ignore_autogenerated
|
|
// +build !ignore_autogenerated
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
// Code generated by openapi-gen. DO NOT EDIT.
|
|
|
|
package v0alpha1
|
|
|
|
import (
|
|
common "k8s.io/kube-openapi/pkg/common"
|
|
spec "k8s.io/kube-openapi/pkg/validation/spec"
|
|
)
|
|
|
|
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
|
|
return map[string]common.OpenAPIDefinition{
|
|
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceApiServer": schema_pkg_apis_query_v0alpha1_DataSourceApiServer(ref),
|
|
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceApiServerList": schema_pkg_apis_query_v0alpha1_DataSourceApiServerList(ref),
|
|
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.QueryDataRequest": schema_pkg_apis_query_v0alpha1_QueryDataRequest(ref),
|
|
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.QueryDataResponse": schema_pkg_apis_query_v0alpha1_QueryDataResponse(ref),
|
|
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.QueryTypeDefinition": schema_pkg_apis_query_v0alpha1_QueryTypeDefinition(ref),
|
|
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.QueryTypeDefinitionList": schema_pkg_apis_query_v0alpha1_QueryTypeDefinitionList(ref),
|
|
}
|
|
}
|
|
|
|
func schema_pkg_apis_query_v0alpha1_DataSourceApiServer(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
|
return common.OpenAPIDefinition{
|
|
Schema: spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "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",
|
|
Type: []string{"object"},
|
|
Properties: map[string]spec.Schema{
|
|
"kind": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"apiVersion": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"metadata": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Default: map[string]interface{}{},
|
|
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
|
|
},
|
|
},
|
|
"title": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "The display name",
|
|
Default: "",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"description": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Describe the plugin",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"groupVersion": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "The group + preferred version",
|
|
Default: "",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"aliasIDs": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Possible alternative plugin IDs",
|
|
Type: []string{"array"},
|
|
Items: &spec.SchemaOrArray{
|
|
Schema: &spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Default: "",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
Required: []string{"title", "groupVersion"},
|
|
},
|
|
},
|
|
Dependencies: []string{
|
|
"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
|
}
|
|
}
|
|
|
|
func schema_pkg_apis_query_v0alpha1_DataSourceApiServerList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
|
return common.OpenAPIDefinition{
|
|
Schema: spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "List of datasource plugins",
|
|
Type: []string{"object"},
|
|
Properties: map[string]spec.Schema{
|
|
"kind": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"apiVersion": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"metadata": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Default: map[string]interface{}{},
|
|
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
|
|
},
|
|
},
|
|
"items": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Type: []string{"array"},
|
|
Items: &spec.SchemaOrArray{
|
|
Schema: &spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Default: map[string]interface{}{},
|
|
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceApiServer"),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
Required: []string{"items"},
|
|
},
|
|
},
|
|
Dependencies: []string{
|
|
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceApiServer", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
|
}
|
|
}
|
|
|
|
func schema_pkg_apis_query_v0alpha1_QueryDataRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
|
return common.OpenAPIDefinition{
|
|
Schema: spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Generic query request with shared time across all values Copied from: https://github.com/grafana/grafana/blob/main/pkg/api/dtos/models.go#L62",
|
|
Type: []string{"object"},
|
|
Properties: map[string]spec.Schema{
|
|
"kind": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"apiVersion": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"from": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "From is the start time of the query.",
|
|
Default: "",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"to": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "To is the end time of the query.",
|
|
Default: "",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"queries": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Datasource queries",
|
|
Type: []string{"array"},
|
|
Items: &spec.SchemaOrArray{
|
|
Schema: &spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Ref: ref("github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1.DataQuery"),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"debug": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Optionally include debug information in the response",
|
|
Type: []string{"boolean"},
|
|
Format: "",
|
|
},
|
|
},
|
|
},
|
|
Required: []string{"from", "to", "queries"},
|
|
},
|
|
},
|
|
Dependencies: []string{
|
|
"github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1.DataQuery"},
|
|
}
|
|
}
|
|
|
|
func schema_pkg_apis_query_v0alpha1_QueryDataResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
|
return common.OpenAPIDefinition{
|
|
Schema: spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Wraps backend.QueryDataResponse, however it includes TypeMeta and implements runtime.Object",
|
|
Type: []string{"object"},
|
|
Properties: map[string]spec.Schema{
|
|
"kind": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"apiVersion": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"results": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Responses is a map of RefIDs (Unique Query ID) to *DataResponse.",
|
|
Type: []string{"object"},
|
|
AdditionalProperties: &spec.SchemaOrBool{
|
|
Allows: true,
|
|
Schema: &spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Default: map[string]interface{}{},
|
|
Ref: ref("github.com/grafana/grafana-plugin-sdk-go/backend.DataResponse"),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
Required: []string{"results"},
|
|
},
|
|
},
|
|
Dependencies: []string{
|
|
"github.com/grafana/grafana-plugin-sdk-go/backend.DataResponse"},
|
|
}
|
|
}
|
|
|
|
func schema_pkg_apis_query_v0alpha1_QueryTypeDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
|
return common.OpenAPIDefinition{
|
|
Schema: spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Defines a query behavior in a datasource. This is a similar model to a CRD where the payload describes a valid query",
|
|
Type: []string{"object"},
|
|
Properties: map[string]spec.Schema{
|
|
"kind": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"apiVersion": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"metadata": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Default: map[string]interface{}{},
|
|
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
|
|
},
|
|
},
|
|
"spec": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Default: map[string]interface{}{},
|
|
Ref: ref("github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1.QueryTypeDefinitionSpec"),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
Dependencies: []string{
|
|
"github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1.QueryTypeDefinitionSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
|
}
|
|
}
|
|
|
|
func schema_pkg_apis_query_v0alpha1_QueryTypeDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
|
return common.OpenAPIDefinition{
|
|
Schema: spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Type: []string{"object"},
|
|
Properties: map[string]spec.Schema{
|
|
"kind": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"apiVersion": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
|
Type: []string{"string"},
|
|
Format: "",
|
|
},
|
|
},
|
|
"metadata": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Default: map[string]interface{}{},
|
|
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
|
|
},
|
|
},
|
|
"items": {
|
|
SchemaProps: spec.SchemaProps{
|
|
Type: []string{"array"},
|
|
Items: &spec.SchemaOrArray{
|
|
Schema: &spec.Schema{
|
|
SchemaProps: spec.SchemaProps{
|
|
Default: map[string]interface{}{},
|
|
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1.QueryTypeDefinition"),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
Required: []string{"items"},
|
|
},
|
|
},
|
|
Dependencies: []string{
|
|
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.QueryTypeDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
|
}
|
|
}
|