Documentation
¶
Overview ¶
Package app contains all the libraries used by the main Phabulous executable.
The top-level services of the application are located here as well.
Index ¶
- type ConnectorManager
- func (c *ConnectorManager) Boot() error
- func (c *ConnectorManager) LoadModules(modules []interfaces.Module)
- func (c *ConnectorManager) Post(channelName string, storyText string, icon messages.Icon, asUser bool)
- func (c *ConnectorManager) PostImage(channelName string, storyText string, imageURL string, icon messages.Icon, ...)
- func (c *ConnectorManager) PostOnFeed(storyText string) error
- func (c *ConnectorManager) RegisterConnector(connector interfaces.Connector)
- type EngineService
- type Phabulous
- type ServeService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectorManager ¶
type ConnectorManager struct {
// contains filtered or unexported fields
}
A ConnectorManager can be seen as an aggregator of Connector objects. It implements the Connector interface by delegating every method to its registered connectors. This allows clients to use multiple connectors at once with ease.
While one could technically register a ConnectorManager as part of another manager, it is not extremely useful at this point.
func (*ConnectorManager) Boot ¶
func (c *ConnectorManager) Boot() error
Boot boots all the registered connectors. If one of them fails, the operation is interrupted and the first error is returned.
func (*ConnectorManager) LoadModules ¶
func (c *ConnectorManager) LoadModules(modules []interfaces.Module)
LoadModules loads the provided modules on all the registered connectors.
func (*ConnectorManager) Post ¶
func (c *ConnectorManager) Post( channelName string, storyText string, icon messages.Icon, asUser bool, )
Post posts a text message.
func (*ConnectorManager) PostImage ¶
func (c *ConnectorManager) PostImage( channelName string, storyText string, imageURL string, icon messages.Icon, asUser bool, )
PostImage posts a message with an attached image.
func (*ConnectorManager) PostOnFeed ¶
func (c *ConnectorManager) PostOnFeed(storyText string) error
PostOnFeed posts a message on the bot's "feed" channel.
func (*ConnectorManager) RegisterConnector ¶
func (c *ConnectorManager) RegisterConnector(connector interfaces.Connector)
RegisterConnector adds a Connector to the list of connectors managed by this manager.
type EngineService ¶
type EngineService struct { Front controllers.FrontController `inject:"inline"` Feed controllers.FeedController `inject:"inline"` Config *confer.Config `inject:""` }
EngineService provides the API engine
func (*EngineService) New ¶
func (e *EngineService) New() *gin.Engine
New creates a new instance of an API engine
type Phabulous ¶
type Phabulous struct { Config *confer.Config `inject:""` Engine *EngineService `inject:""` Serve *ServeService `inject:""` Logger *logrus.Logger `inject:""` GonduitFactory *factories.GonduitFactory `inject:""` ConnectorManager *ConnectorManager `inject:""` }
Phabulous is the root node of the DI graph
type ServeService ¶
type ServeService struct { Engine *EngineService `inject:""` Config *confer.Config `inject:""` Logger *logrus.Logger `inject:""` App *Phabulous `inject:""` }
ServeService provides the serve command
func (*ServeService) Run ¶
func (s *ServeService) Run(c *cli.Context)
Run boots the application and starts up the API server.
Directories
¶
Path | Synopsis |
---|---|
Package gonduit contains additional Conduit calls not provided by the gonduit package due to the usage of third-party methods not provided by a vanilla Phabricator instance.
|
Package gonduit contains additional Conduit calls not provided by the gonduit package due to the usage of third-party methods not provided by a vanilla Phabricator instance. |
Package interfaces contains most of the interfaces used by Phabulous' components.
|
Package interfaces contains most of the interfaces used by Phabulous' components. |
testing
|
|
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |