models.go raw
1 package service
2
3 import (
4 "gorm.io/gorm"
5
6 "github.com/getAlby/hub/alby"
7 "github.com/getAlby/hub/config"
8 "github.com/getAlby/hub/events"
9 "github.com/getAlby/hub/lnclient"
10 "github.com/getAlby/hub/service/keys"
11 "github.com/getAlby/hub/swaps"
12 "github.com/getAlby/hub/transactions"
13 )
14
15 type RelayStatus struct {
16 Url string
17 Online bool
18 }
19
20 type Service interface {
21 StartApp(encryptionKey string) error
22 StopApp()
23 Shutdown()
24
25 // TODO: remove getters (currently used by http / wails services)
26 GetAlbySvc() alby.AlbyService
27 GetAlbyOAuthSvc() alby.AlbyOAuthService
28 GetEventPublisher() events.EventPublisher
29 GetLNClient() lnclient.LNClient
30 GetTransactionsService() transactions.TransactionsService
31 GetSwapsService() swaps.SwapsService
32 GetDB() *gorm.DB
33 GetConfig() config.Config
34 GetKeys() keys.Keys
35 GetRelayStatuses() []RelayStatus
36 GetStartupState() string
37 }
38