knowledgebase

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportKnowledgeBaseArgs

type ImportKnowledgeBaseArgs interface {
	GetXMLFile() io.ReadSeekCloser
	GetFileName() string
}

type KnowledgeBase

type KnowledgeBase struct {
	// contains filtered or unexported fields
}

func New

func New(lg *zap.Logger, st Storage, pars Parser) *KnowledgeBase

func (KnowledgeBase) Create

func (kb KnowledgeBase) Create(ent entKb.KnowledgeBase) (string, error)

func (KnowledgeBase) GetAllMeta

func (kb KnowledgeBase) GetAllMeta() (map[string]entKb.Meta, error)

func (KnowledgeBase) GetMeta

func (kb KnowledgeBase) GetMeta(uuid string) (entKb.Meta, error)

func (KnowledgeBase) Import

func (kb KnowledgeBase) Import(xmlFile io.ReadSeekCloser, fileName string) (string, error)

func (KnowledgeBase) Remove

func (kb KnowledgeBase) Remove(uuid string) error

func (KnowledgeBase) UpdateMeta

func (kb KnowledgeBase) UpdateMeta(ent entKb.Meta) error

type ParseXMLArgs

type ParseXMLArgs interface {
	GetKnowledgeBaseUUID() string
	GetXMLFile() io.ReadSeekCloser
	GetFileName() string
}

type Parser

type Parser interface {
	Parse(KnowledgeBaseUUID string, XMLFile io.ReadSeekCloser, FileName string) (entKb.KnowledgeBase, error)
}

type Storage

type Storage interface {
	CreateKnowledgeBase(ent *entKb.KnowledgeBase) error
	GetAllKnowledgeBasesMeta() (map[string]entKb.Meta, error)
	GetKnowledgeBaseMeta(uuid string) (entKb.Meta, error)
	RemoveKnowledgeBase(uuid string) error
	UpdateKnowledgeBaseMeta(ent entKb.Meta) error
}

Jump to

Keyboard shortcuts

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