File: value_provider.go

package info (click to toggle)
golang-github-viant-assertly 0.5.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240 kB
  • sloc: makefile: 2
file content (24 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download | duplicates (2)
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))

}