/
config.go
48 lines (46 loc) · 1.12 KB
/
config.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
44
45
46
47
48
// Package config provides abstraction for key-value runtime store
package config
import (
"time"
)
// KVStore abstracts static-typed values reader from kv-store.
type KVStore interface {
// IsSet ...
IsSet(key string) bool
// Get ...
Get(key string) interface{}
// AllKeys ...
AllKeys() []string
// GetBool ...
GetBool(key string) bool
// GetTime ...
GetTime(key string) time.Time
// GetDuration ...
GetDuration(key string) time.Duration
// GetInt ...
GetInt(key string) int
// GetInt32 ...
GetInt32(key string) int32
// GetInt64 ...
GetInt64(key string) int64
// GetIntSlice ...
GetIntSlice(key string) []int
// GetString ...
GetString(key string) string
// GetStringSlice ...
GetStringSlice(key string) []string
// GetStringMap ...
GetStringMap(key string) map[string]interface{}
// GetStringMapStringSlice ...
GetStringMapStringSlice(key string) map[string][]string
// GetFloat64 ...
GetFloat64(key string) float64
// GetUint ...
GetUint(key string) uint
// GetUint32 ...
GetUint32(key string) uint32
// GetUint64 ...
GetUint64(key string) uint64
// GetSizeInBytes ...
GetSizeInBytes(key string) uint
}