simple_json

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AnnotationQueryOKCode int = 200

AnnotationQueryOKCode is the HTTP code returned for type AnnotationQueryOK

View Source
const MetricFindQueryOKCode int = 200

MetricFindQueryOKCode is the HTTP code returned for type MetricFindQueryOK

View Source
const QueryOKCode int = 200

QueryOKCode is the HTTP code returned for type QueryOK

View Source
const TestDatasourceOKCode int = 200

TestDatasourceOKCode is the HTTP code returned for type TestDatasourceOK

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationQuery

type AnnotationQuery struct {
	Context *middleware.Context
	Handler AnnotationQueryHandler
}
AnnotationQuery swagger:route POST /annotations SimpleJSON annotationQuery

get annotations

used by dashboards to get annotations.

func NewAnnotationQuery

func NewAnnotationQuery(ctx *middleware.Context, handler AnnotationQueryHandler) *AnnotationQuery

NewAnnotationQuery creates a new http.Handler for the annotation query operation

func (*AnnotationQuery) ServeHTTP

func (o *AnnotationQuery) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type AnnotationQueryHandler

type AnnotationQueryHandler interface {
	Handle(AnnotationQueryParams) middleware.Responder
}

AnnotationQueryHandler interface for that can handle valid annotation query params

type AnnotationQueryHandlerFunc

type AnnotationQueryHandlerFunc func(AnnotationQueryParams) middleware.Responder

AnnotationQueryHandlerFunc turns a function with the right signature into a annotation query handler

func (AnnotationQueryHandlerFunc) Handle

Handle executing the request and returning a response

type AnnotationQueryOK

type AnnotationQueryOK struct {

	/*
	  In: Body
	*/
	Payload *v1.Annotations `json:"body,omitempty"`
}

AnnotationQueryOK get annotations successfully.

swagger:response annotationQueryOK

func NewAnnotationQueryOK

func NewAnnotationQueryOK() *AnnotationQueryOK

NewAnnotationQueryOK creates AnnotationQueryOK with default headers values

func (*AnnotationQueryOK) SetPayload

func (o *AnnotationQueryOK) SetPayload(payload *v1.Annotations)

SetPayload sets the payload to the annotation query o k response

func (*AnnotationQueryOK) WithPayload

func (o *AnnotationQueryOK) WithPayload(payload *v1.Annotations) *AnnotationQueryOK

WithPayload adds the payload to the annotation query o k response

func (*AnnotationQueryOK) WriteResponse

func (o *AnnotationQueryOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type AnnotationQueryParams

type AnnotationQueryParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The options to query.
	  In: body
	*/
	Options *v1.Target
}

AnnotationQueryParams contains all the bound params for the annotation query operation typically these are obtained from a http.Request

swagger:parameters AnnotationQuery

func NewAnnotationQueryParams

func NewAnnotationQueryParams() AnnotationQueryParams

NewAnnotationQueryParams creates a new AnnotationQueryParams object

There are no default values defined in the spec.

func (*AnnotationQueryParams) BindRequest

func (o *AnnotationQueryParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewAnnotationQueryParams() beforehand.

type AnnotationQueryURL

type AnnotationQueryURL struct {
	// contains filtered or unexported fields
}

AnnotationQueryURL generates an URL for the annotation query operation

func (*AnnotationQueryURL) Build

func (o *AnnotationQueryURL) Build() (*url.URL, error)

Build a url path and query string

func (*AnnotationQueryURL) BuildFull

func (o *AnnotationQueryURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*AnnotationQueryURL) Must

func (o *AnnotationQueryURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*AnnotationQueryURL) SetBasePath

func (o *AnnotationQueryURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*AnnotationQueryURL) String

func (o *AnnotationQueryURL) String() string

String returns the string representation of the path with query string

func (*AnnotationQueryURL) StringFull

func (o *AnnotationQueryURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*AnnotationQueryURL) WithBasePath

func (o *AnnotationQueryURL) WithBasePath(bp string) *AnnotationQueryURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type MetricFindQuery

type MetricFindQuery struct {
	Context *middleware.Context
	Handler MetricFindQueryHandler
}
MetricFindQuery swagger:route POST /search SimpleJSON metricFindQuery

find metric options

used by the find metric options on the query tab in panels.

func NewMetricFindQuery

func NewMetricFindQuery(ctx *middleware.Context, handler MetricFindQueryHandler) *MetricFindQuery

NewMetricFindQuery creates a new http.Handler for the metric find query operation

func (*MetricFindQuery) ServeHTTP

func (o *MetricFindQuery) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type MetricFindQueryHandler

type MetricFindQueryHandler interface {
	Handle(MetricFindQueryParams) middleware.Responder
}

MetricFindQueryHandler interface for that can handle valid metric find query params

type MetricFindQueryHandlerFunc

type MetricFindQueryHandlerFunc func(MetricFindQueryParams) middleware.Responder

MetricFindQueryHandlerFunc turns a function with the right signature into a metric find query handler

func (MetricFindQueryHandlerFunc) Handle

Handle executing the request and returning a response

type MetricFindQueryOK

type MetricFindQueryOK struct {

	/*
	  In: Body
	*/
	Payload interface{} `json:"body,omitempty"`
}

MetricFindQueryOK find metric options successfully.

swagger:response metricFindQueryOK

func NewMetricFindQueryOK

func NewMetricFindQueryOK() *MetricFindQueryOK

NewMetricFindQueryOK creates MetricFindQueryOK with default headers values

func (*MetricFindQueryOK) SetPayload

func (o *MetricFindQueryOK) SetPayload(payload interface{})

SetPayload sets the payload to the metric find query o k response

func (*MetricFindQueryOK) WithPayload

func (o *MetricFindQueryOK) WithPayload(payload interface{}) *MetricFindQueryOK

WithPayload adds the payload to the metric find query o k response

func (*MetricFindQueryOK) WriteResponse

func (o *MetricFindQueryOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type MetricFindQueryParams

type MetricFindQueryParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The options to query.
	  In: body
	*/
	Options *v1.Target
}

MetricFindQueryParams contains all the bound params for the metric find query operation typically these are obtained from a http.Request

swagger:parameters MetricFindQuery

func NewMetricFindQueryParams

func NewMetricFindQueryParams() MetricFindQueryParams

NewMetricFindQueryParams creates a new MetricFindQueryParams object

There are no default values defined in the spec.

func (*MetricFindQueryParams) BindRequest

func (o *MetricFindQueryParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewMetricFindQueryParams() beforehand.

type MetricFindQueryURL

type MetricFindQueryURL struct {
	// contains filtered or unexported fields
}

MetricFindQueryURL generates an URL for the metric find query operation

func (*MetricFindQueryURL) Build

func (o *MetricFindQueryURL) Build() (*url.URL, error)

Build a url path and query string

func (*MetricFindQueryURL) BuildFull

func (o *MetricFindQueryURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*MetricFindQueryURL) Must

func (o *MetricFindQueryURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*MetricFindQueryURL) SetBasePath

func (o *MetricFindQueryURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*MetricFindQueryURL) String

func (o *MetricFindQueryURL) String() string

String returns the string representation of the path with query string

func (*MetricFindQueryURL) StringFull

func (o *MetricFindQueryURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*MetricFindQueryURL) WithBasePath

func (o *MetricFindQueryURL) WithBasePath(bp string) *MetricFindQueryURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type Query

type Query struct {
	Context *middleware.Context
	Handler QueryHandler
}
Query swagger:route POST /query SimpleJSON query

query data

used by panels to get data

func NewQuery

func NewQuery(ctx *middleware.Context, handler QueryHandler) *Query

NewQuery creates a new http.Handler for the query operation

func (*Query) ServeHTTP

func (o *Query) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type QueryHandler

type QueryHandler interface {
	Handle(QueryParams) middleware.Responder
}

QueryHandler interface for that can handle valid query params

type QueryHandlerFunc

type QueryHandlerFunc func(QueryParams) middleware.Responder

QueryHandlerFunc turns a function with the right signature into a query handler

func (QueryHandlerFunc) Handle

Handle executing the request and returning a response

type QueryOK

type QueryOK struct {

	/*
	  In: Body
	*/
	Payload v1.Timeseries `json:"body,omitempty"`
}

QueryOK query data successfully.

swagger:response queryOK

func NewQueryOK

func NewQueryOK() *QueryOK

NewQueryOK creates QueryOK with default headers values

func (*QueryOK) SetPayload

func (o *QueryOK) SetPayload(payload v1.Timeseries)

SetPayload sets the payload to the query o k response

func (*QueryOK) WithPayload

func (o *QueryOK) WithPayload(payload v1.Timeseries) *QueryOK

WithPayload adds the payload to the query o k response

func (*QueryOK) WriteResponse

func (o *QueryOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type QueryParams

type QueryParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The options to query.
	  In: body
	*/
	Options *v1.Query
}

QueryParams contains all the bound params for the query operation typically these are obtained from a http.Request

swagger:parameters Query

func NewQueryParams

func NewQueryParams() QueryParams

NewQueryParams creates a new QueryParams object

There are no default values defined in the spec.

func (*QueryParams) BindRequest

func (o *QueryParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewQueryParams() beforehand.

type QueryURL

type QueryURL struct {
	// contains filtered or unexported fields
}

QueryURL generates an URL for the query operation

func (*QueryURL) Build

func (o *QueryURL) Build() (*url.URL, error)

Build a url path and query string

func (*QueryURL) BuildFull

func (o *QueryURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*QueryURL) Must

func (o *QueryURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*QueryURL) SetBasePath

func (o *QueryURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*QueryURL) String

func (o *QueryURL) String() string

String returns the string representation of the path with query string

func (*QueryURL) StringFull

func (o *QueryURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*QueryURL) WithBasePath

func (o *QueryURL) WithBasePath(bp string) *QueryURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type TestDatasource

type TestDatasource struct {
	Context *middleware.Context
	Handler TestDatasourceHandler
}
TestDatasource swagger:route GET / SimpleJSON testDatasource

test connection

should return 200 ok. Used for "Test connection" on the datasource config page.

func NewTestDatasource

func NewTestDatasource(ctx *middleware.Context, handler TestDatasourceHandler) *TestDatasource

NewTestDatasource creates a new http.Handler for the test datasource operation

func (*TestDatasource) ServeHTTP

func (o *TestDatasource) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type TestDatasourceHandler

type TestDatasourceHandler interface {
	Handle(TestDatasourceParams) middleware.Responder
}

TestDatasourceHandler interface for that can handle valid test datasource params

type TestDatasourceHandlerFunc

type TestDatasourceHandlerFunc func(TestDatasourceParams) middleware.Responder

TestDatasourceHandlerFunc turns a function with the right signature into a test datasource handler

func (TestDatasourceHandlerFunc) Handle

Handle executing the request and returning a response

type TestDatasourceOK

type TestDatasourceOK struct {
}

TestDatasourceOK connection successfully.

swagger:response testDatasourceOK

func NewTestDatasourceOK

func NewTestDatasourceOK() *TestDatasourceOK

NewTestDatasourceOK creates TestDatasourceOK with default headers values

func (*TestDatasourceOK) WriteResponse

func (o *TestDatasourceOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TestDatasourceParams

type TestDatasourceParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

TestDatasourceParams contains all the bound params for the test datasource operation typically these are obtained from a http.Request

swagger:parameters TestDatasource

func NewTestDatasourceParams

func NewTestDatasourceParams() TestDatasourceParams

NewTestDatasourceParams creates a new TestDatasourceParams object

There are no default values defined in the spec.

func (*TestDatasourceParams) BindRequest

func (o *TestDatasourceParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewTestDatasourceParams() beforehand.

type TestDatasourceURL

type TestDatasourceURL struct {
	// contains filtered or unexported fields
}

TestDatasourceURL generates an URL for the test datasource operation

func (*TestDatasourceURL) Build

func (o *TestDatasourceURL) Build() (*url.URL, error)

Build a url path and query string

func (*TestDatasourceURL) BuildFull

func (o *TestDatasourceURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*TestDatasourceURL) Must

func (o *TestDatasourceURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*TestDatasourceURL) SetBasePath

func (o *TestDatasourceURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*TestDatasourceURL) String

func (o *TestDatasourceURL) String() string

String returns the string representation of the path with query string

func (*TestDatasourceURL) StringFull

func (o *TestDatasourceURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*TestDatasourceURL) WithBasePath

func (o *TestDatasourceURL) WithBasePath(bp string) *TestDatasourceURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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