diff options
Diffstat (limited to 'vendor/github.com/mattermost/platform/einterfaces')
14 files changed, 101 insertions, 37 deletions
diff --git a/vendor/github.com/mattermost/platform/einterfaces/LICENSE.txt b/vendor/github.com/mattermost/platform/einterfaces/LICENSE.txt index e5875711..ead98cf0 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/LICENSE.txt +++ b/vendor/github.com/mattermost/platform/einterfaces/LICENSE.txt @@ -1,32 +1,32 @@ Mattermost Licensing -SOFTWARE LICENSING +SOFTWARE LICENSING -You are licensed to use compiled versions of the Mattermost platform produced by Mattermost, Inc. under an MIT LICENSE +You are licensed to use compiled versions of the Mattermost platform produced by Mattermost, Inc. under an MIT LICENSE - See MIT-COMPILED-LICENSE.md included in compiled versions for details You may be licensed to use source code to create compiled versions not produced by Mattermost, Inc. in one of two ways: -1. Under the Free Software Foundation’s GNU AGPL v.3.0, subject to the exceptions outlined in this policy; or -2. Under a commercial license available from Mattermost, Inc. by contacting commercial@mattermost.com +1. Under the Free Software Foundation’s GNU AGPL v.3.0, subject to the exceptions outlined in this policy; or +2. Under a commercial license available from Mattermost, Inc. by contacting commercial@mattermost.com -You are licensed to use the source code in Admin Tools and Configuration Files (templates/, config/, model/, +You are licensed to use the source code in Admin Tools and Configuration Files (templates/, config/, model/, webapp/client, webapp/fonts, webapp/i18n, webapp/images and all subdirectories thereof) under the Apache License v2.0. -We promise that we will not enforce the copyleft provisions in AGPL v3.0 against you if your application (a) does not +We promise that we will not enforce the copyleft provisions in AGPL v3.0 against you if your application (a) does not link to the Mattermost Platform directly, but exclusively uses the Mattermost Admin Tools and Configuration Files, and -(b) you have not modified, added to or adapted the source code of Mattermost in a way that results in the creation of +(b) you have not modified, added to or adapted the source code of Mattermost in a way that results in the creation of a “modified version” or “work based on” Mattermost as these terms are defined in the AGPL v3.0 license. MATTERMOST TRADEMARK GUIDELINES -Your use of the mark Mattermost is subject to Mattermost, Inc's prior written approval and our organization’s Trademark -Standards of Use at http://www.mattermost.org/trademark-standards-of-use/. For trademark approval or any questions -you have about using these trademarks, please email trademark@mattermost.com +Your use of the mark Mattermost is subject to Mattermost, Inc's prior written approval and our organization’s Trademark +Standards of Use at http://www.mattermost.org/trademark-standards-of-use/. For trademark approval or any questions +you have about using these trademarks, please email trademark@mattermost.com ------------------------------------------------------------------------------------------------------------------------------ - + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/vendor/github.com/mattermost/platform/einterfaces/account_migration.go b/vendor/github.com/mattermost/platform/einterfaces/account_migration.go index 4824de6d..c9534ab6 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/account_migration.go +++ b/vendor/github.com/mattermost/platform/einterfaces/account_migration.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package einterfaces @@ -6,7 +6,7 @@ package einterfaces import "github.com/mattermost/platform/model" type AccountMigrationInterface interface { - MigrateToLdap(fromAuthService string, forignUserFieldNameToMatch string) *model.AppError + MigrateToLdap(fromAuthService string, forignUserFieldNameToMatch string, force bool) *model.AppError } var theAccountMigrationInterface AccountMigrationInterface diff --git a/vendor/github.com/mattermost/platform/einterfaces/brand.go b/vendor/github.com/mattermost/platform/einterfaces/brand.go index 7c15659b..f4e16eb0 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/brand.go +++ b/vendor/github.com/mattermost/platform/einterfaces/brand.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package einterfaces diff --git a/vendor/github.com/mattermost/platform/einterfaces/cluster.go b/vendor/github.com/mattermost/platform/einterfaces/cluster.go index b7ba5514..096a775f 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/cluster.go +++ b/vendor/github.com/mattermost/platform/einterfaces/cluster.go @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package einterfaces @@ -7,26 +7,19 @@ import ( "github.com/mattermost/platform/model" ) +type ClusterMessageHandler func(msg *model.ClusterMessage) + type ClusterInterface interface { StartInterNodeCommunication() StopInterNodeCommunication() + RegisterClusterMessageHandler(event string, crm ClusterMessageHandler) + GetClusterId() string GetClusterInfos() []*model.ClusterInfo + SendClusterMessage(cluster *model.ClusterMessage) + NotifyMsg(buf []byte) GetClusterStats() ([]*model.ClusterStats, *model.AppError) - ClearSessionCacheForUser(userId string) - InvalidateCacheForUser(userId string) - InvalidateCacheForChannel(channelId string) - InvalidateCacheForChannelByName(teamId, name string) - InvalidateCacheForChannelMembers(channelId string) - InvalidateCacheForChannelMembersNotifyProps(channelId string) - InvalidateCacheForChannelPosts(channelId string) - InvalidateCacheForWebhook(webhookId string) - InvalidateCacheForReactions(postId string) - Publish(event *model.WebSocketEvent) - UpdateStatus(status *model.Status) - GetLogs() ([]string, *model.AppError) - GetClusterId() string + GetLogs(page, perPage int) ([]string, *model.AppError) ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError - InvalidateAllCaches() *model.AppError } var theClusterInterface ClusterInterface diff --git a/vendor/github.com/mattermost/platform/einterfaces/compliance.go b/vendor/github.com/mattermost/platform/einterfaces/compliance.go index 2e72c67d..b7c087e8 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/compliance.go +++ b/vendor/github.com/mattermost/platform/einterfaces/compliance.go @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package einterfaces diff --git a/vendor/github.com/mattermost/platform/einterfaces/elasticsearch.go b/vendor/github.com/mattermost/platform/einterfaces/elasticsearch.go new file mode 100644 index 00000000..011b259b --- /dev/null +++ b/vendor/github.com/mattermost/platform/einterfaces/elasticsearch.go @@ -0,0 +1,25 @@ +// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package einterfaces + +import "github.com/mattermost/platform/model" + +type ElasticsearchInterface interface { + Start() *model.AppError + IndexPost(post *model.Post, teamId string) *model.AppError + SearchPosts(channels *model.ChannelList, searchParams []*model.SearchParams) ([]string, *model.AppError) + DeletePost(post *model.Post) *model.AppError + TestConfig(cfg *model.Config) *model.AppError + PurgeIndexes() *model.AppError +} + +var theElasticsearchInterface ElasticsearchInterface + +func RegisterElasticsearchInterface(newInterface ElasticsearchInterface) { + theElasticsearchInterface = newInterface +} + +func GetElasticsearchInterface() ElasticsearchInterface { + return theElasticsearchInterface +} diff --git a/vendor/github.com/mattermost/platform/einterfaces/emoji.go b/vendor/github.com/mattermost/platform/einterfaces/emoji.go index f276f6a3..45d1432d 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/emoji.go +++ b/vendor/github.com/mattermost/platform/einterfaces/emoji.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package einterfaces diff --git a/vendor/github.com/mattermost/platform/einterfaces/jobs/data_retention.go b/vendor/github.com/mattermost/platform/einterfaces/jobs/data_retention.go new file mode 100644 index 00000000..442f667f --- /dev/null +++ b/vendor/github.com/mattermost/platform/einterfaces/jobs/data_retention.go @@ -0,0 +1,23 @@ +// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package jobs + +import ( + "github.com/mattermost/platform/model" +) + +type DataRetentionInterface interface { + MakeWorker() model.Worker + MakeScheduler() model.Scheduler +} + +var theDataRetentionInterface DataRetentionInterface + +func RegisterDataRetentionInterface(newInterface DataRetentionInterface) { + theDataRetentionInterface = newInterface +} + +func GetDataRetentionInterface() DataRetentionInterface { + return theDataRetentionInterface +} diff --git a/vendor/github.com/mattermost/platform/einterfaces/jobs/elasticsearch.go b/vendor/github.com/mattermost/platform/einterfaces/jobs/elasticsearch.go new file mode 100644 index 00000000..6d6dbe89 --- /dev/null +++ b/vendor/github.com/mattermost/platform/einterfaces/jobs/elasticsearch.go @@ -0,0 +1,22 @@ +// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package jobs + +import ( + "github.com/mattermost/platform/model" +) + +type ElasticsearchIndexerInterface interface { + MakeWorker() model.Worker +} + +var theElasticsearchIndexerInterface ElasticsearchIndexerInterface + +func RegisterElasticsearchIndexerInterface(newInterface ElasticsearchIndexerInterface) { + theElasticsearchIndexerInterface = newInterface +} + +func GetElasticsearchIndexerInterface() ElasticsearchIndexerInterface { + return theElasticsearchIndexerInterface +} diff --git a/vendor/github.com/mattermost/platform/einterfaces/ldap.go b/vendor/github.com/mattermost/platform/einterfaces/ldap.go index f50ea277..721c8d30 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/ldap.go +++ b/vendor/github.com/mattermost/platform/einterfaces/ldap.go @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package einterfaces diff --git a/vendor/github.com/mattermost/platform/einterfaces/metrics.go b/vendor/github.com/mattermost/platform/einterfaces/metrics.go index cc2eea97..e1ef9c15 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/metrics.go +++ b/vendor/github.com/mattermost/platform/einterfaces/metrics.go @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package einterfaces @@ -33,6 +33,7 @@ type MetricsInterface interface { IncrementMemCacheHitCounterSession() IncrementWebsocketEvent(eventType string) + IncrementWebSocketBroadcast(eventType string) AddMemCacheHitCounter(cacheName string, amount float64) AddMemCacheMissCounter(cacheName string, amount float64) diff --git a/vendor/github.com/mattermost/platform/einterfaces/mfa.go b/vendor/github.com/mattermost/platform/einterfaces/mfa.go index 4830d261..e1b6ecbc 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/mfa.go +++ b/vendor/github.com/mattermost/platform/einterfaces/mfa.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package einterfaces diff --git a/vendor/github.com/mattermost/platform/einterfaces/oauthproviders.go b/vendor/github.com/mattermost/platform/einterfaces/oauthproviders.go index c2ea8c72..b58e8307 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/oauthproviders.go +++ b/vendor/github.com/mattermost/platform/einterfaces/oauthproviders.go @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package einterfaces diff --git a/vendor/github.com/mattermost/platform/einterfaces/saml.go b/vendor/github.com/mattermost/platform/einterfaces/saml.go index 478cf8a6..3e020891 100644 --- a/vendor/github.com/mattermost/platform/einterfaces/saml.go +++ b/vendor/github.com/mattermost/platform/einterfaces/saml.go @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package einterfaces @@ -10,7 +10,7 @@ import ( type SamlInterface interface { ConfigureSP() *model.AppError BuildRequest(relayState string) (*model.SamlAuthRequest, *model.AppError) - DoLogin(encodedXML string, relayState map[string]string, siteURL string) (*model.User, *model.AppError) + DoLogin(encodedXML string, relayState map[string]string) (*model.User, *model.AppError) GetMetadata() (string, *model.AppError) } |