import cloudeng.io/glean/crawlindex/converters
Constants
GleanDocumentType, GleanUserType
GleanDocumentType = content.Type("glean/document")
GleanUserType = content.Type("glean/user")
Functions
Func CreateDocumentRegistry
func CreateDocumentRegistry(converters ...Document) (*content.Registry[Document], error)
Func CreateUserRegistry
func CreateUserRegistry(converters ...User) (*content.Registry[User], error)
Func IgnoreContentType
func IgnoreContentType(ctype content.Type) error
Func IsIgnoreContentType
func IsIgnoreContentType(err error) bool
Types
Type Document
type Document interface {
Type() content.Type
Convert(ctx context.Context, datasource string, cfg config.Conversion, ctype content.Type, data []byte) (gleansdk.DocumentDefinition, error)
}
Functions
func NewHTML() Document
NewHTML returns a new install of HTML.
Type HTML
type HTML struct{}
HTML represents an html to glean document converter.
Methods
func (cnv *HTML) Convert(_ context.Context, datasource string, cfg config.Conversion, ctype content.Type, data []byte) (gleansdk.DocumentDefinition, error)
func (cnv *HTML) Type() content.Type
Type User
type User interface {
Type() content.Type
Convert(ctx context.Context, datasource string, cfg config.Conversion, ctype content.Type, data []byte) (gleansdk.DatasourceUserDefinition, error)
}