rule

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 Rule

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

func New

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

func (Rule) Create

func (r Rule) Create(knowledgeBaseUUID string, ent entKb.Rule) (string, error)

func (Rule) Get

func (r Rule) Get(knowledgeBaseUUID, uuid string) (entKb.Rule, error)

func (Rule) GetAll

func (r Rule) GetAll(knowledgeBaseUUID string) (map[string]entKb.Rule, error)

func (Rule) Remove

func (r Rule) Remove(knowledgeBaseUUID, uuid string) error

func (Rule) Update

func (r Rule) Update(knowledgeBaseUUID string, ent entKb.Rule) error

type Storage

type Storage interface {
	CreateRule(knowledgeBaseUUID string, ent entKb.Rule) error
	GetAllRules(knowledgeBaseUUID string) (map[string]entKb.Rule, error)
	GetRule(knowledgeBaseUUID, uuid string) (entKb.Rule, error)
	UpdateRule(knowledgeBaseUUID string, ent entKb.Rule) error
	RemoveRule(knowledgeBaseUUID, uuid string) error
}

Jump to

Keyboard shortcuts

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