Update Database to be DB
parent
113fa01323
commit
2b17378e76
|
@ -17,7 +17,7 @@ func (h *InfluxProxy) Proxy(ctx context.Context, params op.PostSourcesIDProxyPar
|
|||
// TODO: Add support for multiple TimeSeries with lookup based on params.ID
|
||||
query := mrfusion.Query{
|
||||
Command: *params.Query.Query,
|
||||
Database: params.Query.Database,
|
||||
DB: params.Query.DB,
|
||||
RP: params.Query.Rp,
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ func NewClient(host string) (*Client, error) {
|
|||
// include both the database and retention policy. In-flight requests can be
|
||||
// cancelled using the provided context.
|
||||
func (c *Client) Query(ctx context.Context, query mrfusion.Query) (mrfusion.Response, error) {
|
||||
q := ixClient.NewQuery(query.Command, query.Database, query.RP)
|
||||
q := ixClient.NewQuery(query.Command, query.DB, query.RP)
|
||||
resps := make(chan (response))
|
||||
go func() {
|
||||
resp, err := c.ix.Query(q)
|
||||
|
|
|
@ -59,7 +59,7 @@ func (m *Handler) SourcesID(ctx context.Context, params op.GetSourcesIDParams) m
|
|||
func (m *Handler) Proxy(ctx context.Context, params op.PostSourcesIDProxyParams) middleware.Responder {
|
||||
query := mrfusion.Query{
|
||||
Command: *params.Query.Query,
|
||||
Database: params.Query.Database,
|
||||
DB: params.Query.DB,
|
||||
RP: params.Query.Rp,
|
||||
}
|
||||
response, err := m.TimeSeries.Query(ctx, mrfusion.Query(query))
|
||||
|
|
|
@ -19,9 +19,9 @@ swagger:model Proxy
|
|||
*/
|
||||
type Proxy struct {
|
||||
|
||||
/* database
|
||||
/* db
|
||||
*/
|
||||
Database string `json:"database,omitempty"`
|
||||
Db string `json:"db,omitempty"`
|
||||
|
||||
/* format
|
||||
*/
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -788,7 +788,7 @@ definitions:
|
|||
properties:
|
||||
query:
|
||||
type: string
|
||||
database:
|
||||
db:
|
||||
type: string
|
||||
rp:
|
||||
type: string
|
||||
|
|
|
@ -5,7 +5,7 @@ import "golang.org/x/net/context"
|
|||
// Query retrieves a Response from a TimeSeries.
|
||||
type Query struct {
|
||||
Command string // Command is the query itself
|
||||
Database string // Database is optional and if empty will not be used.
|
||||
DB string // DB is optional and if empty will not be used.
|
||||
RP string // RP is a retention policy and optional; if empty will not be used.
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue