Moved Google Translate client to Router.
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
|||||||
prefixed "github.com/matterbridge/logrus-prefixed-formatter"
|
prefixed "github.com/matterbridge/logrus-prefixed-formatter"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"cloud.google.com/go/translate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -172,7 +171,6 @@ type ConfigValues struct {
|
|||||||
Zulip map[string]Protocol
|
Zulip map[string]Protocol
|
||||||
General Protocol
|
General Protocol
|
||||||
Gateway []Gateway
|
Gateway []Gateway
|
||||||
GTClient *translate.Client
|
|
||||||
SameChannelGateway []SameChannelGateway
|
SameChannelGateway []SameChannelGateway
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import (
|
|||||||
type Router struct {
|
type Router struct {
|
||||||
Gateways map[string]*Gateway
|
Gateways map[string]*Gateway
|
||||||
Message chan config.Message
|
Message chan config.Message
|
||||||
|
GTClient *translate.Client
|
||||||
*config.Config
|
*config.Config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user