model

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	NONE         string = "-"
	EQUAL        string = "equ"
	NOT_EQUAL    string = "neq"
	MIN_VALUE    string = "min"
	MAX_VLAUE    string = "max"
	CONTAINS     string = "con"
	NOT_CONTAINS string = "nco"
	FROM         string = "frm"
	NOT_FROM     string = "nfr"
	REGX         string = "rex"
	OR           string = "||"
)

Variables

This section is empty.

Functions

func GetArrayFromCondition

func GetArrayFromCondition(condition string) ([]string, error)

func GetConditionByType

func GetConditionByType(conditionFull string, conditionType string) (string, error)

func GetConditionType

func GetConditionType(s string) string

func GetConditionsAndOrFromString

func GetConditionsAndOrFromString(in string) ([]string, bool)

Types

type JsonMap

type JsonMap map[string]interface{}

func (JsonMap) Marshal

func (r JsonMap) Marshal() ([]byte, error)

func (*JsonMap) Scan

func (c *JsonMap) Scan(value interface{}) error

func (*JsonMap) Unmarshal

func (r *JsonMap) Unmarshal(value interface{}) error

func (JsonMap) Value

func (c JsonMap) Value() (driver.Value, error)

type Validation

type Validation struct {
	Key        string
	Type       ValidatorType
	Conditions string
}

type ValidatorMap

type ValidatorMap map[string]Validation

type ValidatorType

type ValidatorType string
const (
	String ValidatorType = "string"
	Int    ValidatorType = "int"
	Float  ValidatorType = "float"
	Bool   ValidatorType = "bool"
	Map    ValidatorType = "map"
	Time   ValidatorType = "time"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL