system

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringDeleter

type StringDeleter interface {
	DeleteAllByThread(threadId uuid.UUID) error
}

type StringInteractor

type StringInteractor struct {
	StringRepository StringRepository
	Logger           logging.Logger
}

func (*StringInteractor) CreateOne

func (s *StringInteractor) CreateOne(string core.String) (core.String, error)

func (*StringInteractor) DeleteById

func (s *StringInteractor) DeleteById(id uuid.UUID) error

func (*StringInteractor) FindAll

func (s *StringInteractor) FindAll() ([]core.String, error)

func (*StringInteractor) FindAllByThread

func (s *StringInteractor) FindAllByThread(threadId uuid.UUID) ([]core.String, error)

func (*StringInteractor) UpdateName

func (s *StringInteractor) UpdateName(stringId uuid.UUID, name string) error

func (*StringInteractor) UpdateOrder

func (s *StringInteractor) UpdateOrder(stringOrders []core.StringOrder) error

type StringRepository

type StringRepository interface {
	FindAll() ([]core.String, error)
	FindAllByThread(threadId uuid.UUID) ([]core.String, error)
	CreateOne(core.String) (core.String, error)
	DeleteById(id uuid.UUID) error
	UpdateName(stringId uuid.UUID, name string) error
	UpdateOrder(stringOrders []core.StringOrder) error
}

type ThreadInteractor

type ThreadInteractor struct {
	Repo          ThreadRepository
	StringDeleter StringDeleter
	Logger        logging.Logger
}

func (*ThreadInteractor) CreateOne

func (t *ThreadInteractor) CreateOne(thread core.Thread) (core.Thread, error)

func (*ThreadInteractor) DeleteById

func (t *ThreadInteractor) DeleteById(id uuid.UUID) error

DeleteById deletes all the strings associated with a thread and then deletes the thread itself.

func (*ThreadInteractor) FindAll

func (t *ThreadInteractor) FindAll() ([]core.Thread, error)

type ThreadRepository

type ThreadRepository interface {
	FindAll() ([]core.Thread, error)
	CreateOne(thread core.Thread) (core.Thread, error)
	DeleteById(id uuid.UUID) error
}

Jump to

Keyboard shortcuts

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