datasource

package
v0.0.0-...-df1eb6b Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 167

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RowValue_Kind_name = map[int32]string{
	0: "TYPE_NULL",
	1: "TYPE_DOUBLE",
	2: "TYPE_INT64",
	3: "TYPE_BOOL",
	4: "TYPE_STRING",
	5: "TYPE_BYTES",
}
View Source
var RowValue_Kind_value = map[string]int32{
	"TYPE_NULL":   0,
	"TYPE_DOUBLE": 1,
	"TYPE_INT64":  2,
	"TYPE_BOOL":   3,
	"TYPE_STRING": 4,
	"TYPE_BYTES":  5,
}

Functions

func RegisterDatasourcePluginServer

func RegisterDatasourcePluginServer(s *grpc.Server, srv DatasourcePluginServer)

Types

type DatasourceInfo

type DatasourceInfo struct {
	Id                      int64             `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	OrgId                   int64             `protobuf:"varint,2,opt,name=orgId,proto3" json:"orgId,omitempty"`
	Name                    string            `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Type                    string            `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
	Url                     string            `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"`
	JsonData                string            `protobuf:"bytes,6,opt,name=jsonData,proto3" json:"jsonData,omitempty"`
	DecryptedSecureJsonData map[string]string `` /* 187-byte string literal not displayed */
	XXX_NoUnkeyedLiteral    struct{}          `json:"-"`
	XXX_unrecognized        []byte            `json:"-"`
	XXX_sizecache           int32             `json:"-"`
}

func (*DatasourceInfo) Descriptor

func (*DatasourceInfo) Descriptor() ([]byte, []int)

func (*DatasourceInfo) GetDecryptedSecureJsonData

func (m *DatasourceInfo) GetDecryptedSecureJsonData() map[string]string

func (*DatasourceInfo) GetId

func (m *DatasourceInfo) GetId() int64

func (*DatasourceInfo) GetJsonData

func (m *DatasourceInfo) GetJsonData() string

func (*DatasourceInfo) GetName

func (m *DatasourceInfo) GetName() string

func (*DatasourceInfo) GetOrgId

func (m *DatasourceInfo) GetOrgId() int64

func (*DatasourceInfo) GetType

func (m *DatasourceInfo) GetType() string

func (*DatasourceInfo) GetUrl

func (m *DatasourceInfo) GetUrl() string

func (*DatasourceInfo) ProtoMessage

func (*DatasourceInfo) ProtoMessage()

func (*DatasourceInfo) Reset

func (m *DatasourceInfo) Reset()

func (*DatasourceInfo) String

func (m *DatasourceInfo) String() string

func (*DatasourceInfo) XXX_DiscardUnknown

func (m *DatasourceInfo) XXX_DiscardUnknown()

func (*DatasourceInfo) XXX_Marshal

func (m *DatasourceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DatasourceInfo) XXX_Merge

func (dst *DatasourceInfo) XXX_Merge(src proto.Message)

func (*DatasourceInfo) XXX_Size

func (m *DatasourceInfo) XXX_Size() int

func (*DatasourceInfo) XXX_Unmarshal

func (m *DatasourceInfo) XXX_Unmarshal(b []byte) error

type DatasourcePlugin

type DatasourcePlugin interface {
	Query(ctx context.Context, req *DatasourceRequest) (*DatasourceResponse, error)
}

type DatasourcePluginClient

type DatasourcePluginClient interface {
	Query(ctx context.Context, in *DatasourceRequest, opts ...grpc.CallOption) (*DatasourceResponse, error)
}

DatasourcePluginClient is the client API for DatasourcePlugin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDatasourcePluginClient

func NewDatasourcePluginClient(cc *grpc.ClientConn) DatasourcePluginClient

type DatasourcePluginImpl

type DatasourcePluginImpl struct {
	plugin.NetRPCUnsupportedPlugin
	Plugin DatasourcePlugin
}

func (*DatasourcePluginImpl) GRPCClient

func (p *DatasourcePluginImpl) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*DatasourcePluginImpl) GRPCServer

