irc

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: GPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(log zerolog.Logger, sse *sse.Server, network domain.IrcNetwork, definitions []*domain.IndexerDefinition, releaseSvc release.Service, notificationSvc notification.Service) *Handler

func (*Handler) AddChannelHealth

func (h *Handler) AddChannelHealth(channel string)

func (*Handler) CurrentNick

func (h *Handler) CurrentNick() string

CurrentNick returns our current nick set by the server

func (*Handler) GetNetwork

func (h *Handler) GetNetwork() *domain.IrcNetwork

func (*Handler) Healthy

func (h *Handler) Healthy() bool

Healthy if enabled but not monitoring return false,

if any channel is enabled but not monitoring return false, else return true

func (*Handler) InitIndexers

func (h *Handler) InitIndexers(definitions []*domain.IndexerDefinition)

func (*Handler) JoinChannel

func (h *Handler) JoinChannel(channel string, password string) error

JoinChannel sends join command

func (*Handler) JoinChannels

func (h *Handler) JoinChannels()

JoinChannels sends multiple join commands

func (*Handler) NickChange

func (h *Handler) NickChange(nick string) error

NickChange sets a new nick for our user

func (*Handler) NickServIdentify

func (h *Handler) NickServIdentify(password string) error

NickServIdentify sends NickServ Identify commands

func (*Handler) PartChannel

func (h *Handler) PartChannel(channel string) error

PartChannel parts/leaves channel

func (*Handler) PreferredNick

func (h *Handler) PreferredNick() string

PreferredNick returns our preferred nick from settings

func (*Handler) Restart

func (h *Handler) Restart() error

Restart stops the network and then runs it

func (*Handler) Run

func (h *Handler) Run() error

func (*Handler) SendMsg added in v1.27.0

func (h *Handler) SendMsg(channel, msg string) error

func (*Handler) SetNetwork

func (h *Handler) SetNetwork(network *domain.IrcNetwork)

func (*Handler) Stop

func (h *Handler) Stop()

Stop the network and quit

func (*Handler) UpdateNetwork

func (h *Handler) UpdateNetwork(network *domain.IrcNetwork)

type Service

type Service interface {
	StartHandlers()
	StopHandlers()
	StopNetwork(id int64) error
	StopAndRemoveNetwork(id int64) error
	StopNetworkIfRunning(id int64) error
	RestartNetwork(ctx context.Context, id int64) error
	ListNetworks(ctx context.Context) ([]domain.IrcNetwork, error)
	GetNetworksWithHealth(ctx context.Context) ([]domain.IrcNetworkWithHealth, error)
	GetNetworkByID(ctx context.Context, id int64) (*domain.IrcNetwork, error)
	DeleteNetwork(ctx context.Context, id int64) error
	StoreNetwork(ctx context.Context, network *domain.IrcNetwork) error
	UpdateNetwork(ctx context.Context, network *domain.IrcNetwork) error
	StoreChannel(ctx context.Context, networkID int64, channel *domain.IrcChannel) error
	SendCmd(ctx context.Context, req *domain.SendIrcCmdRequest) error
}

func NewService

func NewService(log logger.Logger, sse *sse.Server, repo domain.IrcRepo, releaseSvc release.Service, indexerSvc indexer.Service, notificationSvc notification.Service) Service

Jump to

Keyboard shortcuts

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