Documentation ¶
Index ¶
- Variables
- func CompName(comp map[string]interface{}) (string, bool)
- func CompValidate(comp map[string]interface{}) (validate.Rules, bool)
- func ComponentsFrom(formSrc map[string]interface{}) map[string]interface{}
- func GenericLoop(m interface{}, f func(int, interface{}) bool) bool
- func GetFormSrc(formSrc interface{}) map[string]interface{}
- func IsCompVisible(formInput map[string]interface{}, comps, compMain map[string]interface{}, ...) bool
- func LoopComponents(formSrc interface{}, ...)
- func NewDataManager(baseFilePath string) *dataManager
- func RulesOf(formSrc interface{}, fieldName string) (vRules validate.Rules)
- func Validate(formInput map[string]interface{}, spec interface{}, submit bool) (validate.ErrorMap, error)
- func ValidateFile(src io.Reader, formSrc interface{}, fieldName string) ([]byte, error)
- func Vars(formSrc interface{}) []string
- type DataManager
- type JSRegexEval
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMapInterfaceOrJSON = errors.New("param must be either a json string or a map[string]interface{}") ErrParamsMissing = errors.New("param cannot be nil") )
Functions ¶
func ComponentsFrom ¶
func GenericLoop ¶
GenericLoop executes a function on elements of a slice or array
func GetFormSrc ¶
func GetFormSrc(formSrc interface{}) map[string]interface{}
func IsCompVisible ¶
func LoopComponents ¶
func NewDataManager ¶
func NewDataManager(baseFilePath string) *dataManager
func ValidateFile ¶
Types ¶
type DataManager ¶
type DataManager interface { OnLoad() GetDataFile(formID, name string) (*file.IO, error) GetData(formID string) (map[string]interface{}, error) GetDataByPath(formID, dataPath string) (interface{}, error) Clear(formID string) error GetAllData() (dat map[string]interface{}, err error) GetAllDataFilePathNameOnly() (dat map[string]interface{}, files []string) PutData(formID string, dat map[string]interface{}) error PutDataWithoutMerge(formID string, dat map[string]interface{}) error PutDataFile(db storage.FilesIF, formID, name string, f file.Meta, reader io.Reader) error Close() (err error) }
type JSRegexEval ¶
type JSRegexEval struct {
// contains filtered or unexported fields
}
TODO improve/replace js engine
func (*JSRegexEval) Close ¶
func (js *JSRegexEval) Close()
func (*JSRegexEval) Test ¶
func (js *JSRegexEval) Test(regex, val string) bool
Click to show internal directories.
Click to hide internal directories.