Documentation ¶
Overview ¶
Package easy_settings standalone DB with settings and other information
Index ¶
- func Generate(i int) string
- type DataBase
- type DataBaseBucket
- func (obj *DataBaseBucket) Add(key string, value string, uniq ...bool) string
- func (obj *DataBaseBucket) Delete()
- func (obj *DataBaseBucket) Get(key string, prefix ...bool) map[string]string
- func (obj *DataBaseBucket) Print(key string) []byte
- func (obj *DataBaseBucket) PrintAllPrefix(prx string) map[string]([]byte)
- type Item
- type Items
- func (o *Items) Add(key string, val string) *Items
- func (o *Items) Clear(key string, flagFindAsPrefix ...bool)
- func (o *Items) Delete()
- func (o *Items) End()
- func (o *Items) Exist(element *Item) *Item
- func (o *Items) Filter(key string) *Items
- func (o *Items) Find(key string) []string
- func (o *Items) Get(key string, flagFindAsPrefix ...bool) []string
- func (o *Items) Item(name interface{}, flagFindAsPrefix ...bool) *Items
- func (o *Items) Json() string
- func (o *Items) Load()
- func (o *Items) LoadJson()
- func (o *Items) Save(flagUniq ...bool)
- func (o *Items) SaveJson()
- func (o *Items) Test()
- func (o *Items) UnmarshalJSON(data []byte) error
- type Patern
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataBase ¶
type DataBase struct { Db *bolt.DB Err error Backets *[]DataBaseBucket Lock chan bool Timeout time.Duration }
DataBase working with Bolt DB
func (*DataBase) Bucket ¶
func (obj *DataBase) Bucket(name string) *DataBaseBucket
(*DataBase) Bucket(string) *DataBaseBucket return or create bucket of db
type DataBaseBucket ¶
type DataBaseBucket struct { Parent *bolt.DB Err error Name string Lock chan bool Timeout time.Duration Inc int }
DataBaseBucket working with Bolt DB childs - buckets
func (*DataBaseBucket) Add ¶
func (obj *DataBaseBucket) Add(key string, value string, uniq ...bool) string
(*DataBaseBucket) Add(string, string, ...bool) string Add new elements for saving in db as settings
func (*DataBaseBucket) Delete ¶
func (obj *DataBaseBucket) Delete()
(*DataBaseBucket) Delete() delete bucket
func (*DataBaseBucket) Get ¶
func (obj *DataBaseBucket) Get(key string, prefix ...bool) map[string]string
(*DataBaseBucket) Get(string, ...bool) map[string]string get elements from db
func (*DataBaseBucket) Print ¶
func (obj *DataBaseBucket) Print(key string) []byte
func (*DataBaseBucket) PrintAllPrefix ¶
func (obj *DataBaseBucket) PrintAllPrefix(prx string) map[string]([]byte)
type Item ¶
Item is elements of Data
func (*Item) GetValuesJson ¶
(*Item) GetValuesJson() string json marshaling data
type Items ¶
Items include elements of Data
func (*Items) Filter ¶
(*Items) Filter(string) *Items filtering information as original kind // edited
func (*Items) LoadJson ¶
func (o *Items) LoadJson()
(*Items) LoadJson() Load Object from serialize value
func (*Items) SaveJson ¶
func (o *Items) SaveJson()
(*Items) SaveJson() save Object to serialize value to Json
func (*Items) UnmarshalJSON ¶
(*Items) UnmarshalJSON([]byte) error wrapper around unmarshaling data