mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 01:44:03 +03:00
30 lines
526 B
Go
30 lines
526 B
Go
package database
|
|
|
|
type Setting struct {
|
|
name string
|
|
defaultValue string
|
|
}
|
|
|
|
var Settings = []Setting{
|
|
{
|
|
name: "migration_mode",
|
|
defaultValue: "true",
|
|
},
|
|
}
|
|
|
|
type SettingsDriver interface {
|
|
// Get Current setting from database
|
|
GetSetting(name string) (value string, err error)
|
|
|
|
// UpdateSetting updates a setting in database.
|
|
UpdateSetting(name string, value string) error
|
|
}
|
|
|
|
func (s *Setting) GetName() string {
|
|
return s.name
|
|
}
|
|
|
|
func (s *Setting) GetDefaultValue() string {
|
|
return s.defaultValue
|
|
}
|