Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeywordTemplate ¶
type KeywordTemplate struct {
Name string
// contains filtered or unexported fields
}
KeywordTemplate - Used by the Keyword Template Filter to evaluate an input string for harms.
func NewKeywordTemplate ¶
func NewKeywordTemplate(name string, body string) (*KeywordTemplate, error)
NewKeywordTemplate - Creates a new keyword template with the given name and text body.
func (*KeywordTemplate) IdentifyHarms ¶
func (t *KeywordTemplate) IdentifyHarms(input string) ([]string, error)
IdentifyHarms - Takes an input string to evaluate it against the template. The harms are returned as MSC4387 identifiers. See https://github.com/matrix-org/matrix-spec-proposals/pull/4387 for details.
Click to show internal directories.
Click to hide internal directories.