DB Updates :)
Former-commit-id: e9795cfca39aab57f4a4b604c65633958ff22e46 [formerly 7dd93e46eb6915a387dc64500a3fe7f6f955643b] [formerly ffa277f1605e46bb8c914464b1223fe029d579d8 [formerly a04ff87bf9271d0e4eabbbe096ce0704d6cf61ea]] Former-commit-id: ffa472fd3b1534f64a1c343864564bbc0290714b [formerly 7074f824d7d7dd3cd74b884c9f3e96834f662394] Former-commit-id: 4b1e0324de6065fd4daec25d463d3756588b92d8
This commit is contained in:
17
bolt/config.go
Normal file
17
bolt/config.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package bolt
|
||||
|
||||
import (
|
||||
"github.com/asdine/storm"
|
||||
)
|
||||
|
||||
type ConfigStore struct {
|
||||
DB *storm.DB
|
||||
}
|
||||
|
||||
func (c ConfigStore) Get(name string, to interface{}) error {
|
||||
return c.DB.Get("config", name, to)
|
||||
}
|
||||
|
||||
func (c ConfigStore) Save(name string, from interface{}) error {
|
||||
return c.DB.Set("config", name, from)
|
||||
}
|
||||
Reference in New Issue
Block a user