pattern

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pattern

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

func New

func New(lg *zap.Logger, st Storage) *Pattern

func (Pattern) Create

func (p Pattern) Create(knowledgeBaseUUID string, ent entKb.Pattern) (string, error)

func (Pattern) Get

func (p Pattern) Get(knowledgeBaseUUID, uuid string) (entKb.Pattern, error)

func (Pattern) GetAll

func (p Pattern) GetAll(knowledgeBaseUUID string) (map[string]entKb.Pattern, error)

func (Pattern) Remove

func (p Pattern) Remove(knowledgeBaseUUID, uuid string) error

func (Pattern) Update

func (p Pattern) Update(knowledgeBaseUUID string, ent entKb.Pattern) error

type Storage

type Storage interface {
	CreatePattern(knowledgeBaseUUID string, ent entKb.Pattern) error
	GetAllPatterns(knowledgeBaseUUID string) (map[string]entKb.Pattern, error)
	GetPattern(knowledgeBaseUUID, uuid string) (entKb.Pattern, error)
	UpdatePattern(knowledgeBaseUUID string, ent entKb.Pattern) error
	RemovePattern(knowledgeBaseUUID, uuid string) error
}

Jump to

Keyboard shortcuts

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