Documentation ¶
Index ¶
- Constants
- Variables
- func Bind(app *application.App, simple *Simple)
- func GetRulesAndFormConditionClause(dbSchema string, scope string, domainName string, ...) (string, error)
- func HasRule(dbSchema string, scope string, domainName string, ...) (bool, error)
- func IsSupportedOperator(op string) bool
- func Lint(ruleStr string) error
- func RegisterQueryRuleDefinitionByEntity(items ...RegisterQueryRuleDefinitionsByEntityItem) error
- type AddQueryRuleJsonBody
- type GetQueryRuleDefinitionQueryParams
- type GetQueryRuleQueryParams
- type Info
- type Operator
- type QueryRuleDefinitionItem
- type RegisterQueryRuleDefinitionsByEntityItem
- type RemoveQueryRuleJsonBody
- type Rule
- type Simple
- type ValueObject
Constants ¶
View Source
const ( LogicalOperatorAnd = "and" LogicalOperatorOr = "or" )
View Source
const ( FieldScope = "Scope" FieldDomainName = "DomainName" FieldRule = "Rule" )
Variables ¶
View Source
var ( ColumnScope = domain.ColumnName(FieldScope) ColumnDomainName = "domain_name" ColumnRule = domain.ColumnName(FieldRule) )
Functions ¶
func Bind ¶
func Bind(app *application.App, simple *Simple)
func GetRulesAndFormConditionClause ¶ added in v1.0.5
func GetRulesAndFormConditionClause(dbSchema string, scope string, domainName string, i *infrastructure.Infrastructure) (string, error)
func HasRule ¶
func HasRule(dbSchema string, scope string, domainName string, i *infrastructure.Infrastructure) (bool, error)
func IsSupportedOperator ¶
func RegisterQueryRuleDefinitionByEntity ¶
func RegisterQueryRuleDefinitionByEntity(items ...RegisterQueryRuleDefinitionsByEntityItem) error
Types ¶
type AddQueryRuleJsonBody ¶
type GetQueryRuleDefinitionQueryParams ¶
type GetQueryRuleDefinitionQueryParams struct {
DomainName string `form:"domainName" binding:"required" assign:"toField:RuleDomainName"`
}
type GetQueryRuleQueryParams ¶
type QueryRuleDefinitionItem ¶
type QueryRuleDefinitionItem struct { FieldType string `json:"fieldType"` FieldName string `json:"fieldName"` FieldCNName string `json:"fieldCNName"` ColumnName string `json:"columnName"` Operators []Operator `json:"operators"` }
func GetQueryRuleDefinition ¶
func GetQueryRuleDefinition(domainName string) []QueryRuleDefinitionItem
type RemoveQueryRuleJsonBody ¶
type Rule ¶
type ValueObject ¶
type ValueObject struct { value_object.Base Scope string `sqlmapping:"column:scope;key;notUpdate;" sqlresult:"column:scope;" check:"required,lte=256"` RuleDomainName string `sqlmapping:"column:domain_name;key;notUpdate;" sqlresult:"column:domain_name;" check:"required,lte=256"` Rule string `sqlmapping:"column:rule;notUpdate;" sqlresult:"column:rule;" check:"required"` }
func (*ValueObject) CheckKeyFields ¶
func (valueObject *ValueObject) CheckKeyFields() error
func (*ValueObject) DomainCNName ¶
func (valueObject *ValueObject) DomainCNName() string
func (*ValueObject) DomainCamelName ¶
func (valueObject *ValueObject) DomainCamelName() string
func (*ValueObject) ForCreate ¶
func (valueObject *ValueObject) ForCreate() error
Click to show internal directories.
Click to hide internal directories.