Documentation
¶
Index ¶
- Constants
- func IsCTCPDCCSEND(event girc.CTCPEvent) bool
- func IsNewPackAnnounce(event girc.Event) bool
- func IsPendingTransfer(event girc.Event) bool
- func IsTransferInQueue(event girc.Event) bool
- func L(ctx context.Context) *zap.Logger
- type Client
- type ConnectionStateUpdateMessage
- type DCCSendMessage
- type IRCCustomEvent
- type NewPackAnnounceMessage
- type OnEvent
- type PackType
- type PendingTransferMessage
- type TransferInQueueMessage
Constants ¶
View Source
const ( TagTraceID string = "trace-id" TagSpanID string = "span-id" )
View Source
const CTCP_DCC = "DCC"
View Source
const QUEUE_NOTIFIER = "QUEUE_NOTIFIER"
Variables ¶
This section is empty.
Functions ¶
func IsCTCPDCCSEND ¶
func IsNewPackAnnounce ¶
func IsPendingTransfer ¶
func IsTransferInQueue ¶
Types ¶
type Client ¶
type Client interface { OneshotRequestPack(ctx context.Context, nick string) (*DCCSendMessage, error) OnEvent(fn OnEvent) IsConnected() bool Connect() (err error) Close() }
func NewClient ¶
func NewClient( cfg configmodels.IRC, services lifecycle.ServiceLifecycle, queue *queue.Queue, fs *fs.FileSystem, publisher message.Publisher, subscriber message.Subscriber, ) (Client, error)
type ConnectionStateUpdateMessage ¶
type ConnectionStateUpdateMessage struct {
Connected bool `json:"connected"`
}
type DCCSendMessage ¶
type DCCSendMessage struct { Source *girc.Source `json:"source,omitempty"` AddrPort netip.AddrPort `json:"addr_port,omitempty"` Filename string `json:"filename,omitempty"` SizeInBytes uint64 `json:"size_in_bytes,omitempty"` PackType PackType `json:"pack_type,omitempty"` Entry *entry.Entry `json:"entry,omitempty"` }
func ParseCTCPDCCSEND ¶
func ParseCTCPDCCSEND(event girc.CTCPEvent) (*DCCSendMessage, error)
type IRCCustomEvent ¶
type IRCCustomEvent string
const ( Event_NOTICE_PENDING_TRANSFER IRCCustomEvent = "event_notice_pending_transfer" Event_PRIVMSG_ANNOUNCE_PACK IRCCustomEvent = "event_privmsg_announce_pack" Event_PRIVMSG_TRANSFER_IN_QUEUE IRCCustomEvent = "event_privmsg_transfer_in_queue" Event_CONNECTION_STATE_UPDATE IRCCustomEvent = "event_connection_state_update" Event_BOT_STATE_UPDATE IRCCustomEvent = "event_bot_state_update" Event_CTCP_DCC IRCCustomEvent = "event_ctcp_dcc" )
type NewPackAnnounceMessage ¶
type NewPackAnnounceMessage struct { Source *girc.Source `json:"source,omitempty"` SizeInBytes uint64 `json:"size_in_bytes,omitempty"` Filename string `json:"filename,omitempty"` Entry *entry.Entry `json:"entry,omitempty"` Pack int64 `json:"pack,omitempty"` }
func ParseNewPackAnnounce ¶
func ParseNewPackAnnounce(event girc.Event) (*NewPackAnnounceMessage, error)
type OnEvent ¶
type OnEvent func( ctx context.Context, event IRCCustomEvent, msg interface{}, ) (err error)
type PendingTransferMessage ¶
type PendingTransferMessage struct { Source *girc.Source `json:"source,omitempty"` Duration time.Duration `json:"duration,omitempty"` }
func ParsePendingTransfer ¶
func ParsePendingTransfer(event girc.Event) (*PendingTransferMessage, error)
type TransferInQueueMessage ¶
type TransferInQueueMessage struct { Source *girc.Source `json:"source,omitempty"` Filename string `json:"filename,omitempty"` Pack int64 `json:"pack,omitempty"` Position int `json:"position,omitempty"` TransferLimit int `json:"transfer_limit,omitempty"` }
func ParseTransferInQueue ¶
func ParseTransferInQueue(event girc.Event) (*TransferInQueueMessage, error)
Source Files
¶
- irc.go
- irc_custom_events.go
- irc_handlers.go
- irc_handlers_connection.go
- irc_handlers_ctcp.go
- irc_handlers_notice.go
- irc_handlers_notice_pending.go
- irc_handlers_privmsg.go
- irc_handlers_privmsg_pack_announce.go
- irc_handlers_privmsg_transfer_in_queue.go
- irc_logger.go
- irc_metrics.go
- irc_oneshot_request_pack.go
- irc_parse_ctcp_dcc.go
- irc_parse_notice_pending.go
- irc_parse_privmsg_announce.go
- irc_parse_privmsg_queued.go
- irc_pubsub_queue_handler.go
- irc_queue_events.go
- irc_sanitizer.go
- irc_telemetry.go
Click to show internal directories.
Click to hide internal directories.