Documentation ¶
Index ¶
- Constants
- func GetDMPost(botID string, comment *drive.Comment, file *drive.File, siteURL string) *mattermostModel.Post
- func GetSampleChangeList() *drive.ChangeList
- func GetSampleComment(commentID string) *drive.Comment
- func GetSampleDoc() *docs.Document
- func GetSampleDriveactivityCommentResponse() *driveactivity.QueryDriveActivityResponse
- func GetSampleDriveactivityPermissionResponse() *driveactivity.QueryDriveActivityResponse
- func GetSampleFile(fileID string) *drive.File
- func GetSamplePresentation() *slides.Presentation
- func GetSampleSheet() *sheets.Spreadsheet
- func GetSampleWatchChannelData() *model.WatchChannelData
- type APIErrorResponse
- type CommandHandleFunc
- type Context
- type DialogErrorResponse
- type FileCreationRequest
- type FlowManager
- type HTTPHandlerFuncWithContext
- type MockSetup
- type OAuthBroker
- type OAuthCompleteEvent
- type Plugin
- func (p *Plugin) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
- func (p *Plugin) HandleClusterEvent(ev model.PluginClusterEvent)
- func (p *Plugin) NewFlowManager() *FlowManager
- func (p *Plugin) OnActivate() error
- func (p *Plugin) OnConfigurationChange() error
- func (p *Plugin) OnDeactivate() error
- func (p *Plugin) OnInstall(c *plugin.Context, event mattermostModel.OnInstallEvent) error
- func (p *Plugin) OnPluginClusterEvent(c *plugin.Context, ev mattermostModel.PluginClusterEvent)
- func (p *Plugin) OnSendDailyTelemetry()
- func (p *Plugin) SendDailyTelemetry()
- func (p *Plugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request)
- func (p *Plugin) TrackEvent(event string, properties map[string]interface{})
- func (p *Plugin) TrackUserEvent(event, userID string, properties map[string]interface{})
- type ResponseType
- type TestEnvironment
- type Tracker
Constants ¶
View Source
const (
WSEventConfigUpdate = "config_update"
)
Variables ¶
This section is empty.
Functions ¶
func GetDMPost ¶
func GetDMPost(botID string, comment *drive.Comment, file *drive.File, siteURL string) *mattermostModel.Post
func GetSampleChangeList ¶
func GetSampleChangeList() *drive.ChangeList
func GetSampleComment ¶
func GetSampleComment(commentID string) *drive.Comment
func GetSampleDoc ¶
func GetSampleDoc() *docs.Document
func GetSampleDriveactivityCommentResponse ¶
func GetSampleDriveactivityCommentResponse() *driveactivity.QueryDriveActivityResponse
func GetSampleDriveactivityPermissionResponse ¶
func GetSampleDriveactivityPermissionResponse() *driveactivity.QueryDriveActivityResponse
func GetSampleFile ¶
func GetSampleFile(fileID string) *drive.File
func GetSamplePresentation ¶
func GetSamplePresentation() *slides.Presentation
func GetSampleSheet ¶
func GetSampleSheet() *sheets.Spreadsheet
func GetSampleWatchChannelData ¶
func GetSampleWatchChannelData() *model.WatchChannelData
Types ¶
type APIErrorResponse ¶
type APIErrorResponse struct { ID string `json:"id"` Message string `json:"message"` StatusCode int `json:"status_code"` }
func (*APIErrorResponse) Error ¶
func (e *APIErrorResponse) Error() string
type CommandHandleFunc ¶
type DialogErrorResponse ¶
DialogErrorResponse is an error response used in interactive dialogs
type FileCreationRequest ¶
type FlowManager ¶
type FlowManager struct {
// contains filtered or unexported fields
}
func (*FlowManager) StartAnnouncementWizard ¶
func (fm *FlowManager) StartAnnouncementWizard(userID string) error
func (*FlowManager) StartOauthWizard ¶
func (fm *FlowManager) StartOauthWizard(userID string) error
func (*FlowManager) StartSetupWizard ¶
func (fm *FlowManager) StartSetupWizard(userID string) error
type HTTPHandlerFuncWithContext ¶
type HTTPHandlerFuncWithContext func(c *Context, w http.ResponseWriter, r *http.Request)
HTTPHandlerFuncWithContext is http.HandleFunc but with a Context attached
type MockSetup ¶
type MockSetup struct { MockKVStore *mock_store.MockKVStore MockGoogleClient *mock_google.MockClientInterface MockGoogleDrive *mock_google.MockDriveInterface MockDriveActivity *mock_google.MockDriveActivityInterface MockGoogleDocs *mock_google.MockDocsInterface MockGoogleSheets *mock_google.MockSheetsInterface MockGoogleSlides *mock_google.MockSlidesInterface MockClusterMutex *mock_pluginapi.MockClusterMutex MockCluster *mock_pluginapi.MockCluster MockOAuth2 *mock_oauth2.MockConfig MockTelemetry *mock_pluginapi.MockTracker }
func GetMockSetup ¶
type OAuthBroker ¶
type OAuthBroker struct {
// contains filtered or unexported fields
}
func NewOAuthBroker ¶
func NewOAuthBroker(sendOAuthCompleteEvent func(event OAuthCompleteEvent)) *OAuthBroker
func (*OAuthBroker) Close ¶
func (ob *OAuthBroker) Close()
func (*OAuthBroker) SubscribeOAuthComplete ¶
func (ob *OAuthBroker) SubscribeOAuthComplete(userID string) <-chan error
func (*OAuthBroker) UnsubscribeOAuthComplete ¶
func (ob *OAuthBroker) UnsubscribeOAuthComplete(userID string, ch <-chan error)
type OAuthCompleteEvent ¶
type Plugin ¶
type Plugin struct { plugin.MattermostPlugin Client *pluginapi.Client KVStore kvstore.KVStore BotUserID string CommandHandlers map[string]CommandHandleFunc FlowManager *FlowManager GoogleClient google.ClientInterface // contains filtered or unexported fields }
Plugin implements the interface expected by the Mattermost server to communicate between the server and plugin processes.
func (*Plugin) ExecuteCommand ¶
func (p *Plugin) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
func (*Plugin) HandleClusterEvent ¶
func (p *Plugin) HandleClusterEvent(ev model.PluginClusterEvent)
func (*Plugin) NewFlowManager ¶
func (p *Plugin) NewFlowManager() *FlowManager
func (*Plugin) OnActivate ¶
func (*Plugin) OnConfigurationChange ¶
OnConfigurationChange is invoked when configuration changes may have been made.
func (*Plugin) OnDeactivate ¶
func (*Plugin) OnInstall ¶
func (p *Plugin) OnInstall(c *plugin.Context, event mattermostModel.OnInstallEvent) error
func (*Plugin) OnPluginClusterEvent ¶
func (p *Plugin) OnPluginClusterEvent(c *plugin.Context, ev mattermostModel.PluginClusterEvent)
func (*Plugin) OnSendDailyTelemetry ¶
func (p *Plugin) OnSendDailyTelemetry()
func (*Plugin) SendDailyTelemetry ¶
func (p *Plugin) SendDailyTelemetry()
func (*Plugin) TrackEvent ¶
func (*Plugin) TrackUserEvent ¶
type ResponseType ¶
type ResponseType string
ResponseType indicates type of response returned by api
const ( // ResponseTypeJSON indicates that response type is json ResponseTypeJSON ResponseType = "JSON_RESPONSE" // ResponseTypePlain indicates that response type is text plain ResponseTypePlain ResponseType = "TEXT_RESPONSE" APIErrorIDNotConnected = "not_connected" )
type TestEnvironment ¶
type TestEnvironment struct {
// contains filtered or unexported fields
}
func SetupTestEnvironment ¶
func SetupTestEnvironment(t *testing.T) *TestEnvironment
func (*TestEnvironment) Cleanup ¶
func (e *TestEnvironment) Cleanup(t *testing.T)
func (*TestEnvironment) ResetMocks ¶
func (e *TestEnvironment) ResetMocks(t *testing.T)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.