func (p *DatasourcePluginImpl) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type DatasourcePluginServer

type DatasourcePluginServer interface {
	Query(context.Context, *DatasourceRequest) (*DatasourceResponse, error)
}

DatasourcePluginServer is the server API for DatasourcePlugin service.

type DatasourceRequest

type DatasourceRequest struct {
	TimeRange            *TimeRange      `protobuf:"bytes,1,opt,name=timeRange,proto3" json:"timeRange,omitempty"`
	Datasource           *DatasourceInfo `protobuf:"bytes,2,opt,name=datasource,proto3" json:"datasource,omitempty"`
	Queries              []*Query        `protobuf:"bytes,3,rep,name=queries,proto3" json:"queries,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*DatasourceRequest) Descriptor

func (*DatasourceRequest) Descriptor() ([]byte, []int)

func (*DatasourceRequest) GetDatasource

func (m *DatasourceRequest) GetDatasource() *DatasourceInfo

func (*DatasourceRequest) GetQueries

func (m *DatasourceRequest) GetQueries() []*Query

func (*DatasourceRequest) GetTimeRange

func (m *DatasourceRequest) GetTimeRange() *TimeRange

func (*DatasourceRequest) ProtoMessage

func (*DatasourceRequest) ProtoMessage()

func (*DatasourceRequest) Reset

func (m *DatasourceRequest) Reset()

func (*DatasourceRequest) String

func (m *DatasourceRequest) String() string

func (*DatasourceRequest) XXX_DiscardUnknown

func (m *DatasourceRequest) XXX_DiscardUnknown()

func (*DatasourceRequest) XXX_Marshal

func (m *DatasourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DatasourceRequest) XXX_Merge

func (dst *DatasourceRequest) XXX_Merge(src proto.Message)

func (*DatasourceRequest) XXX_Size

func (m *DatasourceRequest) XXX_Size() int

func (*DatasourceRequest) XXX_Unmarshal

func (m *DatasourceRequest) XXX_Unmarshal(b []byte) error

type DatasourceResponse

type DatasourceResponse struct {
	Results              []*QueryResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*DatasourceResponse) Descriptor

func (*DatasourceResponse) Descriptor() ([]byte, []int)

func (*DatasourceResponse) GetResults

func (m *DatasourceResponse) GetResults() []*QueryResult

func (*DatasourceResponse) ProtoMessage

func (*DatasourceResponse) ProtoMessage()

func (*DatasourceResponse) Reset

func (m *DatasourceResponse) Reset()

func (*DatasourceResponse) String

func (m *DatasourceResponse) String() string

func (*DatasourceResponse) XXX_DiscardUnknown

func (m *DatasourceResponse) XXX_DiscardUnknown()

func (*DatasourceResponse) XXX_Marshal

func (m *DatasourceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DatasourceResponse) XXX_Merge

func (dst *DatasourceResponse) XXX_Merge(src proto.Message)

func (*DatasourceResponse) XXX_Size

func (m *DatasourceResponse) XXX_Size() int

func (*DatasourceResponse) XXX_Unmarshal

func (m *DatasourceResponse) XXX_Unmarshal(b []byte) error

type GRPCClient

type GRPCClient struct {
	DatasourcePluginClient
}

func (*GRPCClient) Query

type GRPCServer

type GRPCServer struct {
	DatasourcePlugin
}

func (*GRPCServer) Query

type Point

type Point struct {
	Timestamp            int64    `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Value                float64  `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Point) Descriptor

func (*Point) Descriptor() ([]byte, []int)

func (*Point) GetTimestamp

func (m *Point) GetTimestamp() int64

func (*Point) GetValue

func (m *Point) GetValue() float64

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) Reset

func (m *Point) Reset()

func (*Point) String

func (m *Point) String() string

func (*Point) XXX_DiscardUnknown

func (m *Point) XXX_DiscardUnknown()

func (*Point) XXX_Marshal

func (m *Point) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Point) XXX_Merge

func (dst *Point) XXX_Merge(src proto.Message)

func (*Point) XXX_Size

func (m *Point) XXX_Size() int

func (*Point) XXX_Unmarshal

func (m *Point) XXX_Unmarshal(b []byte) error

type Query

type Query struct {
	RefId                string   `protobuf:"bytes,1,opt,name=refId,proto3" json:"refId,omitempty"`
	MaxDataPoints        int64    `protobuf:"varint,2,opt,name=maxDataPoints,proto3" json:"maxDataPoints,omitempty"`
	IntervalMs           int64    `protobuf:"varint,3,opt,name=intervalMs,proto3" json:"intervalMs,omitempty"`
	ModelJson            string   `protobuf:"bytes,4,opt,name=modelJson,proto3" json:"modelJson,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Query) Descriptor

func (*Query) Descriptor() ([]byte, []int)

func (*Query) GetIntervalMs

func (m *Query) GetIntervalMs() int64

func (*Query) GetMaxDataPoints

func (m *Query) GetMaxDataPoints() int64

func (*Query) GetModelJson

func (m *Query) GetModelJson() string

func (*Query) GetRefId

func (m *Query) GetRefId() string

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) String

func (m *Query) String() string

func (*Query) XXX_DiscardUnknown

func (m *Query) XXX_DiscardUnknown()

func (*Query) XXX_Marshal

func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Query) XXX_Merge

func (dst *Query) XXX_Merge(src proto.Message)

func (*Query) XXX_Size

func (m *Query) XXX_Size() int

func (*Query) XXX_Unmarshal

func (m *Query) XXX_Unmarshal(b []byte) error

type QueryResult

type QueryResult struct {
	Error                string        `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	RefId                string        `protobuf:"bytes,2,opt,name=refId,proto3" json:"refId,omitempty"`
	MetaJson             string        `protobuf:"bytes,3,opt,name=metaJson,proto3" json:"metaJson,omitempty"`
	Series               []*TimeSeries `protobuf:"bytes,4,rep,name=series,proto3" json:"series,omitempty"`
	Tables               []*Table      `protobuf:"bytes,5,rep,name=tables,proto3" json:"tables,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*QueryResult) Descriptor

func (*QueryResult) Descriptor() ([]byte, []int)

func (*QueryResult) GetError

func (m *QueryResult) GetError() string

func (*QueryResult) GetMetaJson

func (m *QueryResult) GetMetaJson() string

func (*QueryResult) GetRefId

func (m *QueryResult) GetRefId() string

func (*QueryResult) GetSeries

func (m *QueryResult) GetSeries() []*TimeSeries

func (*QueryResult) GetTables

func (m *QueryResult) GetTables() []*Table

func (*QueryResult) ProtoMessage

func (*QueryResult) ProtoMessage()

func (*QueryResult) Reset

func (m *QueryResult) Reset()

func (*QueryResult) String

func (m *QueryResult) String() string

func (*QueryResult) XXX_DiscardUnknown

func (m *QueryResult) XXX_DiscardUnknown()

func (*QueryResult) XXX_Marshal

func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryResult) XXX_Merge

func (dst *QueryResult) XXX_Merge(src proto.Message)

func (*QueryResult) XXX_Size

func (m *QueryResult) XXX_Size() int

func (*QueryResult) XXX_Unmarshal

func (m *QueryResult) XXX_Unmarshal(b []byte) error

type RowValue

