aicra/internal/checker/types.go

18 lines
545 B
Go
Raw Normal View History

2018-05-22 17:56:55 +00:00
package checker
import (
"git.xdrm.io/go/aicra/driver"
)
2018-05-22 17:56:55 +00:00
// Matcher returns whether a type 'name' matches a type
type Matcher func(name string) bool
// Checker returns whether 'value' is valid to this Type
// note: it is a pointer because it can be formatted by the checker if matches
// to provide indulgent type check if needed
type Checker func(value interface{}) bool
2018-07-08 23:34:21 +00:00
// Registry represents a registry containing all available
2018-05-22 17:56:55 +00:00
// Type-s to be used by the framework according to the configuration
type Registry map[string]driver.Checker