Newer
Older
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain"
rbacInterfaces "code.fbi.h-da.de/danet/gosdn/controller/interfaces/rbac"
"code.fbi.h-da.de/danet/gosdn/controller/rbac"
"code.fbi.h-da.de/danet/gosdn/controller/metrics"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
// NorthboundInterface is the representation of the
// gRPC services used provided.
type NorthboundInterface struct {
Pnd *PndServer
Core *Core
Csbi *Csbi
Sbi *SbiServer
User *User
Role *Role
// NewNBI receives a PndStore and returns a new gRPC *NorthboundInterface
func NewNBI(
pnds networkdomain.PndStore,
users rbacInterfaces.UserService,
roles rbacInterfaces.RoleService,
jwt rbac.JWTManager,
apps app.IService,
) *NorthboundInterface {
Pnd: NewPndServer(pnds),
Core: NewCoreServer(pnds),
Csbi: NewCsbiServer(pnds),
Sbi: NewSbiServer(pnds),
Auth: NewAuthServer(&jwt, users),
User: NewUserServer(&jwt, users),
Role: NewRoleServer(&jwt, roles),