moderator

package
v0.5.111-dev Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 16 Imported by: 0

Documentation

Overview

Warpnet - Decentralized Social Network Copyright (C) 2025 Vadim Filin, https://github.com/Warp-net, <github.com.mecdy@passmail.net>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

WarpNet is provided “as is” without warranty of any kind, either expressed or implied. Use at your own risk. The maintainers shall not be liable for any damages or data loss resulting from the use or misuse of this software.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheEntry

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

type Engine added in v0.5.21

type Engine interface {
	Moderate(content string) (bool, string, error)
	Close()
}

type Moderator

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

func NewModerator added in v0.5.21

func NewModerator(
	ctx context.Context,
	node ModeratorNode,
	pub Publisher,
) (_ *Moderator, err error)

func (*Moderator) Close

func (m *Moderator) Close()

func (*Moderator) Start added in v0.5.21

func (m *Moderator) Start() (err error)

type ModeratorNode

type ModeratorNode interface {
	Start() error
	Stop()
	Node() warpnet.P2PNode
	ID() warpnet.WarpPeerID
	ClosestPeers() ([]warpnet.WarpPeerID, error)
	NodeInfo() warpnet.NodeInfo
	GenericStream(nodeIdStr string, path stream.WarpRoute, data any) (_ []byte, err error)
}

type Publisher added in v0.5.21

type Publisher interface {
	PublishUpdateToFollowers(ownerId, dest string, bt []byte) (err error)
}

Jump to

Keyboard shortcuts

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