Documentation ¶
Index ¶
- func DescribeToJson(s string) string
- type RuleProcessor
- func (p *RuleProcessor) ExecCreate(name, ruleJson string) error
- func (p *RuleProcessor) ExecCreateWithValidation(name, ruleJson string) (*def.Rule, error)
- func (p *RuleProcessor) ExecDesc(name string) (string, error)
- func (p *RuleProcessor) ExecDrop(name string) (string, error)
- func (p *RuleProcessor) ExecExists(name string) bool
- func (p *RuleProcessor) ExecQuery(ruleid, sql string) (*topo.Topo, error)
- func (p *RuleProcessor) ExecReplaceRuleState(name string, triggered bool) (*def.Rule, error)
- func (p *RuleProcessor) ExecUpdate(name, ruleJson string) (*def.Rule, error)
- func (p *RuleProcessor) GetAllRules() ([]string, error)
- func (p *RuleProcessor) GetAllRulesJson() (map[string]string, error)
- func (p *RuleProcessor) GetRuleById(id string) (*def.Rule, error)
- func (p *RuleProcessor) GetRuleByJson(id, ruleJson string) (*def.Rule, error)
- func (p *RuleProcessor) GetRuleByJsonValidated(ruleJson string) (*def.Rule, error)
- func (p *RuleProcessor) GetRuleJson(id string) (string, error)
- type Ruleset
- type RulesetProcessor
- func (rs *RulesetProcessor) Export() (io.ReadSeeker, []int, error)
- func (rs *RulesetProcessor) ExportRuleSet() *Ruleset
- func (rs *RulesetProcessor) ExportRuleSetStatus() *Ruleset
- func (rs *RulesetProcessor) Import(content []byte) ([]string, []int, error)
- func (rs *RulesetProcessor) ImportRuleSet(all Ruleset) Ruleset
- type StreamProcessor
- func (p *StreamProcessor) DescStream(name string, st ast.StreamType) (r ast.Statement, err error)
- func (p *StreamProcessor) DropStream(name string, st ast.StreamType) (r string, err error)
- func (p *StreamProcessor) ExecReplaceStream(name string, statement string, st ast.StreamType) (info string, err error)
- func (p *StreamProcessor) ExecStmt(statement string) (result []string, err error)
- func (p *StreamProcessor) ExecStreamSql(statement string) (info string, err error)
- func (p *StreamProcessor) GetAll() (result map[string]map[string]string, err error)
- func (p *StreamProcessor) GetInferredJsonSchema(name string, st ast.StreamType) (r map[string]*ast.JsonStreamField, err error)
- func (p *StreamProcessor) GetInferredSchema(name string, st ast.StreamType) (r ast.StreamFields, err error)
- func (p *StreamProcessor) GetStream(name string, st ast.StreamType) (res string, err error)
- func (p *StreamProcessor) RecoverLookupTable() (err error)
- func (p *StreamProcessor) ShowStream(st ast.StreamType) (res []string, err error)
- func (p *StreamProcessor) ShowTable(kind string) (res []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DescribeToJson ¶
DescribeToJson takes the human redable text from execDescribe and converts it to json Intended use is for CLI when passing -json flag
Types ¶
type RuleProcessor ¶
type RuleProcessor struct {
// contains filtered or unexported fields
}
func NewRuleProcessor ¶
func NewRuleProcessor() *RuleProcessor
func (*RuleProcessor) ExecCreate ¶
func (p *RuleProcessor) ExecCreate(name, ruleJson string) error
func (*RuleProcessor) ExecCreateWithValidation ¶
func (p *RuleProcessor) ExecCreateWithValidation(name, ruleJson string) (*def.Rule, error)
func (*RuleProcessor) ExecExists ¶
func (p *RuleProcessor) ExecExists(name string) bool
func (*RuleProcessor) ExecQuery ¶
func (p *RuleProcessor) ExecQuery(ruleid, sql string) (*topo.Topo, error)
func (*RuleProcessor) ExecReplaceRuleState ¶
func (*RuleProcessor) ExecUpdate ¶
func (p *RuleProcessor) ExecUpdate(name, ruleJson string) (*def.Rule, error)
func (*RuleProcessor) GetAllRules ¶
func (p *RuleProcessor) GetAllRules() ([]string, error)
func (*RuleProcessor) GetAllRulesJson ¶
func (p *RuleProcessor) GetAllRulesJson() (map[string]string, error)
func (*RuleProcessor) GetRuleById ¶
func (p *RuleProcessor) GetRuleById(id string) (*def.Rule, error)
func (*RuleProcessor) GetRuleByJson ¶
func (p *RuleProcessor) GetRuleByJson(id, ruleJson string) (*def.Rule, error)
func (*RuleProcessor) GetRuleByJsonValidated ¶
func (p *RuleProcessor) GetRuleByJsonValidated(ruleJson string) (*def.Rule, error)
GetRuleByJsonValidated called when the json is getting from trusted source like db
func (*RuleProcessor) GetRuleJson ¶
func (p *RuleProcessor) GetRuleJson(id string) (string, error)
type RulesetProcessor ¶
type RulesetProcessor struct {
// contains filtered or unexported fields
}
func NewRulesetProcessor ¶
func NewRulesetProcessor(r *RuleProcessor, s *StreamProcessor) *RulesetProcessor
func (*RulesetProcessor) Export ¶
func (rs *RulesetProcessor) Export() (io.ReadSeeker, []int, error)
func (*RulesetProcessor) ExportRuleSet ¶
func (rs *RulesetProcessor) ExportRuleSet() *Ruleset
func (*RulesetProcessor) ExportRuleSetStatus ¶
func (rs *RulesetProcessor) ExportRuleSetStatus() *Ruleset
func (*RulesetProcessor) Import ¶
func (rs *RulesetProcessor) Import(content []byte) ([]string, []int, error)
func (*RulesetProcessor) ImportRuleSet ¶
func (rs *RulesetProcessor) ImportRuleSet(all Ruleset) Ruleset
type StreamProcessor ¶
type StreamProcessor struct {
// contains filtered or unexported fields
}
func NewStreamProcessor ¶
func NewStreamProcessor() *StreamProcessor
func (*StreamProcessor) DescStream ¶
func (p *StreamProcessor) DescStream(name string, st ast.StreamType) (r ast.Statement, err error)
func (*StreamProcessor) DropStream ¶
func (p *StreamProcessor) DropStream(name string, st ast.StreamType) (r string, err error)
func (*StreamProcessor) ExecReplaceStream ¶
func (p *StreamProcessor) ExecReplaceStream(name string, statement string, st ast.StreamType) (info string, err error)
func (*StreamProcessor) ExecStmt ¶
func (p *StreamProcessor) ExecStmt(statement string) (result []string, err error)
func (*StreamProcessor) ExecStreamSql ¶
func (p *StreamProcessor) ExecStreamSql(statement string) (info string, err error)
func (*StreamProcessor) GetAll ¶
func (p *StreamProcessor) GetAll() (result map[string]map[string]string, err error)
GetAll return all streams and tables defined to export.
func (*StreamProcessor) GetInferredJsonSchema ¶
func (p *StreamProcessor) GetInferredJsonSchema(name string, st ast.StreamType) (r map[string]*ast.JsonStreamField, err error)
GetInferredJsonSchema return schema in json schema type
func (*StreamProcessor) GetInferredSchema ¶
func (p *StreamProcessor) GetInferredSchema(name string, st ast.StreamType) (r ast.StreamFields, err error)
func (*StreamProcessor) GetStream ¶
func (p *StreamProcessor) GetStream(name string, st ast.StreamType) (res string, err error)
func (*StreamProcessor) RecoverLookupTable ¶
func (p *StreamProcessor) RecoverLookupTable() (err error)
func (*StreamProcessor) ShowStream ¶
func (p *StreamProcessor) ShowStream(st ast.StreamType) (res []string, err error)
Click to show internal directories.
Click to hide internal directories.