einterfaces

package
v4.4.0-rc2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2017 License: AGPL-3.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBrandInterface

func RegisterBrandInterface(newInterface BrandInterface)

func RegisterElasticsearchInterface

func RegisterElasticsearchInterface(newInterface ElasticsearchInterface)

func RegisterEmojiInterface

func RegisterEmojiInterface(newInterface EmojiInterface)

func RegisterOauthProvider

func RegisterOauthProvider(name string, newProvider OauthProvider)

Types

type AccountMigrationInterface

type AccountMigrationInterface interface {
	MigrateToLdap(fromAuthService string, forignUserFieldNameToMatch string, force bool) *model.AppError
}

type BrandInterface

type BrandInterface interface {
	SaveBrandImage(*multipart.FileHeader) *model.AppError
	GetBrandImage() ([]byte, *model.AppError)
}

func GetBrandInterface

func GetBrandInterface() BrandInterface

type ClusterInterface

type ClusterInterface interface {
	StartInterNodeCommunication()
	StopInterNodeCommunication()
	RegisterClusterMessageHandler(event string, crm ClusterMessageHandler)
	GetClusterId() string
	IsLeader() bool
	GetMyClusterInfo() *model.ClusterInfo
	GetClusterInfos() []*model.ClusterInfo
	SendClusterMessage(cluster *model.ClusterMessage)
	NotifyMsg(buf []byte)
	GetClusterStats() ([]*model.ClusterStats, *model.AppError)
	GetLogs(page, perPage int) ([]string, *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 {
	GetPolicy() (*model.DataRetentionPolicy, *model.AppError)
}

type ElasticsearchInterface

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
	DataRetentionDeleteIndexes(cutoff time.Time) *model.AppError
}

func GetElasticsearchInterface

func GetElasticsearchInterface() ElasticsearchInterface

type EmojiInterface

type EmojiInterface interface {
	CanUserCreateEmoji(string, []*model.TeamMember) bool
}

func GetEmojiInterface

func GetEmojiInterface() EmojiInterface

type LdapInterface

type LdapInterface interface {
	DoLogin(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
	SwitchToLdap(userId, ldapId, ldapPassword string) *model.AppError
	ValidateFilter(filter string) *model.AppError
	StartSynchronizeJob(waitForJobToFinish bool) (*model.Job, *model.AppError)
	RunTest() *model.AppError
	GetAllLdapUsers() ([]*model.User, *model.AppError)
	UserFromLdapUser(ldapUser *ldap.Entry) *model.User
	UserHasUpdateFromLdap(existingUser *model.User, currentLdapUser *model.User) bool
	UpdateLocalLdapUser(existingUser *model.User, currentLdapUser *model.User) *model.User
}

type MetricsInterface

type MetricsInterface interface {
	StartServer()
	StopServer()

	IncrementPostCreate()
	IncrementWebhookPost()
	IncrementPostSentEmail()
	IncrementPostSentPush()
	IncrementPostBroadcast()
	IncrementPostFileAttachment(count int)

	IncrementHttpRequest()
	IncrementHttpError()
	ObserveHttpRequestDuration(elapsed float64)

	IncrementClusterRequest()
	ObserveClusterRequestDuration(elapsed float64)

	IncrementLogin()
	IncrementLoginFail()

	IncrementEtagHitCounter(route string)
	IncrementEtagMissCounter(route string)

	IncrementMemCacheHitCounter(cacheName string)
	IncrementMemCacheMissCounter(cacheName string)
	IncrementMemCacheMissCounterSession()
	IncrementMemCacheHitCounterSession()

	IncrementWebsocketEvent(eventType string)
	IncrementWebSocketBroadcast(eventType string)

	AddMemCacheHitCounter(cacheName string, amount float64)
	AddMemCacheMissCounter(cacheName string, amount float64)

	IncrementPostsSearchCounter()
	ObservePostsSearchDuration(elapsed float64)
}

type MfaInterface

type MfaInterface interface {
	GenerateSecret(user *model.User) (string, []byte, *model.AppError)
	Activate(user *model.User, token string) *model.AppError
	Deactivate(userId string) *model.AppError
	ValidateToken(secret, token string) (bool, *model.AppError)
}

type OauthProvider

type OauthProvider interface {
	GetIdentifier() string
	GetUserFromJson(data io.Reader) *model.User
	GetAuthDataFromJson(data io.Reader) string
}

func GetOauthProvider

func GetOauthProvider(name string) OauthProvider

type SamlInterface

type SamlInterface interface {
	ConfigureSP() *model.AppError
	BuildRequest(relayState string) (*model.SamlAuthRequest, *model.AppError)
	DoLogin(encodedXML string, relayState map[string]string) (*model.User, *model.AppError)
	GetMetadata() (string, *model.AppError)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL