group

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 Group

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

func New

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

func (Group) Create

func (gr Group) Create(knowledgeBaseUUID string, ent entKb.Group) (string, error)

func (Group) Get

func (gr Group) Get(knowledgeBaseUUID, uuid string) (entKb.Group, error)

func (Group) GetAll

func (gr Group) GetAll(knowledgeBaseUUID string) (map[string]entKb.Group, error)

func (Group) Remove

func (gr Group) Remove(knowledgeBaseUUID, uuid string) error

func (Group) Reorder

func (gr Group) Reorder(knowledgeBaseUUID, groupUUID, parentUUID string) error

func (Group) Update

func (gr Group) Update(knowledgeBaseUUID string, ent entKb.Group) error

type Storage

type Storage interface {
	CreateGroup(knowledgeBaseUUID string, ent entKb.Group) error
	GetAllGroups(knowledgeBaseUUID string) (map[string]entKb.Group, error)
	GetGroup(knowledgeBaseUUID, uuid string) (entKb.Group, error)
	UpdateGroup(knowledgeBaseUUID string, ent entKb.Group) error
	RemoveGroup(knowledgeBaseUUID, uuid string) error
}

Jump to

Keyboard shortcuts

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