Versions in this module Expand all Collapse all v1 v1.4.0 Jan 14, 2016 Changes in this version + const BTEST_TEAM_DISPLAY_NAME + const BTEST_TEAM_EMAIL + const BTEST_TEAM_NAME + const BTEST_TEAM_TYPE + const BTEST_USER_EMAIL + const BTEST_USER_NAME + const BTEST_USER_PASSWORD + const CHANNEL_TYPE + const EXPORT_CHANNELS_FOLDER + const EXPORT_CHANNEL_MEMBERS_FOLDER + const EXPORT_FILENAME + const EXPORT_LOCAL_STORAGE_FOLDER + const EXPORT_OPTIONS_FILE + const EXPORT_PATH + const EXPORT_POSTS_FOLDER + const EXPORT_TEAMS_FOLDER + const EXPORT_USERS_FOLDER + const FUZZ_USER_EMAIL_PREFIX_LEN + const MAX_SIZE + const MaxImageSize + const PING_PERIOD + const PONG_WAIT + const REDIS_WAIT + const RotatedCCW + const RotatedCCWMirrored + const RotatedCW + const RotatedCWMirrored + const USER_PASSWORD + const Upright + const UprightMirrored + const UpsideDown + const UpsideDownMirrored + const WRITE_WAIT + var CHANNEL_DISPLAY_NAME_LEN = utils.Range + var CHANNEL_NAME_LEN = utils.Range + var POST_HASHTAGS_NUM = utils.Range + var POST_MENTIONS_NUM = utils.Range + var POST_MESSAGE_LEN = utils.Range + var ServerTemplates *template.Template + var TEAM_DOMAIN_NAME_LEN = utils.Range + var TEAM_EMAIL_LEN = utils.Range + var TEAM_NAME_LEN = utils.Range + var TEST_IMAGE_FILENAMES = []string + var USER_EMAIL_LEN = utils.Range + var USER_NAME_LEN = utils.Range + func AddSessionToCache(session *model.Session) + func AddUserToChannel(user *model.User, channel *model.Channel) (*model.ChannelMember, *model.AppError) + func ApiAdminSystemRequired(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func ApiAppHandler(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func ApiUserRequired(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func ApiUserRequiredActivity(h func(*Context, http.ResponseWriter, *http.Request), isUserActivity bool) http.Handler + func AppHandler(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func AppHandlerIndependent(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func AuthorizeOAuthUser(service, code, state, redirectUri string) (io.ReadCloser, *model.Team, map[string]string, *model.AppError) + func CompleteSwitchWithOAuth(c *Context, w http.ResponseWriter, r *http.Request, service string, ...) + func CreateBasicUser(client *model.Client) *model.AppError + func CreateChannel(c *Context, channel *model.Channel, addMember bool) (*model.Channel, *model.AppError) + func CreateDefaultChannels(c *Context, teamId string) ([]*model.Channel, *model.AppError) + func CreateDirectChannel(c *Context, otherUserId string) (*model.Channel, *model.AppError) + func CreateOAuthUser(c *Context, w http.ResponseWriter, r *http.Request, service string, ...) *model.User + func CreatePost(c *Context, post *model.Post, triggerWebhooks bool) (*model.Post, *model.AppError) + func CreateTeam(c *Context, team *model.Team) *model.Team + func CreateUser(team *model.Team, user *model.User) (*model.User, *model.AppError) + func CreateWebhookPost(c *Context, channelId, text, overrideUsername, overrideIconUrl string, ...) (*model.Post, *model.AppError) + func ExportChannels(writer ExportWriter, options *ExportOptions, teamId string) *model.AppError + func ExportLocalStorage(writer ExportWriter, options *ExportOptions, teamId string) *model.AppError + func ExportPosts(writer ExportWriter, options *ExportOptions, channelId string) *model.AppError + func ExportTeams(writer ExportWriter, options *ExportOptions) *model.AppError + func ExportToFile(options *ExportOptions) (link string, err *model.AppError) + func ExportToWriter(w io.Writer, options *ExportOptions) *model.AppError + func ExportUsers(writer ExportWriter, options *ExportOptions, teamId string) *model.AppError + func FindMultiSessionForTeamId(r *http.Request, teamId string) (int64, *model.Session) + func FindTeamByName(c *Context, name string, all string) bool + func GetAuthData(code string) *model.AuthData + func GetAuthorizationCode(c *Context, service, teamName string, props map[string]string, ...) (string, *model.AppError) + func GetIpAddress(r *http.Request) string + func GetMultiSessionCookieTokens(r *http.Request) []string + func GetProtocol(r *http.Request) string + func GetSession(token string) *model.Session + func Handle404(w http.ResponseWriter, r *http.Request) + func HandleEtag(etag string, w http.ResponseWriter, r *http.Request) bool + func ImportChannel(channel *model.Channel) *model.Channel + func ImportPost(post *model.Post) + func ImportUser(user *model.User) *model.User + func InitAdmin(r *mux.Router) + func InitApi() + func InitChannel(r *mux.Router) + func InitCommand(r *mux.Router) + func InitFile(r *mux.Router) + func InitOAuth(r *mux.Router) + func InitPost(r *mux.Router) + func InitPreference(r *mux.Router) + func InitTeam(r *mux.Router) + func InitUser(r *mux.Router) + func InitWebSocket(r *mux.Router) + func InitWebhook(r *mux.Router) + func InviteMembers(c *Context, team *model.Team, user *model.User, invites []string) + func IsBetaDomain(r *http.Request) bool + func IsPrivateIpAddress(ipAddress string) bool + func IsTestDomain(r *http.Request) bool + func IsUsernameTaken(name string, teamId string) bool + func IsVerifyHashRequired(user *model.User, team *model.Team, hash string) bool + func JoinChannel(c *Context, channelId string, role string) + func JoinDefaultChannels(user *model.User, channelRole string) *model.AppError + func Login(c *Context, w http.ResponseWriter, r *http.Request, user *model.User, ...) + func LoginByEmail(c *Context, w http.ResponseWriter, r *http.Request, ...) *model.User + func LoginById(c *Context, w http.ResponseWriter, r *http.Request, ...) *model.User + func LoginByOAuth(c *Context, w http.ResponseWriter, r *http.Request, service string, ...) *model.User + func Logout(c *Context, w http.ResponseWriter, r *http.Request) + func NewServer() + func PermanentDeleteTeam(c *Context, team *model.Team) *model.AppError + func PermanentDeleteUser(c *Context, user *model.User) *model.AppError + func PostUpdateChannelHeaderMessageAndForget(c *Context, channelId string, oldChannelHeader, newChannelHeader string) + func PostUserAddRemoveMessageAndForget(c *Context, channelId string, message string) + func PublishAndForget(message *model.Message) + func RemoveUserFromChannel(userIdToRemove string, removerUserId string, channel *model.Channel) *model.AppError + func RenderWebError(err *model.AppError, w http.ResponseWriter, r *http.Request) + func RevokeAccessToken(token string) *model.AppError + func RevokeAllSession(c *Context, userId string) + func RevokeSessionById(c *Context, sessionId string) + func SendEmailChangeVerifyEmailAndForget(userId, newUserEmail, teamName, teamDisplayName, siteURL, teamURL string) + func SendVerifyEmailAndForget(userId, userEmail, teamName, teamDisplayName, siteURL, teamURL string) + func ShouldSendEvent(webCon *WebConn, msg *model.Message) bool + func SlackAddChannels(teamId string, slackchannels []SlackChannel, posts map[string][]SlackPost, ...) map[string]*model.Channel + func SlackAddPosts(channel *model.Channel, posts []SlackPost, users map[string]*model.User) + func SlackAddUsers(teamId string, slackusers []SlackUser, log *bytes.Buffer) map[string]*model.User + func SlackConvertChannelName(channelName string) string + func SlackConvertTimeStamp(ts string) int64 + func SlackImport(fileData multipart.File, fileSize int64, teamID string) (*model.AppError, *bytes.Buffer) + func StartServer() + func StopServer() + func UpdateActive(c *Context, user *model.User, active bool) *model.User + func UpdateChannelAccessCache(teamId, userId, channelId string) + func UpdateChannelAccessCacheAndForget(teamId, userId, channelId string) + func UpdateRoles(c *Context, user *model.User, roles string) *model.User + func UserRequired(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + type AutoChannelCreator struct + ChannelType string + DisplayNameCharset string + DisplayNameLen utils.Range + Fuzzy bool + NameCharset string + NameLen utils.Range + func NewAutoChannelCreator(client *model.Client, teamID string) *AutoChannelCreator + func (cfg *AutoChannelCreator) CreateTestChannels(num utils.Range) ([]*model.Channel, bool) + type AutoPostCreator struct + Fuzzy bool + HasImage bool + ImageFilenames []string + Mentions utils.Range + Tags utils.Range + TextLength utils.Range + Users []string + func NewAutoPostCreator(client *model.Client, channelid string) *AutoPostCreator + func (cfg *AutoPostCreator) CreateRandomPost() (*model.Post, bool) + func (cfg *AutoPostCreator) CreateTestPosts(rangePosts utils.Range) ([]*model.Post, bool) + func (cfg *AutoPostCreator) UploadTestFile() ([]string, bool) + type AutoTeamCreator struct + DomainCharset string + DomainLength utils.Range + EmailCharset string + EmailLength utils.Range + Fuzzy bool + NameCharset string + NameLength utils.Range + func NewAutoTeamCreator(client *model.Client) *AutoTeamCreator + func (cfg *AutoTeamCreator) CreateTestTeams(num utils.Range) ([]*model.Team, bool) + type AutoUserCreator struct + EmailCharset string + EmailLength utils.Range + Fuzzy bool + NameCharset string + NameLength utils.Range + func NewAutoUserCreator(client *model.Client, teamID string) *AutoUserCreator + func (cfg *AutoUserCreator) CreateTestUsers(num utils.Range) ([]*model.User, bool) + type Context struct + Err *model.AppError + IpAddress string + Path string + RequestId string + Session model.Session + SessionTokenIndex int64 + func (c *Context) GetSiteURL() string + func (c *Context) GetTeamURL() string + func (c *Context) GetTeamURLFromTeam(team *model.Team) string + func (c *Context) HasPermissionsToChannel(sc store.StoreChannel, where string) bool + func (c *Context) HasPermissionsToTeam(teamId string, where string) bool + func (c *Context) HasPermissionsToUser(userId string, where string) bool + func (c *Context) HasSystemAdminPermissions(where string) bool + func (c *Context) IsSystemAdmin() bool + func (c *Context) IsTeamAdmin() bool + func (c *Context) LogAudit(extraInfo string) + func (c *Context) LogAuditWithUserId(userId, extraInfo string) + func (c *Context) LogError(err *model.AppError) + func (c *Context) RemoveSessionCookie(w http.ResponseWriter, r *http.Request) + func (c *Context) SetInvalidParam(where string, name string) + func (c *Context) SetTeamURLFromSession() + func (c *Context) SetUnknownError(where string, details string) + func (c *Context) SystemAdminRequired() + func (c *Context) UserRequired() + type ExportOptions struct + ChannelsToExport []string + ExportLocalStorage bool + TeamsToExport []string + UsersToExport []string + func ExportOptionsFromJson(data io.Reader) *ExportOptions + func (options *ExportOptions) ToJson() string + type ExportWriter interface + Create func(name string) (io.Writer, error) + type Hub struct + func (h *Hub) Broadcast(message *model.Message) + func (h *Hub) Register(webConn *WebConn) + func (h *Hub) Start() + func (h *Hub) Stop() + func (h *Hub) Unregister(webConn *WebConn) + type ImageGetResult struct + Error error + ImageData []byte + type Page struct + Channel *model.Channel + ClientCfg map[string]string + PostID string + Props map[string]string + SessionTokenIndex int64 + Team *model.Team + TemplateName string + User *model.User + type Server struct + Router *mux.Router + Store store.Store + var Srv *Server + type ServerTemplatePage Page + func NewServerTemplatePage(templateName string) *ServerTemplatePage + func (me *ServerTemplatePage) Render() string + type SlackChannel struct + Id string + Members []string + Name string + Topic map[string]string + func SlackParseChannels(data io.Reader) []SlackChannel + type SlackPost struct + BotId string + BotUsername string + Comment map[string]string + SubType string + Text string + TimeStamp string + Type string + User string + func SlackParsePosts(data io.Reader) []SlackPost + type SlackUser struct + Id string + Profile map[string]string + Username string + func SlackParseUsers(data io.Reader) []SlackUser + type TeamEnvironment struct + Channels []*model.Channel + Users []*model.User + func CreateTestEnvironmentInTeam(client *model.Client, teamID string, rangeChannels utils.Range, ...) (TeamEnvironment, bool) + type TeamHub struct + func NewTeamHub(teamId string) *TeamHub + func (h *TeamHub) Register(webConn *WebConn) + func (h *TeamHub) Start() + func (h *TeamHub) Stop() + func (h *TeamHub) Unregister(webConn *WebConn) + func (h *TeamHub) UpdateChannelAccessCache(userId string, channelId string) + type TestEnvironment struct + Environments []TeamEnvironment + Teams []*model.Team + func CreateTestEnvironmentWithTeams(client *model.Client, rangeTeams utils.Range, rangeChannels utils.Range, ...) (TestEnvironment, bool) + type WebConn struct + ChannelAccessCache map[string]bool + Send chan *model.Message + TeamId string + UserId string + WebSocket *websocket.Conn + func NewWebConn(ws *websocket.Conn, teamId string, userId string, sessionId string) *WebConn Incompatible versions in this module v4.10.10+incompatible Jun 14, 2019