Documentation ¶
Index ¶
- 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 CreateOrUpdateSyntaxFlow(hash string, i *schema.SyntaxFlowRule) error
- func CreateOrUpdateSyntaxFlowGroup(hash string, i *schema.SyntaxFlowRuleGroup) 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 GetLibrary(libname string) (*schema.SyntaxFlowRule, error)
- 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 ImportRuleDefaultGroupName(rule *schema.SyntaxFlowRule) 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 RegisterValid(f func(rule *schema.SyntaxFlowRule) error)
- func SaveSyntaxFlowRule(ruleName, language, content string, tags ...string) error
- func YieldSyntaxFlowRules(db *gorm.DB, ctx context.Context) chan *schema.SyntaxFlowRule
- func YieldSyntaxFlowRulesWithoutLib(ctx context.Context) chan *schema.SyntaxFlowRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 CreateOrUpdateSyntaxFlow ¶
func CreateOrUpdateSyntaxFlow(hash string, i *schema.SyntaxFlowRule) error
func CreateOrUpdateSyntaxFlowGroup ¶
func CreateOrUpdateSyntaxFlowGroup(hash string, i *schema.SyntaxFlowRuleGroup) error
func DeleteRuleByLibName ¶
func DeleteRuleByRuleName ¶
func DeleteRuleByTitle ¶
func ExportDatabase ¶
func ExportDatabase() io.ReadCloser
func GetAllRules ¶
func GetAllRules() ([]*schema.SyntaxFlowRule, error)
func GetLibrary ¶
func GetLibrary(libname string) (*schema.SyntaxFlowRule, error)
func GetRulePure ¶
func GetRulePure(ruleName string) (*schema.SyntaxFlowRule, error)
func ImportDatabase ¶
func ImportRuleDefaultGroupName ¶
func ImportRuleDefaultGroupName(rule *schema.SyntaxFlowRule) error
ImportRuleDefaultGroupName 导入规则默认分组,默认使用language,purpose,severity作为分组名
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 RegisterValid ¶
func RegisterValid(f func(rule *schema.SyntaxFlowRule) error)
func SaveSyntaxFlowRule ¶
func YieldSyntaxFlowRules ¶
func YieldSyntaxFlowRulesWithoutLib ¶
func YieldSyntaxFlowRulesWithoutLib(ctx context.Context) chan *schema.SyntaxFlowRule
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.