type RowValue struct {
	Kind                 RowValue_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=models.RowValue_Kind" json:"kind,omitempty"`
	DoubleValue          float64       `protobuf:"fixed64,2,opt,name=doubleValue,proto3" json:"doubleValue,omitempty"`
	Int64Value           int64         `protobuf:"varint,3,opt,name=int64Value,proto3" json:"int64Value,omitempty"`
	BoolValue            bool          `protobuf:"varint,4,opt,name=boolValue,proto3" json:"boolValue,omitempty"`
	StringValue          string        `protobuf:"bytes,5,opt,name=stringValue,proto3" json:"stringValue,omitempty"`
	BytesValue           []byte        `protobuf:"bytes,6,opt,name=bytesValue,proto3" json:"bytesValue,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*RowValue) Descriptor

func (*RowValue) Descriptor() ([]byte, []int)

func (*RowValue) GetBoolValue

func (m *RowValue) GetBoolValue() bool

func (*RowValue) GetBytesValue

func (m *RowValue) GetBytesValue() []byte

func (*RowValue) GetDoubleValue

func (m *RowValue) GetDoubleValue() float64

func (*RowValue) GetInt64Value

func (m *RowValue) GetInt64Value() int64

func (*RowValue) GetKind

func (m *RowValue) GetKind() RowValue_Kind

func (*RowValue) GetStringValue

func (m *RowValue) GetStringValue() string

func (*RowValue) ProtoMessage

func (*RowValue) ProtoMessage()

func (*RowValue) Reset

func (m *RowValue) Reset()

func (*RowValue) String

func (m *RowValue) String() string

func (*RowValue) XXX_DiscardUnknown

func (m *RowValue) XXX_DiscardUnknown()

func (*RowValue) XXX_Marshal

func (m *RowValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RowValue) XXX_Merge

func (dst *RowValue) XXX_Merge(src proto.Message)

func (*RowValue) XXX_Size

func (m *RowValue) XXX_Size() int

func (*RowValue) XXX_Unmarshal

func (m *RowValue) XXX_Unmarshal(b []byte) error

type RowValue_Kind

type RowValue_Kind int32
const (
	// Field type null.
	RowValue_TYPE_NULL RowValue_Kind = 0
	// Field type double.
	RowValue_TYPE_DOUBLE RowValue_Kind = 1
	// Field type int64.
	RowValue_TYPE_INT64 RowValue_Kind = 2
	// Field type bool.
	RowValue_TYPE_BOOL RowValue_Kind = 3
	// Field type string.
	RowValue_TYPE_STRING RowValue_Kind = 4
	// Field type bytes.
	RowValue_TYPE_BYTES RowValue_Kind = 5
)

func (RowValue_Kind) EnumDescriptor

func (RowValue_Kind) EnumDescriptor() ([]byte, []int)

func (RowValue_Kind) String

func (x RowValue_Kind) String() string

type Table

type Table struct {
	Columns              []*TableColumn `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"`
	Rows                 []*TableRow    `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Table) Descriptor

func (*Table) Descriptor() ([]byte, []int)

func (*Table) GetColumns

func (m *Table) GetColumns() []*TableColumn

func (*Table) GetRows

func (m *Table) GetRows() []*TableRow

func (*Table) ProtoMessage

func (*Table) ProtoMessage()

func (*Table) Reset

func (m *Table) Reset()

func (*Table) String

func (m *Table) String() string

func (*Table) XXX_DiscardUnknown

func (m *Table) XXX_DiscardUnknown()

func (*Table) XXX_Marshal

func (m *Table) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Table) XXX_Merge

func (dst *Table) XXX_Merge(src proto.Message)

func (*Table) XXX_Size

func (m *Table) XXX_Size() int

func (*Table) XXX_Unmarshal

func (m *Table) XXX_Unmarshal(b []byte) error

type TableColumn

type TableColumn struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TableColumn) Descriptor

func (*TableColumn) Descriptor() ([]byte, []int)

func (*TableColumn) GetName

func (m *TableColumn) GetName() string

func (*TableColumn) ProtoMessage

func (*TableColumn) ProtoMessage()

func (*TableColumn) Reset

func (m *TableColumn) Reset()

func (*TableColumn) String

func (m *TableColumn) String() string

func (*TableColumn) XXX_DiscardUnknown

func (m *TableColumn) XXX_DiscardUnknown()

func (*TableColumn) XXX_Marshal

func (m *TableColumn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TableColumn) XXX_Merge

func (dst *TableColumn) XXX_Merge(src proto.Message)

func (*TableColumn) XXX_Size

func (m *TableColumn) XXX_Size() int

func (*TableColumn) XXX_Unmarshal

func (m *TableColumn) XXX_Unmarshal(b []byte) error

type TableRow

type TableRow struct {
	Values               []*RowValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*TableRow) Descriptor

func (*TableRow) Descriptor() ([]byte, []int)

func (*TableRow) GetValues

func (m *TableRow) GetValues() []*RowValue

func (*TableRow) ProtoMessage

func (*TableRow) ProtoMessage()

func (*TableRow) Reset

func (m *TableRow) Reset()

func (*TableRow) String

func (m *TableRow) String() string

func (*TableRow) XXX_DiscardUnknown

func (m *TableRow) XXX_DiscardUnknown()

func (*TableRow) XXX_Marshal

func (m *TableRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TableRow) XXX_Merge

func (dst *TableRow) XXX_Merge(src proto.Message)

func (*TableRow) XXX_Size

func (m *TableRow) XXX_Size() int

func (*TableRow) XXX_Unmarshal

func (m *TableRow) XXX_Unmarshal(b []byte) error

type TimeRange

type TimeRange struct {
	FromRaw              string   `protobuf:"bytes,1,opt,name=fromRaw,proto3" json:"fromRaw,omitempty"`
	ToRaw                string   `protobuf:"bytes,2,opt,name=toRaw,proto3" json:"toRaw,omitempty"`
	FromEpochMs          int64    `protobuf:"varint,3,opt,name=fromEpochMs,proto3" json:"fromEpochMs,omitempty"`
	ToEpochMs            int64    `protobuf:"varint,4,opt,name=toEpochMs,proto3" json:"toEpochMs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TimeRange) Descriptor

func (*TimeRange) Descriptor() ([]byte, []int)

func (*TimeRange) GetFromEpochMs

func (m *TimeRange) GetFromEpochMs() int64

func (*TimeRange) GetFromRaw

func (m *TimeRange) GetFromRaw() string

func (*TimeRange) GetToEpochMs

func (m *TimeRange) GetToEpochMs() int64

func (*TimeRange) GetToRaw

func (m *TimeRange) GetToRaw() string

func (*TimeRange) ProtoMessage

func (*TimeRange) ProtoMessage()

func (*TimeRange) Reset

func (m *TimeRange) Reset()

func (*TimeRange) String

func (m *TimeRange) String() string

func (*TimeRange) XXX_DiscardUnknown

func (m *TimeRange) XXX_DiscardUnknown()

func (*TimeRange) XXX_Marshal

func (m *TimeRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeRange) XXX_Merge

func (dst *TimeRange) XXX_Merge(src proto.Message)

func (*TimeRange) XXX_Size

func (m *TimeRange) XXX_Size() int

func (*TimeRange) XXX_Unmarshal

func (m *TimeRange) XXX_Unmarshal(b []byte) error

type TimeSeries

type TimeSeries struct {
	Name                 string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Tags                 map[string]string `` /* 149-byte string literal not displayed */
	Points               []*Point          `protobuf:"bytes,3,rep,name=points,proto3" json:"points,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*TimeSeries) Descriptor

func (*TimeSeries) Descriptor() ([]byte, []int)

func (*TimeSeries) GetName

func (m *TimeSeries) GetName() string

func (*TimeSeries) GetPoints

func (m *TimeSeries) GetPoints() []*Point

func (*TimeSeries) GetTags

func (m *TimeSeries) GetTags() map[string]string

func (*TimeSeries) ProtoMessage

func (*TimeSeries) ProtoMessage()

func (*TimeSeries) Reset

func (m *TimeSeries) Reset()

func (*TimeSeries) String

func (m *TimeSeries) String() string

func (*TimeSeries) XXX_DiscardUnknown

func (m *TimeSeries) XXX_DiscardUnknown()

func (*TimeSeries) XXX_Marshal

func (m *TimeSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeSeries) XXX_Merge

func (dst *TimeSeries) XXX_Merge(src proto.Message)

func (*TimeSeries) XXX_Size

func (m *TimeSeries) XXX_Size() int

func (*TimeSeries) XXX_Unmarshal

func (m *TimeSeries) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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