Send jsondata for Datasources on DatasourceConfig for backend plugins (#22681)

ref https://github.com/grafana/grafana-plugin-sdk-go/pull/84
This commit is contained in:
Carl Bergquist 2020-03-10 15:18:27 +01:00 committed by GitHub
parent 62c824e3a4
commit 5f94d31da9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 208 additions and 180 deletions

2
go.mod
View File

@ -32,7 +32,7 @@ require (
github.com/gorilla/websocket v1.4.1
github.com/gosimple/slug v1.4.2
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4
github.com/grafana/grafana-plugin-sdk-go v0.20.0
github.com/grafana/grafana-plugin-sdk-go v0.21.0
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd
github.com/hashicorp/go-plugin v1.0.1
github.com/hashicorp/go-version v1.1.0

4
go.sum
View File

@ -133,8 +133,8 @@ github.com/gosimple/slug v1.4.2 h1:jDmprx3q/9Lfk4FkGZtvzDQ9Cj9eAmsjzeQGp24PeiQ=
github.com/gosimple/slug v1.4.2/go.mod h1:ER78kgg1Mv0NQGlXiDe57DpCyfbNywXXZ9mIorhxAf0=
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4 h1:SPdxCL9BChFTlyi0Khv64vdCW4TMna8+sxL7+Chx+Ag=
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4/go.mod h1:nc0XxBzjeGcrMltCDw269LoWF9S8ibhgxolCdA1R8To=
github.com/grafana/grafana-plugin-sdk-go v0.20.0 h1:01Hit/9HNxyvUcfECvnFSB8LIrbsYSlHvyPvKKczuPo=
github.com/grafana/grafana-plugin-sdk-go v0.20.0/go.mod h1:G6Ov9M+FDOZXNw8eKXINO6XzqdUvTs7huwyQp5jLTBQ=
github.com/grafana/grafana-plugin-sdk-go v0.21.0 h1:5en5MdVFgeD9tuHDuJgwHYdIVjPs0PN0a7ZQ2bZNxNk=
github.com/grafana/grafana-plugin-sdk-go v0.21.0/go.mod h1:G6Ov9M+FDOZXNw8eKXINO6XzqdUvTs7huwyQp5jLTBQ=
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd h1:rNuUHR+CvK1IS89MMtcF0EpcVMZtjKfPRp4MEmt/aTs=
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
github.com/hashicorp/go-plugin v1.0.1 h1:4OtAfUGbnKC6yS48p0CtMX2oFYtzFZVv6rok3cRWgnE=

View File

@ -275,20 +275,19 @@ func (hs *HTTPServer) CallDatasourceResource(c *models.ReqContext) {
}
config := backendplugin.PluginConfig{
OrgID: c.OrgId,
PluginID: plugin.Id,
PluginType: plugin.Type,
JSONData: ds.JsonData,
DecryptedSecureJSONData: ds.DecryptedValues(),
Updated: ds.Updated,
OrgID: c.OrgId,
PluginID: plugin.Id,
DataSourceConfig: &backendplugin.DataSourceConfig{
ID: ds.Id,
Name: ds.Name,
URL: ds.Url,
Database: ds.Database,
User: ds.User,
BasicAuthEnabled: ds.BasicAuth,
BasicAuthUser: ds.BasicAuthUser,
ID: ds.Id,
Name: ds.Name,
URL: ds.Url,
Database: ds.Database,
User: ds.User,
BasicAuthEnabled: ds.BasicAuth,
BasicAuthUser: ds.BasicAuthUser,
JSONData: ds.JsonData,
DecryptedSecureJSONData: ds.DecryptedValues(),
Updated: ds.Updated,
},
}
hs.BackendPluginManager.CallResource(config, c, c.Params("*"))

View File

@ -268,7 +268,6 @@ func (hs *HTTPServer) CallResource(c *models.ReqContext) {
config := backendplugin.PluginConfig{
OrgID: c.OrgId,
PluginID: plugin.Id,
PluginType: plugin.Type,
JSONData: jsonData,
DecryptedSecureJSONData: decryptedSecureJSONData,
Updated: updated,

View File

@ -229,10 +229,9 @@ func (p *BackendPlugin) callResource(ctx context.Context, req CallResourceReques
Config: &pluginv2.PluginConfig{
OrgId: req.Config.OrgID,
PluginId: req.Config.PluginID,
PluginType: req.Config.PluginType,
JsonData: jsonDataBytes,
DecryptedSecureJsonData: req.Config.DecryptedSecureJSONData,
UpdatedMS: req.Config.Updated.UnixNano() / int64(time.Millisecond),
LastUpdatedMS: req.Config.Updated.UnixNano() / int64(time.Millisecond),
},
Path: req.Path,
Method: req.Method,
@ -251,14 +250,22 @@ func (p *BackendPlugin) callResource(ctx context.Context, req CallResourceReques
}
if req.Config.DataSourceConfig != nil {
datasourceJSONData, err := req.Config.DataSourceConfig.JSONData.ToDB()
if err != nil {
return nil, err
}
protoReq.Config.DatasourceConfig = &pluginv2.DataSourceConfig{
Id: req.Config.DataSourceConfig.ID,
Name: req.Config.DataSourceConfig.Name,
Url: req.Config.DataSourceConfig.URL,
Database: req.Config.DataSourceConfig.Database,
User: req.Config.DataSourceConfig.User,
BasicAuthEnabled: req.Config.DataSourceConfig.BasicAuthEnabled,
BasicAuthUser: req.Config.DataSourceConfig.BasicAuthUser,
Id: req.Config.DataSourceConfig.ID,
Name: req.Config.DataSourceConfig.Name,
Url: req.Config.DataSourceConfig.URL,
Database: req.Config.DataSourceConfig.Database,
User: req.Config.DataSourceConfig.User,
BasicAuthEnabled: req.Config.DataSourceConfig.BasicAuthEnabled,
BasicAuthUser: req.Config.DataSourceConfig.BasicAuthUser,
JsonData: datasourceJSONData,
DecryptedSecureJsonData: req.Config.DataSourceConfig.DecryptedSecureJSONData,
LastUpdatedMS: req.Config.DataSourceConfig.Updated.UnixNano() / int64(time.Millisecond),
}
}

View File

@ -60,19 +60,21 @@ func checkHealthResultFromProto(protoResp *pluginv2.CheckHealthResponse) *CheckH
}
type DataSourceConfig struct {
ID int64
Name string
URL string
User string
Database string
BasicAuthEnabled bool
BasicAuthUser string
ID int64
Name string
URL string
User string
Database string
BasicAuthEnabled bool
BasicAuthUser string
JSONData *simplejson.Json
DecryptedSecureJSONData map[string]string
Updated time.Time
}
type PluginConfig struct {
OrgID int64
PluginID string
PluginType string
JSONData *simplejson.Json
DecryptedSecureJSONData map[string]string
Updated time.Time

View File

@ -32,20 +32,19 @@ func (tw *DatasourcePluginWrapperV2) Query(ctx context.Context, ds *models.DataS
pbQuery := &pluginv2.QueryDataRequest{
Config: &pluginv2.PluginConfig{
OrgId: ds.OrgId,
PluginId: tw.pluginId,
PluginType: tw.pluginType,
UpdatedMS: ds.Updated.UnixNano() / int64(time.Millisecond),
JsonData: jsonDataBytes,
DecryptedSecureJsonData: ds.DecryptedValues(),
OrgId: ds.OrgId,
PluginId: tw.pluginId,
LastUpdatedMS: ds.Updated.UnixNano() / int64(time.Millisecond),
DatasourceConfig: &pluginv2.DataSourceConfig{
Id: ds.Id,
Name: ds.Name,
Url: ds.Url,
Database: ds.Database,
User: ds.User,
BasicAuthEnabled: ds.BasicAuth,
BasicAuthUser: ds.BasicAuthUser,
Id: ds.Id,
Name: ds.Name,
Url: ds.Url,
Database: ds.Database,
User: ds.User,
BasicAuthEnabled: ds.BasicAuth,
BasicAuthUser: ds.BasicAuthUser,
JsonData: jsonDataBytes,
DecryptedSecureJsonData: ds.DecryptedValues(),
},
},
Queries: []*pluginv2.DataQuery{},

View File

@ -53,16 +53,21 @@ func (CheckHealthResponse_HealthStatus) EnumDescriptor() ([]byte, []int) {
}
type DataSourceConfig struct {
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
Database string `protobuf:"bytes,5,opt,name=database,proto3" json:"database,omitempty"`
BasicAuthEnabled bool `protobuf:"varint,6,opt,name=basicAuthEnabled,proto3" json:"basicAuthEnabled,omitempty"`
BasicAuthUser string `protobuf:"bytes,7,opt,name=basicAuthUser,proto3" json:"basicAuthUser,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
Database string `protobuf:"bytes,5,opt,name=database,proto3" json:"database,omitempty"`
BasicAuthEnabled bool `protobuf:"varint,6,opt,name=basicAuthEnabled,proto3" json:"basicAuthEnabled,omitempty"`
BasicAuthUser string `protobuf:"bytes,7,opt,name=basicAuthUser,proto3" json:"basicAuthUser,omitempty"`
// from [data_source.json_data] field in the database
JsonData []byte `protobuf:"bytes,8,opt,name=jsonData,proto3" json:"jsonData,omitempty"`
// from [data_source.secure_json_data] field in the database
DecryptedSecureJsonData map[string]string `protobuf:"bytes,9,rep,name=decryptedSecureJsonData,proto3" json:"decryptedSecureJsonData,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
LastUpdatedMS int64 `protobuf:"varint,10,opt,name=lastUpdatedMS,proto3" json:"lastUpdatedMS,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DataSourceConfig) Reset() { *m = DataSourceConfig{} }
@ -139,14 +144,36 @@ func (m *DataSourceConfig) GetBasicAuthUser() string {
return ""
}
func (m *DataSourceConfig) GetJsonData() []byte {
if m != nil {
return m.JsonData
}
return nil
}
func (m *DataSourceConfig) GetDecryptedSecureJsonData() map[string]string {
if m != nil {
return m.DecryptedSecureJsonData
}
return nil
}
func (m *DataSourceConfig) GetLastUpdatedMS() int64 {
if m != nil {
return m.LastUpdatedMS
}
return 0
}
type PluginConfig struct {
OrgId int64 `protobuf:"varint,1,opt,name=orgId,proto3" json:"orgId,omitempty"`
PluginId string `protobuf:"bytes,2,opt,name=pluginId,proto3" json:"pluginId,omitempty"`
PluginType string `protobuf:"bytes,3,opt,name=pluginType,proto3" json:"pluginType,omitempty"`
JsonData []byte `protobuf:"bytes,4,opt,name=jsonData,proto3" json:"jsonData,omitempty"`
DecryptedSecureJsonData map[string]string `protobuf:"bytes,5,rep,name=decryptedSecureJsonData,proto3" json:"decryptedSecureJsonData,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
UpdatedMS int64 `protobuf:"varint,6,opt,name=updatedMS,proto3" json:"updatedMS,omitempty"`
DatasourceConfig *DataSourceConfig `protobuf:"bytes,7,opt,name=datasourceConfig,proto3" json:"datasourceConfig,omitempty"`
OrgId int64 `protobuf:"varint,1,opt,name=orgId,proto3" json:"orgId,omitempty"`
PluginId string `protobuf:"bytes,2,opt,name=pluginId,proto3" json:"pluginId,omitempty"`
// from [plugin_setting.json_data] field in the database
JsonData []byte `protobuf:"bytes,3,opt,name=jsonData,proto3" json:"jsonData,omitempty"`
// from [plugin_setting.secure_json_data] field in the database
DecryptedSecureJsonData map[string]string `protobuf:"bytes,4,rep,name=decryptedSecureJsonData,proto3" json:"decryptedSecureJsonData,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
LastUpdatedMS int64 `protobuf:"varint,5,opt,name=lastUpdatedMS,proto3" json:"lastUpdatedMS,omitempty"`
DatasourceConfig *DataSourceConfig `protobuf:"bytes,6,opt,name=datasourceConfig,proto3" json:"datasourceConfig,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -191,13 +218,6 @@ func (m *PluginConfig) GetPluginId() string {
return ""
}
func (m *PluginConfig) GetPluginType() string {
if m != nil {
return m.PluginType
}
return ""
}
func (m *PluginConfig) GetJsonData() []byte {
if m != nil {
return m.JsonData
@ -212,9 +232,9 @@ func (m *PluginConfig) GetDecryptedSecureJsonData() map[string]string {
return nil
}
func (m *PluginConfig) GetUpdatedMS() int64 {
func (m *PluginConfig) GetLastUpdatedMS() int64 {
if m != nil {
return m.UpdatedMS
return m.LastUpdatedMS
}
return 0
}
@ -912,6 +932,7 @@ func (m *CheckHealthResponse) GetJsonDetails() string {
func init() {
proto.RegisterEnum("pluginv2.CheckHealthResponse_HealthStatus", CheckHealthResponse_HealthStatus_name, CheckHealthResponse_HealthStatus_value)
proto.RegisterType((*DataSourceConfig)(nil), "pluginv2.DataSourceConfig")
proto.RegisterMapType((map[string]string)(nil), "pluginv2.DataSourceConfig.DecryptedSecureJsonDataEntry")
proto.RegisterType((*PluginConfig)(nil), "pluginv2.PluginConfig")
proto.RegisterMapType((map[string]string)(nil), "pluginv2.PluginConfig.DecryptedSecureJsonDataEntry")
proto.RegisterType((*User)(nil), "pluginv2.User")
@ -936,76 +957,77 @@ func init() {
func init() { proto.RegisterFile("backend.proto", fileDescriptor_5ab9ba5b8d8b2ba5) }
var fileDescriptor_5ab9ba5b8d8b2ba5 = []byte{
// 1094 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xdb, 0x46,
0x10, 0x2e, 0xa9, 0x3f, 0x73, 0xa4, 0x18, 0xea, 0xda, 0x71, 0x04, 0x35, 0x49, 0x05, 0x22, 0x40,
0x95, 0x14, 0x15, 0x5a, 0xe5, 0x52, 0x24, 0xa7, 0xd8, 0x52, 0xe1, 0xd8, 0xf1, 0x4f, 0x57, 0x36,
0x0a, 0xa4, 0xe8, 0x61, 0x45, 0xae, 0x25, 0xd6, 0x24, 0x57, 0xd9, 0x5d, 0x1a, 0xd5, 0x13, 0xf4,
0x05, 0x7a, 0xed, 0x2b, 0xa4, 0x4f, 0xd1, 0x4b, 0xaf, 0x3d, 0xf4, 0x75, 0x8a, 0x5d, 0x2e, 0x45,
0xca, 0x96, 0x6c, 0xf4, 0x27, 0xb7, 0x99, 0xe1, 0xcc, 0xec, 0x7c, 0x33, 0xdf, 0x8c,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 0xe7, 0x30, 0xb4, 0x07, 0xcd, 0x02, 0xa4, 0xe8, 0xe1, 0x1a, 0xa4, 0xd3, 0xcc, 0x8f, 0x6e,
0x9c, 0x03, 0x9a, 0xc0, 0x46, 0x99, 0x6a, 0xe8, 0xd3, 0xf5, 0x24, 0x4c, 0x33, 0xf6, 0x6e, 0x63,
0xe9, 0xf0, 0x04, 0xcc, 0xb7, 0x31, 0x09, 0xd9, 0x69, 0x14, 0x07, 0x68, 0x17, 0xee, 0x2d, 0x8d,
0xff, 0x87, 0xc3, 0x8f, 0x70, 0xbf, 0x94, 0x49, 0x80, 0xbf, 0x4d, 0x9c, 0xb3, 0xbb, 0x81, 0x79,
0xbb, 0xf5, 0x0e, 0x06, 0x2f, 0xb3, 0xef, 0xd3, 0x9a, 0xfc, 0x87, 0xe5, 0xf9, 0x3f, 0x01, 0x00,
0x00, 0xff, 0xff, 0x9f, 0xc1, 0xca, 0xb8, 0xc1, 0x0c, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1191,8 +1213,8 @@ var _Data_serviceDesc = grpc.ServiceDesc{
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DiagnosticsClient interface {
CollectMetrics(ctx context.Context, in *CollectMetricsRequest, opts ...grpc.CallOption) (*CollectMetricsResponse, error)
CheckHealth(ctx context.Context, in *CheckHealthRequest, opts ...grpc.CallOption) (*CheckHealthResponse, error)
CollectMetrics(ctx context.Context, in *CollectMetricsRequest, opts ...grpc.CallOption) (*CollectMetricsResponse, error)
}
type diagnosticsClient struct {
@ -1203,15 +1225,6 @@ func NewDiagnosticsClient(cc *grpc.ClientConn) DiagnosticsClient {
return &diagnosticsClient{cc}
}
func (c *diagnosticsClient) CollectMetrics(ctx context.Context, in *CollectMetricsRequest, opts ...grpc.CallOption) (*CollectMetricsResponse, error) {
out := new(CollectMetricsResponse)
err := c.cc.Invoke(ctx, "/pluginv2.Diagnostics/CollectMetrics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *diagnosticsClient) CheckHealth(ctx context.Context, in *CheckHealthRequest, opts ...grpc.CallOption) (*CheckHealthResponse, error) {
out := new(CheckHealthResponse)
err := c.cc.Invoke(ctx, "/pluginv2.Diagnostics/CheckHealth", in, out, opts...)
@ -1221,45 +1234,36 @@ func (c *diagnosticsClient) CheckHealth(ctx context.Context, in *CheckHealthRequ
return out, nil
}
func (c *diagnosticsClient) CollectMetrics(ctx context.Context, in *CollectMetricsRequest, opts ...grpc.CallOption) (*CollectMetricsResponse, error) {
out := new(CollectMetricsResponse)
err := c.cc.Invoke(ctx, "/pluginv2.Diagnostics/CollectMetrics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DiagnosticsServer is the server API for Diagnostics service.
type DiagnosticsServer interface {
CollectMetrics(context.Context, *CollectMetricsRequest) (*CollectMetricsResponse, error)
CheckHealth(context.Context, *CheckHealthRequest) (*CheckHealthResponse, error)
CollectMetrics(context.Context, *CollectMetricsRequest) (*CollectMetricsResponse, error)
}
// UnimplementedDiagnosticsServer can be embedded to have forward compatible implementations.
type UnimplementedDiagnosticsServer struct {
}
func (*UnimplementedDiagnosticsServer) CollectMetrics(ctx context.Context, req *CollectMetricsRequest) (*CollectMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CollectMetrics not implemented")
}
func (*UnimplementedDiagnosticsServer) CheckHealth(ctx context.Context, req *CheckHealthRequest) (*CheckHealthResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckHealth not implemented")
}
func (*UnimplementedDiagnosticsServer) CollectMetrics(ctx context.Context, req *CollectMetricsRequest) (*CollectMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CollectMetrics not implemented")
}
func RegisterDiagnosticsServer(s *grpc.Server, srv DiagnosticsServer) {
s.RegisterService(&_Diagnostics_serviceDesc, srv)
}
func _Diagnostics_CollectMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CollectMetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiagnosticsServer).CollectMetrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pluginv2.Diagnostics/CollectMetrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiagnosticsServer).CollectMetrics(ctx, req.(*CollectMetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Diagnostics_CheckHealth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckHealthRequest)
if err := dec(in); err != nil {
@ -1278,18 +1282,36 @@ func _Diagnostics_CheckHealth_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _Diagnostics_CollectMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CollectMetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiagnosticsServer).CollectMetrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pluginv2.Diagnostics/CollectMetrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiagnosticsServer).CollectMetrics(ctx, req.(*CollectMetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Diagnostics_serviceDesc = grpc.ServiceDesc{
ServiceName: "pluginv2.Diagnostics",
HandlerType: (*DiagnosticsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CollectMetrics",
Handler: _Diagnostics_CollectMetrics_Handler,
},
{
MethodName: "CheckHealth",
Handler: _Diagnostics_CheckHealth_Handler,
},
{
MethodName: "CollectMetrics",
Handler: _Diagnostics_CollectMetrics_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "backend.proto",

2
vendor/modules.txt vendored
View File

@ -147,7 +147,7 @@ github.com/gosimple/slug
# github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4
github.com/grafana/grafana-plugin-model/go/datasource
github.com/grafana/grafana-plugin-model/go/renderer
# github.com/grafana/grafana-plugin-sdk-go v0.20.0
# github.com/grafana/grafana-plugin-sdk-go v0.21.0
github.com/grafana/grafana-plugin-sdk-go/backend/plugin
github.com/grafana/grafana-plugin-sdk-go/dataframe
github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2