Feature: Support multiline irc parsing (#39)

* feat: initial multiline support

* refactor: handle multiple indexers per network

* wip: setup indexer

* build: add docker compose for testing

* chore: remove temp mock indexers

* chore: update deps

* refactor: update and store network handler

* build: update test compose

* chore: minor cleanup
This commit is contained in:
Ludvig Lundgren 2021-12-21 21:15:42 +01:00 committed by GitHub
parent 506cef6f0f
commit c4d580eb03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 1100 additions and 1042 deletions

View file

@ -1,10 +1,12 @@
package domain
import "context"
type IndexerRepo interface {
Store(indexer Indexer) (*Indexer, error)
Update(indexer Indexer) (*Indexer, error)
List() ([]Indexer, error)
Delete(id int) error
Delete(ctx context.Context, id int) error
FindByFilterID(id int) ([]Indexer, error)
}

View file

@ -36,7 +36,11 @@ type IrcNetwork struct {
type IrcRepo interface {
StoreNetwork(network *IrcNetwork) error
UpdateNetwork(ctx context.Context, network *IrcNetwork) error
StoreChannel(networkID int64, channel *IrcChannel) error
StoreNetworkChannels(ctx context.Context, networkID int64, channels []IrcChannel) error
CheckExistingNetwork(ctx context.Context, network *IrcNetwork) (*IrcNetwork, error)
FindActiveNetworks(ctx context.Context) ([]IrcNetwork, error)
ListNetworks(ctx context.Context) ([]IrcNetwork, error)
ListChannels(networkID int64) ([]IrcChannel, error)
GetNetworkByID(id int64) (*IrcNetwork, error)