tsdb_plugin.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: tsdb_plugin.proto
  3. /*
  4. Package proto is a generated protocol buffer package.
  5. It is generated from these files:
  6. tsdb_plugin.proto
  7. It has these top-level messages:
  8. TsdbQuery
  9. Query
  10. TimeRange
  11. Response
  12. QueryResult
  13. DatasourceInfo
  14. TimeSeries
  15. Point
  16. */
  17. package proto
  18. import proto1 "github.com/golang/protobuf/proto"
  19. import fmt "fmt"
  20. import math "math"
  21. import (
  22. context "golang.org/x/net/context"
  23. grpc "google.golang.org/grpc"
  24. )
  25. // Reference imports to suppress errors if they are not otherwise used.
  26. var _ = proto1.Marshal
  27. var _ = fmt.Errorf
  28. var _ = math.Inf
  29. // This is a compile-time assertion to ensure that this generated file
  30. // is compatible with the proto package it is being compiled against.
  31. // A compilation error at this line likely means your copy of the
  32. // proto package needs to be updated.
  33. const _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package
  34. type TsdbQuery struct {
  35. TimeRange *TimeRange `protobuf:"bytes,1,opt,name=timeRange" json:"timeRange,omitempty"`
  36. Datasource *DatasourceInfo `protobuf:"bytes,2,opt,name=datasource" json:"datasource,omitempty"`
  37. Queries []*Query `protobuf:"bytes,3,rep,name=queries" json:"queries,omitempty"`
  38. }
  39. func (m *TsdbQuery) Reset() { *m = TsdbQuery{} }
  40. func (m *TsdbQuery) String() string { return proto1.CompactTextString(m) }
  41. func (*TsdbQuery) ProtoMessage() {}
  42. func (*TsdbQuery) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  43. func (m *TsdbQuery) GetTimeRange() *TimeRange {
  44. if m != nil {
  45. return m.TimeRange
  46. }
  47. return nil
  48. }
  49. func (m *TsdbQuery) GetDatasource() *DatasourceInfo {
  50. if m != nil {
  51. return m.Datasource
  52. }
  53. return nil
  54. }
  55. func (m *TsdbQuery) GetQueries() []*Query {
  56. if m != nil {
  57. return m.Queries
  58. }
  59. return nil
  60. }
  61. type Query struct {
  62. RefId string `protobuf:"bytes,1,opt,name=refId" json:"refId,omitempty"`
  63. MaxDataPoints int64 `protobuf:"varint,2,opt,name=maxDataPoints" json:"maxDataPoints,omitempty"`
  64. IntervalMs int64 `protobuf:"varint,3,opt,name=intervalMs" json:"intervalMs,omitempty"`
  65. ModelJson string `protobuf:"bytes,4,opt,name=modelJson" json:"modelJson,omitempty"`
  66. }
  67. func (m *Query) Reset() { *m = Query{} }
  68. func (m *Query) String() string { return proto1.CompactTextString(m) }
  69. func (*Query) ProtoMessage() {}
  70. func (*Query) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  71. func (m *Query) GetRefId() string {
  72. if m != nil {
  73. return m.RefId
  74. }
  75. return ""
  76. }
  77. func (m *Query) GetMaxDataPoints() int64 {
  78. if m != nil {
  79. return m.MaxDataPoints
  80. }
  81. return 0
  82. }
  83. func (m *Query) GetIntervalMs() int64 {
  84. if m != nil {
  85. return m.IntervalMs
  86. }
  87. return 0
  88. }
  89. func (m *Query) GetModelJson() string {
  90. if m != nil {
  91. return m.ModelJson
  92. }
  93. return ""
  94. }
  95. type TimeRange struct {
  96. FromRaw string `protobuf:"bytes,1,opt,name=fromRaw" json:"fromRaw,omitempty"`
  97. ToRaw string `protobuf:"bytes,2,opt,name=toRaw" json:"toRaw,omitempty"`
  98. FromEpochMs int64 `protobuf:"varint,3,opt,name=fromEpochMs" json:"fromEpochMs,omitempty"`
  99. ToEpochMs int64 `protobuf:"varint,4,opt,name=toEpochMs" json:"toEpochMs,omitempty"`
  100. }
  101. func (m *TimeRange) Reset() { *m = TimeRange{} }
  102. func (m *TimeRange) String() string { return proto1.CompactTextString(m) }
  103. func (*TimeRange) ProtoMessage() {}
  104. func (*TimeRange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  105. func (m *TimeRange) GetFromRaw() string {
  106. if m != nil {
  107. return m.FromRaw
  108. }
  109. return ""
  110. }
  111. func (m *TimeRange) GetToRaw() string {
  112. if m != nil {
  113. return m.ToRaw
  114. }
  115. return ""
  116. }
  117. func (m *TimeRange) GetFromEpochMs() int64 {
  118. if m != nil {
  119. return m.FromEpochMs
  120. }
  121. return 0
  122. }
  123. func (m *TimeRange) GetToEpochMs() int64 {
  124. if m != nil {
  125. return m.ToEpochMs
  126. }
  127. return 0
  128. }
  129. type Response struct {
  130. Results []*QueryResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
  131. }
  132. func (m *Response) Reset() { *m = Response{} }
  133. func (m *Response) String() string { return proto1.CompactTextString(m) }
  134. func (*Response) ProtoMessage() {}
  135. func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  136. func (m *Response) GetResults() []*QueryResult {
  137. if m != nil {
  138. return m.Results
  139. }
  140. return nil
  141. }
  142. type QueryResult struct {
  143. Error string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
  144. RefId string `protobuf:"bytes,2,opt,name=refId" json:"refId,omitempty"`
  145. MetaJson string `protobuf:"bytes,3,opt,name=metaJson" json:"metaJson,omitempty"`
  146. Series []*TimeSeries `protobuf:"bytes,4,rep,name=series" json:"series,omitempty"`
  147. }
  148. func (m *QueryResult) Reset() { *m = QueryResult{} }
  149. func (m *QueryResult) String() string { return proto1.CompactTextString(m) }
  150. func (*QueryResult) ProtoMessage() {}
  151. func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  152. func (m *QueryResult) GetError() string {
  153. if m != nil {
  154. return m.Error
  155. }
  156. return ""
  157. }
  158. func (m *QueryResult) GetRefId() string {
  159. if m != nil {
  160. return m.RefId
  161. }
  162. return ""
  163. }
  164. func (m *QueryResult) GetMetaJson() string {
  165. if m != nil {
  166. return m.MetaJson
  167. }
  168. return ""
  169. }
  170. func (m *QueryResult) GetSeries() []*TimeSeries {
  171. if m != nil {
  172. return m.Series
  173. }
  174. return nil
  175. }
  176. type DatasourceInfo struct {
  177. Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
  178. OrgId int64 `protobuf:"varint,2,opt,name=orgId" json:"orgId,omitempty"`
  179. Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
  180. Type string `protobuf:"bytes,4,opt,name=type" json:"type,omitempty"`
  181. Url string `protobuf:"bytes,5,opt,name=url" json:"url,omitempty"`
  182. JsonData string `protobuf:"bytes,6,opt,name=jsonData" json:"jsonData,omitempty"`
  183. SecureJsonData string `protobuf:"bytes,7,opt,name=secureJsonData" json:"secureJsonData,omitempty"`
  184. }
  185. func (m *DatasourceInfo) Reset() { *m = DatasourceInfo{} }
  186. func (m *DatasourceInfo) String() string { return proto1.CompactTextString(m) }
  187. func (*DatasourceInfo) ProtoMessage() {}
  188. func (*DatasourceInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
  189. func (m *DatasourceInfo) GetId() int64 {
  190. if m != nil {
  191. return m.Id
  192. }
  193. return 0
  194. }
  195. func (m *DatasourceInfo) GetOrgId() int64 {
  196. if m != nil {
  197. return m.OrgId
  198. }
  199. return 0
  200. }
  201. func (m *DatasourceInfo) GetName() string {
  202. if m != nil {
  203. return m.Name
  204. }
  205. return ""
  206. }
  207. func (m *DatasourceInfo) GetType() string {
  208. if m != nil {
  209. return m.Type
  210. }
  211. return ""
  212. }
  213. func (m *DatasourceInfo) GetUrl() string {
  214. if m != nil {
  215. return m.Url
  216. }
  217. return ""
  218. }
  219. func (m *DatasourceInfo) GetJsonData() string {
  220. if m != nil {
  221. return m.JsonData
  222. }
  223. return ""
  224. }
  225. func (m *DatasourceInfo) GetSecureJsonData() string {
  226. if m != nil {
  227. return m.SecureJsonData
  228. }
  229. return ""
  230. }
  231. type TimeSeries struct {
  232. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  233. Tags map[string]string `protobuf:"bytes,2,rep,name=tags" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  234. Points []*Point `protobuf:"bytes,3,rep,name=points" json:"points,omitempty"`
  235. }
  236. func (m *TimeSeries) Reset() { *m = TimeSeries{} }
  237. func (m *TimeSeries) String() string { return proto1.CompactTextString(m) }
  238. func (*TimeSeries) ProtoMessage() {}
  239. func (*TimeSeries) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
  240. func (m *TimeSeries) GetName() string {
  241. if m != nil {
  242. return m.Name
  243. }
  244. return ""
  245. }
  246. func (m *TimeSeries) GetTags() map[string]string {
  247. if m != nil {
  248. return m.Tags
  249. }
  250. return nil
  251. }
  252. func (m *TimeSeries) GetPoints() []*Point {
  253. if m != nil {
  254. return m.Points
  255. }
  256. return nil
  257. }
  258. type Point struct {
  259. Timestamp int64 `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"`
  260. Value float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"`
  261. }
  262. func (m *Point) Reset() { *m = Point{} }
  263. func (m *Point) String() string { return proto1.CompactTextString(m) }
  264. func (*Point) ProtoMessage() {}
  265. func (*Point) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
  266. func (m *Point) GetTimestamp() int64 {
  267. if m != nil {
  268. return m.Timestamp
  269. }
  270. return 0
  271. }
  272. func (m *Point) GetValue() float64 {
  273. if m != nil {
  274. return m.Value
  275. }
  276. return 0
  277. }
  278. func init() {
  279. proto1.RegisterType((*TsdbQuery)(nil), "plugins.TsdbQuery")
  280. proto1.RegisterType((*Query)(nil), "plugins.Query")
  281. proto1.RegisterType((*TimeRange)(nil), "plugins.TimeRange")
  282. proto1.RegisterType((*Response)(nil), "plugins.Response")
  283. proto1.RegisterType((*QueryResult)(nil), "plugins.QueryResult")
  284. proto1.RegisterType((*DatasourceInfo)(nil), "plugins.DatasourceInfo")
  285. proto1.RegisterType((*TimeSeries)(nil), "plugins.TimeSeries")
  286. proto1.RegisterType((*Point)(nil), "plugins.Point")
  287. }
  288. // Reference imports to suppress errors if they are not otherwise used.
  289. var _ context.Context
  290. var _ grpc.ClientConn
  291. // This is a compile-time assertion to ensure that this generated file
  292. // is compatible with the grpc package it is being compiled against.
  293. const _ = grpc.SupportPackageIsVersion4
  294. // Client API for TsdbPlugin service
  295. type TsdbPluginClient interface {
  296. Query(ctx context.Context, in *TsdbQuery, opts ...grpc.CallOption) (*Response, error)
  297. }
  298. type tsdbPluginClient struct {
  299. cc *grpc.ClientConn
  300. }
  301. func NewTsdbPluginClient(cc *grpc.ClientConn) TsdbPluginClient {
  302. return &tsdbPluginClient{cc}
  303. }
  304. func (c *tsdbPluginClient) Query(ctx context.Context, in *TsdbQuery, opts ...grpc.CallOption) (*Response, error) {
  305. out := new(Response)
  306. err := grpc.Invoke(ctx, "/plugins.TsdbPlugin/Query", in, out, c.cc, opts...)
  307. if err != nil {
  308. return nil, err
  309. }
  310. return out, nil
  311. }
  312. // Server API for TsdbPlugin service
  313. type TsdbPluginServer interface {
  314. Query(context.Context, *TsdbQuery) (*Response, error)
  315. }
  316. func RegisterTsdbPluginServer(s *grpc.Server, srv TsdbPluginServer) {
  317. s.RegisterService(&_TsdbPlugin_serviceDesc, srv)
  318. }
  319. func _TsdbPlugin_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  320. in := new(TsdbQuery)
  321. if err := dec(in); err != nil {
  322. return nil, err
  323. }
  324. if interceptor == nil {
  325. return srv.(TsdbPluginServer).Query(ctx, in)
  326. }
  327. info := &grpc.UnaryServerInfo{
  328. Server: srv,
  329. FullMethod: "/plugins.TsdbPlugin/Query",
  330. }
  331. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  332. return srv.(TsdbPluginServer).Query(ctx, req.(*TsdbQuery))
  333. }
  334. return interceptor(ctx, in, info, handler)
  335. }
  336. var _TsdbPlugin_serviceDesc = grpc.ServiceDesc{
  337. ServiceName: "plugins.TsdbPlugin",
  338. HandlerType: (*TsdbPluginServer)(nil),
  339. Methods: []grpc.MethodDesc{
  340. {
  341. MethodName: "Query",
  342. Handler: _TsdbPlugin_Query_Handler,
  343. },
  344. },
  345. Streams: []grpc.StreamDesc{},
  346. Metadata: "tsdb_plugin.proto",
  347. }
  348. func init() { proto1.RegisterFile("tsdb_plugin.proto", fileDescriptor0) }
  349. var fileDescriptor0 = []byte{
  350. // 566 bytes of a gzipped FileDescriptorProto
  351. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0x51, 0x8b, 0xd3, 0x4c,
  352. 0x14, 0x25, 0x49, 0xdb, 0x6c, 0x6e, 0xf9, 0xca, 0xb7, 0xe3, 0x82, 0xa1, 0xa8, 0x94, 0x20, 0x4b,
  353. 0x41, 0x08, 0x5a, 0x1f, 0x56, 0x56, 0x9f, 0xc4, 0x7d, 0xd8, 0x05, 0x61, 0x1d, 0xfb, 0xe4, 0x8b,
  354. 0x4c, 0x9b, 0x69, 0x8c, 0x26, 0x99, 0x38, 0x33, 0x59, 0x2d, 0x3e, 0xe9, 0x2f, 0xf1, 0x47, 0xf8,
  355. 0x03, 0x65, 0x6e, 0x32, 0x49, 0x5a, 0x7c, 0xea, 0xdc, 0x73, 0xce, 0xcc, 0x3d, 0x39, 0x73, 0x3b,
  356. 0x70, 0xaa, 0x55, 0xb2, 0xf9, 0x58, 0xe5, 0x75, 0x9a, 0x95, 0x71, 0x25, 0x85, 0x16, 0xc4, 0x6f,
  357. 0x2a, 0x15, 0xfd, 0x76, 0x20, 0x58, 0xab, 0x64, 0xf3, 0xae, 0xe6, 0x72, 0x4f, 0x9e, 0x42, 0xa0,
  358. 0xb3, 0x82, 0x53, 0x56, 0xa6, 0x3c, 0x74, 0x16, 0xce, 0x72, 0xba, 0x22, 0x71, 0x2b, 0x8d, 0xd7,
  359. 0x96, 0xa1, 0xbd, 0x88, 0x5c, 0x00, 0x24, 0x4c, 0x33, 0x25, 0x6a, 0xb9, 0xe5, 0xa1, 0x8b, 0x5b,
  360. 0xee, 0x77, 0x5b, 0xde, 0x74, 0xd4, 0x75, 0xb9, 0x13, 0x74, 0x20, 0x25, 0x4b, 0xf0, 0xbf, 0xd6,
  361. 0x5c, 0x66, 0x5c, 0x85, 0xde, 0xc2, 0x5b, 0x4e, 0x57, 0xb3, 0x6e, 0x17, 0x7a, 0xa1, 0x96, 0x8e,
  362. 0x7e, 0x3a, 0x30, 0x6e, 0xec, 0x9d, 0xc1, 0x58, 0xf2, 0xdd, 0x75, 0x82, 0xd6, 0x02, 0xda, 0x14,
  363. 0xe4, 0x31, 0xfc, 0x57, 0xb0, 0xef, 0xa6, 0xd5, 0xad, 0xc8, 0x4a, 0xad, 0xd0, 0x85, 0x47, 0x0f,
  364. 0x41, 0xf2, 0x08, 0x20, 0x2b, 0x35, 0x97, 0x77, 0x2c, 0x7f, 0x6b, 0x5a, 0x1a, 0xc9, 0x00, 0x21,
  365. 0x0f, 0x20, 0x28, 0x44, 0xc2, 0xf3, 0x1b, 0x25, 0xca, 0x70, 0x84, 0xe7, 0xf7, 0x40, 0xf4, 0x03,
  366. 0x82, 0xee, 0xf3, 0x49, 0x08, 0xfe, 0x4e, 0x8a, 0x82, 0xb2, 0x6f, 0xad, 0x11, 0x5b, 0x1a, 0x83,
  367. 0x5a, 0x18, 0xdc, 0x6d, 0x0c, 0x62, 0x41, 0x16, 0x30, 0x35, 0x82, 0xab, 0x4a, 0x6c, 0x3f, 0x75,
  368. 0xbd, 0x87, 0x90, 0x69, 0xae, 0x85, 0xe5, 0x47, 0xc8, 0xf7, 0x40, 0x74, 0x09, 0x27, 0x94, 0xab,
  369. 0x4a, 0x94, 0x8a, 0x93, 0x18, 0x7c, 0xc9, 0x55, 0x9d, 0x6b, 0x15, 0x3a, 0x18, 0xdb, 0xd9, 0x51,
  370. 0x6c, 0x48, 0x52, 0x2b, 0x8a, 0x7e, 0x39, 0x30, 0x1d, 0x10, 0xc6, 0x21, 0x97, 0x52, 0x48, 0x1b,
  371. 0x21, 0x16, 0x7d, 0xb0, 0xee, 0x30, 0xd8, 0x39, 0x9c, 0x14, 0x5c, 0x33, 0x4c, 0xc4, 0x43, 0xa2,
  372. 0xab, 0xc9, 0x13, 0x98, 0xa8, 0xe6, 0xf6, 0x46, 0x68, 0xe3, 0xde, 0xc1, 0x98, 0xbc, 0x47, 0x8a,
  373. 0xb6, 0x92, 0xe8, 0x8f, 0x03, 0xb3, 0xc3, 0x51, 0x20, 0x33, 0x70, 0xb3, 0xe6, 0x1e, 0x3d, 0xea,
  374. 0x66, 0x89, 0x71, 0x20, 0x64, 0xda, 0x3a, 0xf0, 0x68, 0x53, 0x10, 0x02, 0xa3, 0x92, 0x15, 0xbc,
  375. 0xed, 0x8e, 0x6b, 0x83, 0xe9, 0x7d, 0xc5, 0xdb, 0x3b, 0xc2, 0x35, 0xf9, 0x1f, 0xbc, 0x5a, 0xe6,
  376. 0xe1, 0x18, 0x21, 0xb3, 0x34, 0xde, 0x3f, 0x2b, 0x51, 0x9a, 0xae, 0xe1, 0xa4, 0xf1, 0x6e, 0x6b,
  377. 0x72, 0x0e, 0x33, 0xc5, 0xb7, 0xb5, 0xe4, 0x37, 0x56, 0xe1, 0xa3, 0xe2, 0x08, 0x35, 0xb6, 0xa1,
  378. 0xff, 0x9a, 0xce, 0x8c, 0x33, 0x30, 0xf3, 0x0c, 0x46, 0x9a, 0xa5, 0x66, 0xe4, 0x4c, 0x08, 0x0f,
  379. 0xff, 0x11, 0x42, 0xbc, 0x66, 0xa9, 0xba, 0x2a, 0xb5, 0xdc, 0x53, 0x94, 0x92, 0x73, 0x98, 0x54,
  380. 0xcd, 0x9c, 0x1e, 0xcf, 0x3d, 0x4e, 0x2a, 0x6d, 0xd9, 0xf9, 0x05, 0x04, 0xdd, 0x56, 0xf3, 0x81,
  381. 0x5f, 0xf8, 0xbe, 0x6d, 0x6d, 0x96, 0x26, 0xb0, 0x3b, 0x96, 0xd7, 0xdc, 0x5e, 0x19, 0x16, 0x97,
  382. 0xee, 0x0b, 0x27, 0x7a, 0x09, 0x63, 0x3c, 0x09, 0xa7, 0x2a, 0x2b, 0xb8, 0xd2, 0xac, 0xa8, 0xda,
  383. 0xa8, 0x7b, 0xe0, 0xf0, 0x00, 0xa7, 0x3d, 0x60, 0xf5, 0x0a, 0xc0, 0x3c, 0x07, 0xb7, 0x68, 0x89,
  384. 0xc4, 0xf6, 0x9f, 0x37, 0x78, 0x05, 0xec, 0x63, 0x31, 0x3f, 0xed, 0x30, 0x3b, 0x9d, 0xaf, 0xfd,
  385. 0x0f, 0x63, 0x7c, 0x5f, 0x36, 0x13, 0xfc, 0x79, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x69,
  386. 0x3b, 0x74, 0x7b, 0x04, 0x00, 0x00,
  387. }