mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
f25c7f6ddd
* Refactor migrations and tests for secrets kvstore * Use fake secrets store as a shortcut on tests * Update wire * Use global migration logger * Fix ds proxy tests * Fix linting issues * Rename data source test setup function
38 lines
591 B
Go
38 lines
591 B
Go
package kvstore
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
QuitOnPluginStartupFailureKey = "quit_on_secrets_plugin_startup_failure"
|
|
PluginNamespace = "secretsmanagerplugin"
|
|
DataSourceSecretType = "datasource"
|
|
)
|
|
|
|
// Item stored in k/v store.
|
|
type Item struct {
|
|
Id int64
|
|
OrgId *int64
|
|
Namespace *string
|
|
Type *string
|
|
Value string
|
|
|
|
Created time.Time
|
|
Updated time.Time
|
|
}
|
|
|
|
func (i *Item) TableName() string {
|
|
return "secrets"
|
|
}
|
|
|
|
type Key struct {
|
|
OrgId int64
|
|
Namespace string
|
|
Type string
|
|
}
|
|
|
|
func (i *Key) TableName() string {
|
|
return "secrets"
|
|
}
|