Documentation
¶
Index ¶
- func RegisterOAuthProvider(name string, newProvider OAuthProvider)
- type AccountMigrationInterface
- type CloudInterface
- type ClusterInterface
- type ClusterMessageHandler
- type ComplianceInterface
- type DataRetentionInterface
- type LdapInterface
- type LicenseInterface
- type MessageExportInterface
- type MetricsInterface
- type MfaInterface
- type NotificationInterface
- type OAuthProvider
- type SamlInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterOAuthProvider ¶
func RegisterOAuthProvider(name string, newProvider OAuthProvider)
Types ¶
type CloudInterface ¶
type CloudInterface interface {
GetCloudProducts(userID string, includeLegacyProducts bool) ([]*model.Product, error)
CreateCustomerPayment(userID string) (*model.StripeSetupIntent, error)
ConfirmCustomerPayment(userID string, confirmRequest *model.ConfirmPaymentMethodRequest) error
GetCloudCustomer(userID string) (*model.CloudCustomer, error)
UpdateCloudCustomer(userID string, customerInfo *model.CloudCustomerInfo) (*model.CloudCustomer, error)
UpdateCloudCustomerAddress(userID string, address *model.Address) (*model.CloudCustomer, error)
GetSubscription(userID string) (*model.Subscription, error)
GetInvoicesForSubscription(userID string) ([]*model.Invoice, error)
GetInvoicePDF(userID, invoiceID string) ([]byte, string, error)
ChangeSubscription(userID, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error)
}
type ClusterInterface ¶
type ClusterInterface interface {
StartInterNodeCommunication()
StopInterNodeCommunication()
RegisterClusterMessageHandler(event model.ClusterEvent, crm ClusterMessageHandler)
GetClusterId() string
IsLeader() bool
// HealthScore returns a number which is indicative of how well an instance is meeting
// the soft real-time requirements of the protocol. Lower numbers are better,
// and zero means "totally healthy".
HealthScore() int
GetMyClusterInfo() *model.ClusterInfo
GetClusterInfos() []*model.ClusterInfo
SendClusterMessage(msg *model.ClusterMessage)
SendClusterMessageToNode(nodeID string, msg *model.ClusterMessage) error
NotifyMsg(buf []byte)
GetClusterStats() ([]*model.ClusterStats, *model.AppError)
GetLogs(page, perPage int) ([]string, *model.AppError)
GetPluginStatuses() (model.PluginStatuses, *model.AppError)
ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError
}
type ClusterMessageHandler ¶
type ClusterMessageHandler func(msg *model.ClusterMessage)
type ComplianceInterface ¶
type ComplianceInterface interface {
StartComplianceDailyJob()
RunComplianceJob(job *model.Compliance) *model.AppError
}
type DataRetentionInterface ¶
type DataRetentionInterface interface {
GetGlobalPolicy() (*model.GlobalRetentionPolicy, *model.AppError)
GetPolicies(offset, limit int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError)
GetPoliciesCount() (int64, *model.AppError)
GetPolicy(policyID string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)
CreatePolicy(policy *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)
PatchPolicy(patch *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)
DeletePolicy(policyID string) *model.AppError
GetTeamsForPolicy(policyID string, offset, limit int) (*model.TeamsWithCount, *model.AppError)
AddTeamsToPolicy(policyID string, teamIDs []string) *model.AppError
RemoveTeamsFromPolicy(policyID string, teamIDs []string) *model.AppError
GetChannelsForPolicy(policyID string, offset, limit int) (*model.ChannelsWithCount, *model.AppError)
AddChannelsToPolicy(policyID string, channelIDs []string) *model.AppError
RemoveChannelsFromPolicy(policyID string, channelIDs []string) *model.AppError
GetTeamPoliciesForUser(userID string, offset, limit int) (*model.RetentionPolicyForTeamList, *model.AppError)
GetChannelPoliciesForUser(userID string, offset, limit int) (*model.RetentionPolicyForChannelList, *model.AppError)
}
type LdapInterface ¶
type LdapInterface interface {
DoLogin(c *request.Context, id string, password string) (*model.User, *model.AppError)
GetUser(id string) (*model.User, *model.AppError)
GetUserAttributes(id string, attributes []string) (map[string]string, *model.AppError)
CheckPassword(id string, password string) *model.AppError
CheckPasswordAuthData(authData string, password string) *model.AppError
CheckProviderAttributes(LS *model.LdapSettings, ouser *model.User, patch *model.UserPatch) string
SwitchToLdap(userID, ldapID, ldapPassword string) *model.AppError
StartSynchronizeJob(waitForJobToFinish bool, includeRemovedMembers bool) (*model.Job, *model.AppError)
RunTest() *model.AppError
GetAllLdapUsers() ([]*model.User, *model.AppError)
MigrateIDAttribute(toAttribute string) error
GetGroup(groupUID string) (*model.Group, *model.AppError)
GetAllGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)
FirstLoginSync(c *request.Context, user *model.User, userAuthService, userAuthData, email string) *model.AppError
UpdateProfilePictureIfNecessary(model.User, model.Session)
GetADLdapIdFromSAMLId(authData string) string
GetSAMLIdFromADLdapId(authData string) string
GetVendorNameAndVendorVersion() (string, string)
}
type LicenseInterface ¶
type MessageExportInterface ¶
type MetricsInterface ¶
type MetricsInterface interface {
Register()
IncrementPostCreate()
IncrementWebhookPost()
IncrementPostSentEmail()
IncrementPostSentPush()
IncrementPostBroadcast()
IncrementPostFileAttachment(count int)
IncrementHTTPRequest()
IncrementHTTPError()
IncrementClusterRequest()
ObserveClusterRequestDuration(elapsed float64)
IncrementClusterEventType(eventType model.ClusterEvent)
IncrementLogin()
IncrementLoginFail()
IncrementEtagHitCounter(route string)
IncrementEtagMissCounter(route string)
IncrementMemCacheHitCounter(cacheName string)
IncrementMemCacheMissCounter(cacheName string)
IncrementMemCacheInvalidationCounter(cacheName string)
IncrementMemCacheMissCounterSession()
IncrementMemCacheHitCounterSession()
IncrementMemCacheInvalidationCounterSession()
IncrementWebsocketEvent(eventType string)
IncrementWebSocketBroadcast(eventType string)
IncrementWebSocketBroadcastBufferSize(hub string, amount float64)
DecrementWebSocketBroadcastBufferSize(hub string, amount float64)
IncrementWebSocketBroadcastUsersRegistered(hub string, amount float64)
DecrementWebSocketBroadcastUsersRegistered(hub string, amount float64)
IncrementWebsocketReconnectEvent(eventType string)
AddMemCacheHitCounter(cacheName string, amount float64)
AddMemCacheMissCounter(cacheName string, amount float64)
IncrementPostsSearchCounter()
ObservePostsSearchDuration(elapsed float64)
IncrementFilesSearchCounter()
ObserveFilesSearchDuration(elapsed float64)
ObserveStoreMethodDuration(method, success string, elapsed float64)
ObserveAPIEndpointDuration(endpoint, method, statusCode string, elapsed float64)
IncrementPostIndexCounter()
IncrementFileIndexCounter()
IncrementUserIndexCounter()
IncrementChannelIndexCounter()
ObservePluginHookDuration(pluginID, hookName string, success bool, elapsed float64)
ObservePluginMultiHookIterationDuration(pluginID string, elapsed float64)
ObservePluginMultiHookDuration(elapsed float64)
ObservePluginAPIDuration(pluginID, apiName string, success bool, elapsed float64)
ObserveEnabledUsers(users int64)
GetLoggerMetricsCollector() mlog.MetricsCollector
IncrementRemoteClusterMsgSentCounter(remoteID string)
IncrementRemoteClusterMsgReceivedCounter(remoteID string)
IncrementRemoteClusterMsgErrorsCounter(remoteID string, timeout bool)
ObserveRemoteClusterPingDuration(remoteID string, elapsed float64)
ObserveRemoteClusterClockSkew(remoteID string, skew float64)
IncrementRemoteClusterConnStateChangeCounter(remoteID string, online bool)
IncrementJobActive(jobType string)
DecrementJobActive(jobType string)
SetReplicaLagAbsolute(node string, value float64)
SetReplicaLagTime(node string, value float64)
}
type MfaInterface ¶
type NotificationInterface ¶
type NotificationInterface interface {
GetNotificationMessage(ack *model.PushNotificationAck, userID string) (*model.PushNotification, *model.AppError)
CheckLicense() *model.AppError
}
type OAuthProvider ¶
type OAuthProvider interface {
GetUserFromJSON(data io.Reader, tokenUser *model.User) (*model.User, error)
GetSSOSettings(config *model.Config, service string) (*model.SSOSettings, error)
GetUserFromIdToken(idToken string) (*model.User, error)
IsSameUser(dbUser, oAuthUser *model.User) bool
}
func GetOAuthProvider ¶
func GetOAuthProvider(name string) OAuthProvider
type SamlInterface ¶
type SamlInterface interface {
ConfigureSP() error
BuildRequest(relayState string) (*model.SamlAuthRequest, *model.AppError)
DoLogin(c *request.Context, encodedXML string, relayState map[string]string) (*model.User, *model.AppError)
GetMetadata() (string, *model.AppError)
CheckProviderAttributes(SS *model.SamlSettings, ouser *model.User, patch *model.UserPatch) string
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.