forked from pydio/cells
-
Notifications
You must be signed in to change notification settings - Fork 0
/
interfaces.go
43 lines (33 loc) · 901 Bytes
/
interfaces.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package common
import (
"time"
"github.com/pydio/go-os/config"
)
type Scanner interface {
Scan(val interface{}) error
}
type Watcher interface {
Watch() (config.Watcher, error)
}
type ConfigValues interface {
Get(key ...string) interface{}
Set(key string, value interface{}) error
Del(key string) error
Bool(key string, def ...bool) bool
Bytes(key string, def ...[]byte) []byte
Int(key string, def ...int) int
Int64(key string, def ...int64) int64
Duration(key string, def ...string) time.Duration
String(key string, def ...string) string
StringMap(key string) map[string]string
StringArray(key string, def ...[]string) []string
Map(key string) map[string]interface{}
Array(key string) Scanner
Values(key string) ConfigValues
Database(k string) (string, string)
IsEmpty() bool
Scanner
}
type XMLSerializableForm interface {
Serialize(languages ...string) interface{}
}