pslib

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

README

policyserv library

This package contains functions and code that can be imported by other projects for interacting with policyserv. It is "public API", meaning that the function and type interfaces are stable. No other packages in policyserv are stable.

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.

Jump to

Keyboard shortcuts

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