mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-30 08:31:16 +00:00
Knut Ahlers
75991fdb87
- Do not store bot-token as core-kv entry - Hold the bot username in core-kv - Take bot client from extended channel permissions - Store (updated) bot tokens into extended permissions Signed-off-by: Knut Ahlers <knut@ahlers.me>
23 lines
634 B
Go
23 lines
634 B
Go
// Package database represents a connector to the sqlite storage
|
|
// backend to store persistent data from core and plugins
|
|
package database
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type (
|
|
// Connector represents a database connection having some extra
|
|
// convenience methods
|
|
Connector interface {
|
|
Close() error
|
|
DB() *gorm.DB
|
|
DeleteCoreMeta(key string) error
|
|
ReadCoreMeta(key string, value any) error
|
|
StoreCoreMeta(key string, value any) error
|
|
ReadEncryptedCoreMeta(key string, value any) error
|
|
StoreEncryptedCoreMeta(key string, value any) error
|
|
DecryptField(string) (string, error)
|
|
EncryptField(string) (string, error)
|
|
}
|
|
)
|