Documentation
¶
Index ¶
- func BatchAddGroupsForRules(db *gorm.DB, ruleNames, groupNames []string) (int64, error)
- func BatchRemoveGroupsForRules(db *gorm.DB, ruleNames, groupNames []string) (int64, error)
- func BuildFileSystem(s *schema.SyntaxFlowRule) (fi.FileSystem, error)
- func CheckSyntaxFlowLanguage(languageRaw string) (consts.Language, error)
- func CheckSyntaxFlowRuleContent(content string) (*schema.SyntaxFlowRule, error)
- func CheckSyntaxFlowRuleType(ruleName string) (schema.SyntaxFlowRuleType, error)
- func CreateGroup(db *gorm.DB, groupName string, isBuildIn ...bool) (*schema.SyntaxFlowGroup, error)
- func CreateRule(rule *schema.SyntaxFlowRule, groups ...string) (*schema.SyntaxFlowRule, error)
- func CreateRuleByContent(ruleName string, content string, buildIn bool, tags ...string) (*schema.SyntaxFlowRule, error)
- func CreateRuleWithDefaultGroup(rule *schema.SyntaxFlowRule, groups ...string) (*schema.SyntaxFlowRule, error)
- func DeleteBuildInRule() error
- func DeleteGroup(db *gorm.DB, groupName string) error
- func DeleteRuleByLibName(name string) error
- func DeleteRuleByRuleName(name string) error
- func DeleteRuleByTitle(name string) error
- func ExportDatabase() io.ReadCloser
- func GetAllRules() ([]*schema.SyntaxFlowRule, error)
- func GetIntersectionGroup(db *gorm.DB, groups [][]*schema.SyntaxFlowGroup) []*schema.SyntaxFlowGroup
- func GetLibrary(libname string) (*schema.SyntaxFlowRule, error)
- func GetOrCreateGroups(db *gorm.DB, groupNames []string) []*schema.SyntaxFlowGroup
- func GetRule(ruleName string) (*schema.SyntaxFlowRule, error)
- func GetRulePure(ruleName string) (*schema.SyntaxFlowRule, error)
- func GetRules(ruleNameGlob string) ([]*schema.SyntaxFlowRule, error)
- func ImportDatabase(reader io.Reader) error
- func ImportRuleWithoutValid(ruleName string, content string, buildin bool, tags ...string) (*schema.SyntaxFlowRule, error)
- func ImportValidRule(system fi.FileSystem, ruleName string, content string) error
- func LoadFileSystem(s *schema.SyntaxFlowRule, system fi.FileSystem) error
- func MigrateSyntaxFlow(hash string, i *schema.SyntaxFlowRule) error
- func QueryGroupByName(db *gorm.DB, groupName string) (*schema.SyntaxFlowGroup, error)
- func QueryGroupsByName(db *gorm.DB, groupNames []string) ([]*schema.SyntaxFlowGroup, error)
- func QueryRuleByName(db *gorm.DB, ruleName string) (*schema.SyntaxFlowRule, error)
- func QueryRulesByName(db *gorm.DB, ruleNames []string) ([]*schema.SyntaxFlowRule, error)
- func RegisterValid(f func(rule *schema.SyntaxFlowRule) error)
- func RenameGroup(db *gorm.DB, oldName, newName string) error
- func UpdateRule(rule *schema.SyntaxFlowRule) error
- func YieldSyntaxFlowRules(db *gorm.DB, ctx context.Context) chan *schema.SyntaxFlowRule
- func YieldSyntaxFlowRulesWithoutLib(db *gorm.DB, ctx context.Context) chan *schema.SyntaxFlowRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchAddGroupsForRules ¶
BatchAddGroupsForRules 为多个规则添加多个组 如果要添加的组不存在,会自动创建
func BatchRemoveGroupsForRules ¶
BatchRemoveGroupsForRules 为多个规则移除多个组
func BuildFileSystem ¶
func BuildFileSystem(s *schema.SyntaxFlowRule) (fi.FileSystem, error)
func CheckSyntaxFlowLanguage ¶
func CheckSyntaxFlowRuleContent ¶
func CheckSyntaxFlowRuleContent(content string) (*schema.SyntaxFlowRule, error)
func CheckSyntaxFlowRuleType ¶
func CheckSyntaxFlowRuleType(ruleName string) (schema.SyntaxFlowRuleType, error)
func CreateGroup ¶
CreateGroup 通过组名创建SyntaxFlow规则组
func CreateRule ¶
func CreateRule(rule *schema.SyntaxFlowRule, groups ...string) (*schema.SyntaxFlowRule, error)
func CreateRuleByContent ¶
func CreateRuleWithDefaultGroup ¶
func CreateRuleWithDefaultGroup(rule *schema.SyntaxFlowRule, groups ...string) (*schema.SyntaxFlowRule, error)
func DeleteBuildInRule ¶
func DeleteBuildInRule() error
func DeleteGroup ¶
DeleteGroup 通过组名删除SyntaxFlow规则组
func DeleteRuleByLibName ¶
func DeleteRuleByRuleName ¶
func DeleteRuleByTitle ¶
func ExportDatabase ¶
func ExportDatabase() io.ReadCloser
func GetAllRules ¶
func GetAllRules() ([]*schema.SyntaxFlowRule, error)
func GetIntersectionGroup ¶
func GetIntersectionGroup(db *gorm.DB, groups [][]*schema.SyntaxFlowGroup) []*schema.SyntaxFlowGroup
func GetLibrary ¶
func GetLibrary(libname string) (*schema.SyntaxFlowRule, error)
func GetOrCreateGroups ¶
func GetOrCreateGroups(db *gorm.DB, groupNames []string) []*schema.SyntaxFlowGroup
func GetRulePure ¶
func GetRulePure(ruleName string) (*schema.SyntaxFlowRule, error)
func ImportDatabase ¶
func ImportRuleWithoutValid ¶
func ImportValidRule ¶
func ImportValidRule(system fi.FileSystem, ruleName string, content string) error
func LoadFileSystem ¶
func LoadFileSystem(s *schema.SyntaxFlowRule, system fi.FileSystem) error
func MigrateSyntaxFlow ¶
func MigrateSyntaxFlow(hash string, i *schema.SyntaxFlowRule) error
func QueryGroupByName ¶
QueryGroupByName 根据组名查询组
func QueryGroupsByName ¶
func QueryRuleByName ¶
func QueryRulesByName ¶
func RegisterValid ¶
func RegisterValid(f func(rule *schema.SyntaxFlowRule) error)
func UpdateRule ¶
func UpdateRule(rule *schema.SyntaxFlowRule) error
func YieldSyntaxFlowRules ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.