2024-01-12 00:11:53 +00:00
|
|
|
package interfaces
|
|
|
|
|
|
|
|
import (
|
2024-01-12 13:15:36 +00:00
|
|
|
"crypto/ed25519"
|
2024-01-16 03:01:40 +00:00
|
|
|
"github.com/casbin/casbin/v2"
|
2024-01-12 00:11:53 +00:00
|
|
|
"github.com/spf13/viper"
|
|
|
|
"go.uber.org/zap"
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Portal interface {
|
|
|
|
Initialize() error
|
|
|
|
Run()
|
|
|
|
Config() *viper.Viper
|
|
|
|
Logger() *zap.Logger
|
|
|
|
Db() *gorm.DB
|
2024-01-12 04:13:10 +00:00
|
|
|
ApiRegistry() APIRegistry
|
2024-01-16 01:10:15 +00:00
|
|
|
ProtocolRegistry() ProtocolRegistry
|
2024-01-12 13:15:36 +00:00
|
|
|
Identity() ed25519.PrivateKey
|
2024-01-15 04:52:54 +00:00
|
|
|
Storage() StorageService
|
2024-01-16 01:07:08 +00:00
|
|
|
SetIdentity(identity ed25519.PrivateKey)
|
|
|
|
SetLogger(logger *zap.Logger)
|
2024-01-16 01:58:20 +00:00
|
|
|
Database() Database
|
2024-01-16 03:01:40 +00:00
|
|
|
Casbin() *casbin.Enforcer
|
|
|
|
SetCasbin(e *casbin.Enforcer)
|
2024-01-12 00:11:53 +00:00
|
|
|
}
|