sfdb

package
v1.3.7-beta3 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFileSystem

func BuildFileSystem(s *schema.SyntaxFlowRule) (fi.FileSystem, error)

func CheckSyntaxFlowLanguage

func CheckSyntaxFlowLanguage(languageRaw string) (consts.Language, error)

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 DeleteRuleByLibName(name string) error

func DeleteRuleByRuleName

func DeleteRuleByRuleName(name string) error

func DeleteRuleByTitle

func DeleteRuleByTitle(name string) error

func ExportDatabase

func ExportDatabase() io.ReadCloser

func GetAllRules

func GetAllRules() ([]*schema.SyntaxFlowRule, error)

func GetLibrary

func GetLibrary(libname string) (*schema.SyntaxFlowRule, error)

func GetRule

func GetRule(ruleName string) (*schema.SyntaxFlowRule, error)

func GetRulePure

func GetRulePure(ruleName string) (*schema.SyntaxFlowRule, error)

func GetRules

func GetRules(ruleNameGlob string) ([]*schema.SyntaxFlowRule, error)

func ImportDatabase

func ImportDatabase(reader io.Reader) error

func ImportRuleDefaultGroupName

func ImportRuleDefaultGroupName(rule *schema.SyntaxFlowRule) error

ImportRuleDefaultGroupName 导入规则默认分组,默认使用language,purpose,severity作为分组名

func ImportRuleWithoutValid

func ImportRuleWithoutValid(ruleName string, content string, buildin bool, tags ...string) (*schema.SyntaxFlowRule, error)

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 SaveSyntaxFlowRule(ruleName, language, content string, tags ...string) error

func YieldSyntaxFlowRules

func YieldSyntaxFlowRules(db *gorm.DB, ctx context.Context) chan *schema.SyntaxFlowRule

func YieldSyntaxFlowRulesWithoutLib

func YieldSyntaxFlowRulesWithoutLib(ctx context.Context) chan *schema.SyntaxFlowRule

Types

This section is empty.

Jump to

Keyboard shortcuts

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