application

package
v0.0.0-...-3ee0b18 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consensus

type Consensus interface {
	Apply(cmd []byte, timeout time.Duration) (err error)
	GetServers(ctx context.Context) ([]*api.Server, error)
}

type Distributed

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

func New

func New(consensus Consensus, messagesRepo MessagesRepository,
	filesRepo FilesRepository, threadsRepo ThreadsRepository, translationsRepo TranslationsRepository, log *logger.Logger) *Distributed

func (*Distributed) ChangeThreadParent

func (m *Distributed) ChangeThreadParent(ctx context.Context, id, userID, parentID int64) (err error)

func (*Distributed) DeleteFiles

func (m *Distributed) DeleteFiles(ctx context.Context, ids []int64, userID int64) (err error)

func (*Distributed) DeleteMessage

func (m *Distributed) DeleteMessage(ctx context.Context, id, userID int64) (err error)

func (*Distributed) DeleteThread

func (m *Distributed) DeleteThread(ctx context.Context, id, userID int64) (err error)

func (*Distributed) DeleteTranslation

func (m *Distributed) DeleteTranslation(ctx context.Context, messageID int64, lang string) (err error)

func (*Distributed) GetServers

func (m *Distributed) GetServers(ctx context.Context) ([]*api.Server, error)

func (*Distributed) PrivateFiles

func (m *Distributed) PrivateFiles(ctx context.Context, ids []int64, userID int64, updatedAt string) (err error)

func (*Distributed) PrivateMessages

func (m *Distributed) PrivateMessages(ctx context.Context, ids []int64, userID int64, updatedAt string) (err error)

func (*Distributed) PrivateThread

func (m *Distributed) PrivateThread(ctx context.Context, id, userID int64, updatedAt string) (err error)

func (*Distributed) PublishFiles

func (m *Distributed) PublishFiles(ctx context.Context, ids []int64, userID int64, updatedAt string) (err error)

func (*Distributed) PublishMessages

func (m *Distributed) PublishMessages(ctx context.Context, ids []int64, userID int64, updatedAt string) (err error)

func (*Distributed) PublishThread

func (m *Distributed) PublishThread(ctx context.Context, id, userID int64, updatedAt string) (err error)

func (*Distributed) SaveFile

func (m *Distributed) SaveFile(ctx context.Context, id, userID int64, name, description, mime string, private bool, size int64, createdAt, updatedAt string) (err error)

func (*Distributed) SaveMessage

func (m *Distributed) SaveMessage(ctx context.Context, id, userID int64, name, title, text string, private bool, createdAt, updatedAt string) (err error)

func (*Distributed) SaveThread

func (m *Distributed) SaveThread(ctx context.Context, id, userID, parentID int64, name, description string, private bool, createdAt, updatedAt string) (err error)

func (*Distributed) SaveTranslation

func (m *Distributed) SaveTranslation(ctx context.Context, userID, messageID int64, lang string, title, text string, createdAt, updatedAt string) (err error)

func (*Distributed) SearchMessages

func (m *Distributed) SearchMessages(ctx context.Context, userID int64, substr string, threadID int64, public int) (list []*model.Message, err error)

func (*Distributed) UpdateMessage

func (m *Distributed) UpdateMessage(ctx context.Context, id, userID int64, name, title, text *string, updatedAt string) (err error)

func (*Distributed) UpdateThread

func (m *Distributed) UpdateThread(ctx context.Context, id, userID int64, name, description *string, updatedAt string) (err error)

func (*Distributed) UpdateTranslation

func (m *Distributed) UpdateTranslation(ctx context.Context, messageID int64, lang string, title, text *string, updatedAt string) (err error)

type FilesRepository

type FilesRepository interface {
}

type MessagesRepository

type MessagesRepository interface {
	SearchMessages(ctx context.Context, userID int64, substr string, public int) (list []*model.Message, err error)
}

type ThreadsRepository

type ThreadsRepository interface {
	SearchThreads(ctx context.Context, parentID, userID int64) (list []*model.Thread, err error)
}

type TranslationsRepository

type TranslationsRepository interface {
	SearchTranslations(ctx context.Context, userID int64, substr string) (list []*model.Translation, err error)
}

Jump to

Keyboard shortcuts

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