add proper pubsub

This commit is contained in:
kiwiidb
2022-04-06 18:00:04 +02:00
parent 45e0c48f1f
commit a5ae01a5f2
5 changed files with 65 additions and 20 deletions

View File

@@ -17,12 +17,12 @@ import (
const alphaNumBytes = random.Alphanumeric
type LndhubService struct {
Config *Config
DB *bun.DB
LndClient lnd.LightningClientWrapper
Logger *lecho.Logger
IdentityPubkey string
InvoiceSubscribers map[int64]chan models.Invoice
Config *Config
DB *bun.DB
LndClient lnd.LightningClientWrapper
Logger *lecho.Logger
IdentityPubkey string
InvoicePubSub *Pubsub
}
func (svc *LndhubService) GenerateToken(ctx context.Context, login, password, inRefreshToken string) (accessToken, refreshToken string, err error) {