forked from viant/assertly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
value_provider.go
24 lines (20 loc) · 1.12 KB
/
value_provider.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
package assertly
import (
"github.com/viant/toolbox"
)
//ValueProviderRegistry represents value provider ValueProviderRegistry
var ValueProviderRegistry = toolbox.NewValueProviderRegistry()
func init() {
ValueProviderRegistry.Register("nil", toolbox.NewNilValueProvider())
ValueProviderRegistry.Register("empty", toolbox.NewConstValueProvider(""))
ValueProviderRegistry.Register("env", toolbox.NewEnvValueProvider())
ValueProviderRegistry.Register("cast", toolbox.NewCastedValueProvider())
ValueProviderRegistry.Register("timediff", toolbox.NewTimeDiffProvider())
ValueProviderRegistry.Register("current_timestamp", toolbox.NewCurrentTimeProvider())
ValueProviderRegistry.Register("current_date", toolbox.NewCurrentDateProvider())
ValueProviderRegistry.Register("between", toolbox.NewBetweenPredicateValueProvider())
ValueProviderRegistry.Register("within_sec", toolbox.NewWithinSecPredicateValueProvider())
ValueProviderRegistry.Register("weekday", toolbox.NewWeekdayProvider())
ValueProviderRegistry.Register("dob", toolbox.NewDateOfBirthrovider())
ValueProviderRegistry.Register("cat", toolbox.NewFileValueProvider(true))
}