* Update files in /app * Update files in /plugin * Update files in /store * Update files in /utils * Update files in /web * Update store.go * Update command_response.go * check-mocks and check-store-layer checks * Fix build errors * Revert "Fix build errors" This reverts commit 4ee38c3d0bf7bd7d8386f46f0985a0d03245a1d4. * Update .golangci.yml * make i18n-extract and make i18n-check * Commit suggestions * check-mocks and check-store-layers * Update en.json * Update product_notices.go * Update main.go * Fix translations * Regenerate mocks Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Claudio Costa <cstcld91@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5f190b5624
Коммит
6356e906e0
@@ -159,7 +159,7 @@ func (s *Server) HTMLTemplates() *template.Template {
|
||||
}
|
||||
|
||||
func (a *App) Handle404(w http.ResponseWriter, r *http.Request) {
|
||||
ipAddress := utils.GetIpAddress(r, a.Config().ServiceSettings.TrustedProxyIPHeader)
|
||||
ipAddress := utils.GetIPAddress(r, a.Config().ServiceSettings.TrustedProxyIPHeader)
|
||||
mlog.Debug("not found handler triggered", mlog.String("path", r.URL.Path), mlog.Int("code", 404), mlog.String("ip", ipAddress))
|
||||
|
||||
if *a.Config().ServiceSettings.WebserverMode == "disabled" {
|
||||
|
||||
16
app/bot.go
16
app/bot.go
@@ -198,7 +198,7 @@ func (a *App) PatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot,
|
||||
var appErr *model.AppError
|
||||
switch {
|
||||
case errors.As(nErr, &nfErr):
|
||||
return nil, model.MakeBotNotFoundError(nfErr.Id)
|
||||
return nil, model.MakeBotNotFoundError(nfErr.ID)
|
||||
case errors.As(nErr, &appErr): // in case we haven't converted to plain error.
|
||||
return nil, appErr
|
||||
default: // last fallback in case it doesn't map to an existing app error.
|
||||
@@ -215,7 +215,7 @@ func (a *App) GetBot(botUserId string, includeDeleted bool) (*model.Bot, *model.
|
||||
var nfErr *store.ErrNotFound
|
||||
switch {
|
||||
case errors.As(err, &nfErr):
|
||||
return nil, model.MakeBotNotFoundError(nfErr.Id)
|
||||
return nil, model.MakeBotNotFoundError(nfErr.ID)
|
||||
default: // last fallback in case it doesn't map to an existing app error.
|
||||
return nil, model.NewAppError("GetBot", "app.bot.getbot.internal_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
@@ -254,7 +254,7 @@ func (a *App) UpdateBotActive(botUserId string, active bool) (*model.Bot, *model
|
||||
var nfErr *store.ErrNotFound
|
||||
switch {
|
||||
case errors.As(nErr, &nfErr):
|
||||
return nil, model.MakeBotNotFoundError(nfErr.Id)
|
||||
return nil, model.MakeBotNotFoundError(nfErr.ID)
|
||||
default: // last fallback in case it doesn't map to an existing app error.
|
||||
return nil, model.NewAppError("UpdateBotActive", "app.bot.getbot.internal_error", nil, nErr.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
@@ -276,7 +276,7 @@ func (a *App) UpdateBotActive(botUserId string, active bool) (*model.Bot, *model
|
||||
var appErr *model.AppError
|
||||
switch {
|
||||
case errors.As(nErr, &nfErr):
|
||||
return nil, model.MakeBotNotFoundError(nfErr.Id)
|
||||
return nil, model.MakeBotNotFoundError(nfErr.ID)
|
||||
case errors.As(nErr, &appErr): // in case we haven't converted to plain error.
|
||||
return nil, appErr
|
||||
default: // last fallback in case it doesn't map to an existing app error.
|
||||
@@ -314,7 +314,7 @@ func (a *App) UpdateBotOwner(botUserId, newOwnerId string) (*model.Bot, *model.A
|
||||
var nfErr *store.ErrNotFound
|
||||
switch {
|
||||
case errors.As(err, &nfErr):
|
||||
return nil, model.MakeBotNotFoundError(nfErr.Id)
|
||||
return nil, model.MakeBotNotFoundError(nfErr.ID)
|
||||
default: // last fallback in case it doesn't map to an existing app error.
|
||||
return nil, model.NewAppError("UpdateBotOwner", "app.bot.getbot.internal_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
@@ -328,7 +328,7 @@ func (a *App) UpdateBotOwner(botUserId, newOwnerId string) (*model.Bot, *model.A
|
||||
var appErr *model.AppError
|
||||
switch {
|
||||
case errors.As(err, &nfErr):
|
||||
return nil, model.MakeBotNotFoundError(nfErr.Id)
|
||||
return nil, model.MakeBotNotFoundError(nfErr.ID)
|
||||
case errors.As(err, &appErr): // in case we haven't converted to plain error.
|
||||
return nil, appErr
|
||||
default: // last fallback in case it doesn't map to an existing app error.
|
||||
@@ -534,7 +534,7 @@ func (a *App) SetBotIconImage(botUserId string, file io.ReadSeeker) *model.AppEr
|
||||
var appErr *model.AppError
|
||||
switch {
|
||||
case errors.As(err, &nfErr):
|
||||
return model.MakeBotNotFoundError(nfErr.Id)
|
||||
return model.MakeBotNotFoundError(nfErr.ID)
|
||||
case errors.As(err, &appErr): // in case we haven't converted to plain error.
|
||||
return appErr
|
||||
default: // last fallback in case it doesn't map to an existing app error.
|
||||
@@ -568,7 +568,7 @@ func (a *App) DeleteBotIconImage(botUserId string) *model.AppError {
|
||||
var appErr *model.AppError
|
||||
switch {
|
||||
case errors.As(err, &nfErr):
|
||||
return model.MakeBotNotFoundError(nfErr.Id)
|
||||
return model.MakeBotNotFoundError(nfErr.ID)
|
||||
case errors.As(err, &appErr): // in case we haven't converted to plain error.
|
||||
return appErr
|
||||
default: // last fallback in case it doesn't map to an existing app error.
|
||||
|
||||
@@ -314,7 +314,7 @@ func (a *App) CreateChannel(channel *model.Channel, addMember bool) (*model.Chan
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.ChannelHasBeenCreated(pluginContext, sc)
|
||||
return true
|
||||
}, plugin.ChannelHasBeenCreatedId)
|
||||
}, plugin.ChannelHasBeenCreatedID)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ func (a *App) handleCreationEvent(userID, otherUserID string, channel *model.Cha
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.ChannelHasBeenCreated(pluginContext, channel)
|
||||
return true
|
||||
}, plugin.ChannelHasBeenCreatedId)
|
||||
}, plugin.ChannelHasBeenCreatedID)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1441,7 +1441,7 @@ func (a *App) AddChannelMember(userID string, channel *model.Channel, userReques
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.UserHasJoinedChannel(pluginContext, cm, userRequestor)
|
||||
return true
|
||||
}, plugin.UserHasJoinedChannelId)
|
||||
}, plugin.UserHasJoinedChannelID)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1950,7 +1950,7 @@ func (a *App) JoinChannel(channel *model.Channel, userID string) *model.AppError
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.UserHasJoinedChannel(pluginContext, cm, nil)
|
||||
return true
|
||||
}, plugin.UserHasJoinedChannelId)
|
||||
}, plugin.UserHasJoinedChannelID)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2248,7 +2248,7 @@ func (a *App) removeUserFromChannel(userIDToRemove string, removerUserId string,
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.UserHasLeftChannel(pluginContext, cm, actorUser)
|
||||
return true
|
||||
}, plugin.UserHasLeftChannelId)
|
||||
}, plugin.UserHasLeftChannelID)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
10
app/email.go
10
app/email.go
@@ -298,7 +298,7 @@ func (es *EmailService) SendPasswordResetEmail(email string, token *model.Token,
|
||||
bodyPage := es.newEmailTemplate("reset_body", locale)
|
||||
bodyPage.Props["SiteURL"] = siteURL
|
||||
bodyPage.Props["Title"] = T("api.templates.reset_body.title")
|
||||
bodyPage.Props["Info1"] = utils.TranslateAsHtml(T, "api.templates.reset_body.info1", nil)
|
||||
bodyPage.Props["Info1"] = utils.TranslateAsHTML(T, "api.templates.reset_body.info1", nil)
|
||||
bodyPage.Props["Info2"] = T("api.templates.reset_body.info2")
|
||||
bodyPage.Props["ResetUrl"] = link
|
||||
bodyPage.Props["Button"] = T("api.templates.reset_body.button")
|
||||
@@ -362,10 +362,10 @@ func (es *EmailService) SendInviteEmails(team *model.Team, senderName string, se
|
||||
bodyPage := es.newEmailTemplate("invite_body", "")
|
||||
bodyPage.Props["SiteURL"] = siteURL
|
||||
bodyPage.Props["Title"] = utils.T("api.templates.invite_body.title")
|
||||
bodyPage.Html["Info"] = utils.TranslateAsHtml(utils.T, "api.templates.invite_body.info",
|
||||
bodyPage.HTML["Info"] = utils.TranslateAsHTML(utils.T, "api.templates.invite_body.info",
|
||||
map[string]interface{}{"SenderName": senderName, "TeamDisplayName": team.DisplayName})
|
||||
bodyPage.Props["Button"] = utils.T("api.templates.invite_body.button")
|
||||
bodyPage.Html["ExtraInfo"] = utils.TranslateAsHtml(utils.T, "api.templates.invite_body.extra_info",
|
||||
bodyPage.HTML["ExtraInfo"] = utils.TranslateAsHTML(utils.T, "api.templates.invite_body.extra_info",
|
||||
map[string]interface{}{"TeamDisplayName": team.DisplayName})
|
||||
bodyPage.Props["TeamURL"] = siteURL + "/" + team.Name
|
||||
|
||||
@@ -421,7 +421,7 @@ func (es *EmailService) sendGuestInviteEmails(team *model.Team, channels []*mode
|
||||
bodyPage := es.newEmailTemplate("invite_body", "")
|
||||
bodyPage.Props["SiteURL"] = siteURL
|
||||
bodyPage.Props["Title"] = utils.T("api.templates.invite_body.title")
|
||||
bodyPage.Html["Info"] = utils.TranslateAsHtml(utils.T, "api.templates.invite_body_guest.info",
|
||||
bodyPage.HTML["Info"] = utils.TranslateAsHTML(utils.T, "api.templates.invite_body_guest.info",
|
||||
map[string]interface{}{"SenderName": senderName, "TeamDisplayName": team.DisplayName})
|
||||
bodyPage.Props["Button"] = utils.T("api.templates.invite_body.button")
|
||||
bodyPage.Props["SenderName"] = senderName
|
||||
@@ -430,7 +430,7 @@ func (es *EmailService) sendGuestInviteEmails(team *model.Team, channels []*mode
|
||||
if message != "" {
|
||||
bodyPage.Props["Message"] = message
|
||||
}
|
||||
bodyPage.Html["ExtraInfo"] = utils.TranslateAsHtml(utils.T, "api.templates.invite_body.extra_info",
|
||||
bodyPage.HTML["ExtraInfo"] = utils.TranslateAsHTML(utils.T, "api.templates.invite_body.extra_info",
|
||||
map[string]interface{}{"TeamDisplayName": team.DisplayName})
|
||||
bodyPage.Props["TeamURL"] = siteURL + "/" + team.Name
|
||||
|
||||
|
||||
@@ -1000,7 +1000,7 @@ func (a *App) DoUploadFileExpectModification(now time.Time, rawTeamId string, ra
|
||||
}
|
||||
|
||||
return true
|
||||
}, plugin.FileWillBeUploadedId)
|
||||
}, plugin.FileWillBeUploadedID)
|
||||
if rejectionError != nil {
|
||||
return nil, data, rejectionError
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ func (a *App) DoLogin(w http.ResponseWriter, r *http.Request, user *model.User,
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
rejectionReason = hooks.UserWillLogIn(pluginContext, user)
|
||||
return rejectionReason == ""
|
||||
}, plugin.UserWillLogInId)
|
||||
}, plugin.UserWillLogInID)
|
||||
|
||||
if rejectionReason != "" {
|
||||
return model.NewAppError("DoLogin", "Login rejected by plugin: "+rejectionReason, nil, "", http.StatusBadRequest)
|
||||
@@ -231,7 +231,7 @@ func (a *App) DoLogin(w http.ResponseWriter, r *http.Request, user *model.User,
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.UserHasLoggedIn(pluginContext, user)
|
||||
return true
|
||||
}, plugin.UserHasLoggedInId)
|
||||
}, plugin.UserHasLoggedInID)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -767,11 +767,11 @@ func (a *App) GetAuthorizationCode(w http.ResponseWriter, r *http.Request, servi
|
||||
authUrl := endpoint + "?response_type=code&client_id=" + clientId + "&redirect_uri=" + url.QueryEscape(redirectUri) + "&state=" + url.QueryEscape(state)
|
||||
|
||||
if scope != "" {
|
||||
authUrl += "&scope=" + utils.UrlEncode(scope)
|
||||
authUrl += "&scope=" + utils.URLEncode(scope)
|
||||
}
|
||||
|
||||
if loginHint != "" {
|
||||
authUrl += "&login_hint=" + utils.UrlEncode(loginHint)
|
||||
authUrl += "&login_hint=" + utils.URLEncode(loginHint)
|
||||
}
|
||||
|
||||
return authUrl, nil
|
||||
@@ -935,7 +935,7 @@ func (a *App) SwitchEmailToOAuth(w http.ResponseWriter, r *http.Request, email,
|
||||
stateProps["email"] = email
|
||||
|
||||
if service == model.USER_AUTH_SERVICE_SAML {
|
||||
return a.GetSiteURL() + "/login/sso/saml?action=" + model.OAUTH_ACTION_EMAIL_TO_SSO + "&email=" + utils.UrlEncode(email), nil
|
||||
return a.GetSiteURL() + "/login/sso/saml?action=" + model.OAUTH_ACTION_EMAIL_TO_SSO + "&email=" + utils.URLEncode(email), nil
|
||||
}
|
||||
|
||||
authUrl, err := a.GetAuthorizationCode(w, r, service, stateProps, "")
|
||||
|
||||
@@ -212,7 +212,7 @@ func (a *App) InitPlugins(pluginDir, webappPluginDir string) {
|
||||
a.Log().Error("Plugin OnConfigurationChange hook failed", mlog.Err(err))
|
||||
}
|
||||
return true
|
||||
}, plugin.OnConfigurationChangeId)
|
||||
}, plugin.OnConfigurationChangeID)
|
||||
}
|
||||
})
|
||||
a.Srv().PluginsLock.Unlock()
|
||||
|
||||
@@ -117,7 +117,7 @@ func (a *App) servePluginRequest(w http.ResponseWriter, r *http.Request, handler
|
||||
token := ""
|
||||
context := &plugin.Context{
|
||||
RequestId: model.NewId(),
|
||||
IpAddress: utils.GetIpAddress(r, a.Config().ServiceSettings.TrustedProxyIPHeader),
|
||||
IpAddress: utils.GetIPAddress(r, a.Config().ServiceSettings.TrustedProxyIPHeader),
|
||||
AcceptLanguage: r.Header.Get("Accept-Language"),
|
||||
UserAgent: r.UserAgent(),
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ func (a *App) CreatePost(post *model.Post, channel *model.Channel, triggerWebhoo
|
||||
}
|
||||
|
||||
return true
|
||||
}, plugin.MessageWillBePostedId)
|
||||
}, plugin.MessageWillBePostedID)
|
||||
|
||||
if rejectionError != nil {
|
||||
return nil, rejectionError
|
||||
@@ -329,7 +329,7 @@ func (a *App) CreatePost(post *model.Post, channel *model.Channel, triggerWebhoo
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.MessageHasBeenPosted(pluginContext, rPostCopy)
|
||||
return true
|
||||
}, plugin.MessageHasBeenPostedId)
|
||||
}, plugin.MessageHasBeenPostedID)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ func (a *App) UpdatePost(post *model.Post, safeUpdate bool) (*model.Post, *model
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
newPost, rejectionReason = hooks.MessageWillBeUpdated(pluginContext, newPost, oldPost)
|
||||
return post != nil
|
||||
}, plugin.MessageWillBeUpdatedId)
|
||||
}, plugin.MessageWillBeUpdatedID)
|
||||
if newPost == nil {
|
||||
return nil, model.NewAppError("UpdatePost", "Post rejected by plugin. "+rejectionReason, nil, "", http.StatusBadRequest)
|
||||
}
|
||||
@@ -644,7 +644,7 @@ func (a *App) UpdatePost(post *model.Post, safeUpdate bool) (*model.Post, *model
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.MessageHasBeenUpdated(pluginContext, newPost, oldPost)
|
||||
return true
|
||||
}, plugin.MessageHasBeenUpdatedId)
|
||||
}, plugin.MessageHasBeenUpdatedID)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ func (a *App) UpdateProductNotices() *model.AppError {
|
||||
|
||||
cachedDBMSVersion = strings.Split(cachedDBMSVersion, " ")[0] // get rid of trailing strings attached to the version
|
||||
|
||||
data, err := utils.GetUrlWithCache(url, ¬icesCache, skip)
|
||||
data, err := utils.GetURLWithCache(url, ¬icesCache, skip)
|
||||
if err != nil {
|
||||
return model.NewAppError("UpdateProductNotices", "api.system.update_notices.fetch_failed", nil, err.Error(), http.StatusBadRequest)
|
||||
}
|
||||
|
||||
@@ -59,10 +59,10 @@ func (rl *RateLimiter) GenerateKey(r *http.Request) string {
|
||||
if tokenLocation != TokenLocationNotFound {
|
||||
key += token
|
||||
} else if rl.useIP { // If we don't find an authentication token and IP based is enabled, fall back to IP
|
||||
key += utils.GetIpAddress(r, rl.trustedProxyIPHeader)
|
||||
key += utils.GetIPAddress(r, rl.trustedProxyIPHeader)
|
||||
}
|
||||
} else if rl.useIP { // Only if Auth based is not enabed do we use a plain IP based
|
||||
key += utils.GetIpAddress(r, rl.trustedProxyIPHeader)
|
||||
key += utils.GetIPAddress(r, rl.trustedProxyIPHeader)
|
||||
}
|
||||
|
||||
// Note that most of the time the user won't have to set this because the utils.GetIpAddress above tries the
|
||||
|
||||
@@ -58,7 +58,7 @@ func (a *App) SaveReactionForPost(reaction *model.Reaction) (*model.Reaction, *m
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.ReactionHasBeenAdded(pluginContext, reaction)
|
||||
return true
|
||||
}, plugin.ReactionHasBeenAddedId)
|
||||
}, plugin.ReactionHasBeenAddedID)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ func (a *App) DeleteReactionForPost(reaction *model.Reaction) *model.AppError {
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.ReactionHasBeenRemoved(pluginContext, reaction)
|
||||
return true
|
||||
}, plugin.ReactionHasBeenRemovedId)
|
||||
}, plugin.ReactionHasBeenRemovedID)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -775,7 +775,7 @@ func (a *App) JoinUserToTeam(team *model.Team, user *model.User, userRequestorId
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.UserHasJoinedTeam(pluginContext, tm, actor)
|
||||
return true
|
||||
}, plugin.UserHasJoinedTeamId)
|
||||
}, plugin.UserHasJoinedTeamID)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1241,7 +1241,7 @@ func (a *App) RemoveTeamMemberFromTeam(teamMember *model.TeamMember, requestorId
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.UserHasLeftTeam(pluginContext, teamMember, actor)
|
||||
return true
|
||||
}, plugin.UserHasLeftTeamId)
|
||||
}, plugin.UserHasLeftTeamID)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ func (a *App) runPluginsHook(info *model.FileInfo, file io.Reader) *model.AppErr
|
||||
info = newInfo
|
||||
}
|
||||
return true
|
||||
}, plugin.FileWillBeUploadedId)
|
||||
}, plugin.FileWillBeUploadedID)
|
||||
if rejErr != nil {
|
||||
errChan <- rejErr
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ func (a *App) createUserOrGuest(user *model.User, guest bool) (*model.User, *mod
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
hooks.UserHasBeenCreated(pluginContext, user)
|
||||
return true
|
||||
}, plugin.UserHasBeenCreatedId)
|
||||
}, plugin.UserHasBeenCreatedID)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ func (s *Store) loadLockedWithOld(oldCfg *model.Config, unlockOnce *sync.Once) e
|
||||
loadedConfig := &model.Config{}
|
||||
if len(configBytes) != 0 {
|
||||
if err = json.Unmarshal(configBytes, &loadedConfig); err != nil {
|
||||
return jsonutils.HumanizeJsonError(err, configBytes)
|
||||
return jsonutils.HumanizeJSONError(err, configBytes)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,10 @@ go 1.14
|
||||
|
||||
require (
|
||||
github.com/jstemmer/go-junit-report v0.9.1 // indirect
|
||||
github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20210205183519-d9e542a75ab2 // indirect
|
||||
github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20210218104610-40d7640e8538 // indirect
|
||||
github.com/philhofer/fwd v1.0.0 // indirect
|
||||
github.com/reflog/struct2interface v0.6.1 // indirect
|
||||
github.com/spf13/cobra v1.1.3 // indirect
|
||||
github.com/tinylib/msgp v1.1.2 // indirect
|
||||
github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31 // indirect
|
||||
github.com/vektra/mockery v1.1.2 // indirect
|
||||
|
||||
171
go.tools.sum
171
go.tools.sum
@@ -1,27 +1,50 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
||||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
|
||||
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
|
||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
|
||||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
@@ -31,20 +54,55 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
|
||||
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
@@ -54,6 +112,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20200721093743-053c38dcd293 h1:N9FaqZD58xkAIJGFGY5qdKXGlY2aNMaYQ9KkVEXv8xE=
|
||||
github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20200721093743-053c38dcd293/go.mod h1:3gKozJI8n2Y/vW37GfnFWAdehGXe5yZlt+HykK6Y3DM=
|
||||
github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20200730135456-e2334fe87160 h1:+JXFDXEkbMieBt54Rihj3ppnZ/Pm1kZxkLOD0hrWFzs=
|
||||
@@ -81,17 +140,33 @@ github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20210122154757-d807da
|
||||
github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20210122154757-d807da7d142a/go.mod h1:3gKozJI8n2Y/vW37GfnFWAdehGXe5yZlt+HykK6Y3DM=
|
||||
github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20210205183519-d9e542a75ab2 h1:HMz7yZQBfrnek35I5OOxdNdIt0rYoTnhFVn+Uq3TGi8=
|
||||
github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20210205183519-d9e542a75ab2/go.mod h1:3gKozJI8n2Y/vW37GfnFWAdehGXe5yZlt+HykK6Y3DM=
|
||||
github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20210218104610-40d7640e8538 h1:7G1fAVBGjrQaKqXnxRjVYMJfuiE6iVMdt9YhBwe2enM=
|
||||
github.com/mattermost/mattermost-utilities/mmgotool v0.0.0-20210218104610-40d7640e8538/go.mod h1:3gKozJI8n2Y/vW37GfnFWAdehGXe5yZlt+HykK6Y3DM=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ=
|
||||
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
@@ -104,10 +179,15 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T
|
||||
github.com/reflog/struct2interface v0.6.1 h1:ZnCx+rf/kE+qVB80b5+AdTyJFgTVh3s2liGwcgWT14U=
|
||||
github.com/reflog/struct2interface v0.6.1/go.mod h1:Hj4XSqbzQyLswqmKfmGqzOlh4xCRPSl27779XT9TPN4=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
@@ -116,15 +196,24 @@ github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s=
|
||||
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
|
||||
github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
|
||||
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
|
||||
github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
|
||||
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
|
||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
|
||||
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
|
||||
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
github.com/tinylib/msgp v1.1.2 h1:gWmO7n0Ys2RBEb7GPYB9Ujq8Mk5p2U08lRnmMcGy6BQ=
|
||||
github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
@@ -138,44 +227,100 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q
|
||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
|
||||
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200206050830-dd0d5d485177 h1:E2vxBajJgSA3TcJhDGTh/kP3VnsvXKl9jSijv+h7svQ=
|
||||
golang.org/x/tools v0.0.0-20200206050830-dd0d5d485177/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
@@ -185,15 +330,41 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
||||
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
|
||||
@@ -62,7 +62,7 @@ func CommandResponseFromJson(data io.Reader) (*CommandResponse, error) {
|
||||
var o CommandResponse
|
||||
err = json.Unmarshal(b, &o)
|
||||
if err != nil {
|
||||
return nil, jsonutils.HumanizeJsonError(err, b)
|
||||
return nil, jsonutils.HumanizeJSONError(err, b)
|
||||
}
|
||||
|
||||
o.Attachments = StringifySlackFieldValue(o.Attachments)
|
||||
|
||||
@@ -32,7 +32,7 @@ type hooksRPCClient struct {
|
||||
log *mlog.Logger
|
||||
muxBroker *plugin.MuxBroker
|
||||
apiImpl API
|
||||
implemented [TotalHooksId]bool
|
||||
implemented [TotalHooksID]bool
|
||||
}
|
||||
|
||||
type hooksRPCServer struct {
|
||||
@@ -268,7 +268,7 @@ func (s *apiRPCServer) LoadPluginConfiguration(args *Z_LoadPluginConfigurationAr
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["ServeHTTP"] = ServeHTTPId
|
||||
hookNameToId["ServeHTTP"] = ServeHTTPID
|
||||
}
|
||||
|
||||
type Z_ServeHTTPArgs struct {
|
||||
@@ -279,7 +279,7 @@ type Z_ServeHTTPArgs struct {
|
||||
}
|
||||
|
||||
func (g *hooksRPCClient) ServeHTTP(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
if !g.implemented[ServeHTTPId] {
|
||||
if !g.implemented[ServeHTTPID] {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
@@ -442,7 +442,7 @@ func (s *apiRPCServer) PluginHTTP(args *Z_PluginHTTPArgs, returns *Z_PluginHTTPR
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["FileWillBeUploaded"] = FileWillBeUploadedId
|
||||
hookNameToId["FileWillBeUploaded"] = FileWillBeUploadedID
|
||||
}
|
||||
|
||||
type Z_FileWillBeUploadedArgs struct {
|
||||
@@ -458,7 +458,7 @@ type Z_FileWillBeUploadedReturns struct {
|
||||
}
|
||||
|
||||
func (g *hooksRPCClient) FileWillBeUploaded(c *Context, info *model.FileInfo, file io.Reader, output io.Writer) (*model.FileInfo, string) {
|
||||
if !g.implemented[FileWillBeUploadedId] {
|
||||
if !g.implemented[FileWillBeUploadedID] {
|
||||
return info, ""
|
||||
}
|
||||
|
||||
@@ -533,7 +533,7 @@ func (s *hooksRPCServer) FileWillBeUploaded(args *Z_FileWillBeUploadedArgs, retu
|
||||
// The special behaviour needed is decoding the returned post into the original one to avoid the unintentional removal
|
||||
// of fields by older plugins.
|
||||
func init() {
|
||||
hookNameToId["MessageWillBePosted"] = MessageWillBePostedId
|
||||
hookNameToId["MessageWillBePosted"] = MessageWillBePostedID
|
||||
}
|
||||
|
||||
type Z_MessageWillBePostedArgs struct {
|
||||
@@ -549,7 +549,7 @@ type Z_MessageWillBePostedReturns struct {
|
||||
func (g *hooksRPCClient) MessageWillBePosted(c *Context, post *model.Post) (*model.Post, string) {
|
||||
_args := &Z_MessageWillBePostedArgs{c, post}
|
||||
_returns := &Z_MessageWillBePostedReturns{A: _args.B}
|
||||
if g.implemented[MessageWillBePostedId] {
|
||||
if g.implemented[MessageWillBePostedID] {
|
||||
if err := g.client.Call("Plugin.MessageWillBePosted", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call MessageWillBePosted to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -573,7 +573,7 @@ func (s *hooksRPCServer) MessageWillBePosted(args *Z_MessageWillBePostedArgs, re
|
||||
// The special behaviour needed is decoding the returned post into the original one to avoid the unintentional removal
|
||||
// of fields by older plugins.
|
||||
func init() {
|
||||
hookNameToId["MessageWillBeUpdated"] = MessageWillBeUpdatedId
|
||||
hookNameToId["MessageWillBeUpdated"] = MessageWillBeUpdatedID
|
||||
}
|
||||
|
||||
type Z_MessageWillBeUpdatedArgs struct {
|
||||
@@ -590,7 +590,7 @@ type Z_MessageWillBeUpdatedReturns struct {
|
||||
func (g *hooksRPCClient) MessageWillBeUpdated(c *Context, newPost, oldPost *model.Post) (*model.Post, string) {
|
||||
_args := &Z_MessageWillBeUpdatedArgs{c, newPost, oldPost}
|
||||
_returns := &Z_MessageWillBeUpdatedReturns{A: _args.B}
|
||||
if g.implemented[MessageWillBeUpdatedId] {
|
||||
if g.implemented[MessageWillBeUpdatedID] {
|
||||
if err := g.client.Call("Plugin.MessageWillBeUpdated", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call MessageWillBeUpdated to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
hookNameToId["OnDeactivate"] = OnDeactivateId
|
||||
hookNameToId["OnDeactivate"] = OnDeactivateID
|
||||
}
|
||||
|
||||
type Z_OnDeactivateArgs struct {
|
||||
@@ -28,7 +28,7 @@ type Z_OnDeactivateReturns struct {
|
||||
func (g *hooksRPCClient) OnDeactivate() error {
|
||||
_args := &Z_OnDeactivateArgs{}
|
||||
_returns := &Z_OnDeactivateReturns{}
|
||||
if g.implemented[OnDeactivateId] {
|
||||
if g.implemented[OnDeactivateID] {
|
||||
if err := g.client.Call("Plugin.OnDeactivate", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call OnDeactivate to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -49,7 +49,7 @@ func (s *hooksRPCServer) OnDeactivate(args *Z_OnDeactivateArgs, returns *Z_OnDea
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["OnConfigurationChange"] = OnConfigurationChangeId
|
||||
hookNameToId["OnConfigurationChange"] = OnConfigurationChangeID
|
||||
}
|
||||
|
||||
type Z_OnConfigurationChangeArgs struct {
|
||||
@@ -62,7 +62,7 @@ type Z_OnConfigurationChangeReturns struct {
|
||||
func (g *hooksRPCClient) OnConfigurationChange() error {
|
||||
_args := &Z_OnConfigurationChangeArgs{}
|
||||
_returns := &Z_OnConfigurationChangeReturns{}
|
||||
if g.implemented[OnConfigurationChangeId] {
|
||||
if g.implemented[OnConfigurationChangeID] {
|
||||
if err := g.client.Call("Plugin.OnConfigurationChange", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call OnConfigurationChange to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -83,7 +83,7 @@ func (s *hooksRPCServer) OnConfigurationChange(args *Z_OnConfigurationChangeArgs
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["ExecuteCommand"] = ExecuteCommandId
|
||||
hookNameToId["ExecuteCommand"] = ExecuteCommandID
|
||||
}
|
||||
|
||||
type Z_ExecuteCommandArgs struct {
|
||||
@@ -99,7 +99,7 @@ type Z_ExecuteCommandReturns struct {
|
||||
func (g *hooksRPCClient) ExecuteCommand(c *Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
|
||||
_args := &Z_ExecuteCommandArgs{c, args}
|
||||
_returns := &Z_ExecuteCommandReturns{}
|
||||
if g.implemented[ExecuteCommandId] {
|
||||
if g.implemented[ExecuteCommandID] {
|
||||
if err := g.client.Call("Plugin.ExecuteCommand", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call ExecuteCommand to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -119,7 +119,7 @@ func (s *hooksRPCServer) ExecuteCommand(args *Z_ExecuteCommandArgs, returns *Z_E
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["UserHasBeenCreated"] = UserHasBeenCreatedId
|
||||
hookNameToId["UserHasBeenCreated"] = UserHasBeenCreatedID
|
||||
}
|
||||
|
||||
type Z_UserHasBeenCreatedArgs struct {
|
||||
@@ -133,7 +133,7 @@ type Z_UserHasBeenCreatedReturns struct {
|
||||
func (g *hooksRPCClient) UserHasBeenCreated(c *Context, user *model.User) {
|
||||
_args := &Z_UserHasBeenCreatedArgs{c, user}
|
||||
_returns := &Z_UserHasBeenCreatedReturns{}
|
||||
if g.implemented[UserHasBeenCreatedId] {
|
||||
if g.implemented[UserHasBeenCreatedID] {
|
||||
if err := g.client.Call("Plugin.UserHasBeenCreated", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call UserHasBeenCreated to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -153,7 +153,7 @@ func (s *hooksRPCServer) UserHasBeenCreated(args *Z_UserHasBeenCreatedArgs, retu
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["UserWillLogIn"] = UserWillLogInId
|
||||
hookNameToId["UserWillLogIn"] = UserWillLogInID
|
||||
}
|
||||
|
||||
type Z_UserWillLogInArgs struct {
|
||||
@@ -168,7 +168,7 @@ type Z_UserWillLogInReturns struct {
|
||||
func (g *hooksRPCClient) UserWillLogIn(c *Context, user *model.User) string {
|
||||
_args := &Z_UserWillLogInArgs{c, user}
|
||||
_returns := &Z_UserWillLogInReturns{}
|
||||
if g.implemented[UserWillLogInId] {
|
||||
if g.implemented[UserWillLogInID] {
|
||||
if err := g.client.Call("Plugin.UserWillLogIn", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call UserWillLogIn to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -188,7 +188,7 @@ func (s *hooksRPCServer) UserWillLogIn(args *Z_UserWillLogInArgs, returns *Z_Use
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["UserHasLoggedIn"] = UserHasLoggedInId
|
||||
hookNameToId["UserHasLoggedIn"] = UserHasLoggedInID
|
||||
}
|
||||
|
||||
type Z_UserHasLoggedInArgs struct {
|
||||
@@ -202,7 +202,7 @@ type Z_UserHasLoggedInReturns struct {
|
||||
func (g *hooksRPCClient) UserHasLoggedIn(c *Context, user *model.User) {
|
||||
_args := &Z_UserHasLoggedInArgs{c, user}
|
||||
_returns := &Z_UserHasLoggedInReturns{}
|
||||
if g.implemented[UserHasLoggedInId] {
|
||||
if g.implemented[UserHasLoggedInID] {
|
||||
if err := g.client.Call("Plugin.UserHasLoggedIn", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call UserHasLoggedIn to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -222,7 +222,7 @@ func (s *hooksRPCServer) UserHasLoggedIn(args *Z_UserHasLoggedInArgs, returns *Z
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["MessageHasBeenPosted"] = MessageHasBeenPostedId
|
||||
hookNameToId["MessageHasBeenPosted"] = MessageHasBeenPostedID
|
||||
}
|
||||
|
||||
type Z_MessageHasBeenPostedArgs struct {
|
||||
@@ -236,7 +236,7 @@ type Z_MessageHasBeenPostedReturns struct {
|
||||
func (g *hooksRPCClient) MessageHasBeenPosted(c *Context, post *model.Post) {
|
||||
_args := &Z_MessageHasBeenPostedArgs{c, post}
|
||||
_returns := &Z_MessageHasBeenPostedReturns{}
|
||||
if g.implemented[MessageHasBeenPostedId] {
|
||||
if g.implemented[MessageHasBeenPostedID] {
|
||||
if err := g.client.Call("Plugin.MessageHasBeenPosted", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call MessageHasBeenPosted to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -256,7 +256,7 @@ func (s *hooksRPCServer) MessageHasBeenPosted(args *Z_MessageHasBeenPostedArgs,
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["MessageHasBeenUpdated"] = MessageHasBeenUpdatedId
|
||||
hookNameToId["MessageHasBeenUpdated"] = MessageHasBeenUpdatedID
|
||||
}
|
||||
|
||||
type Z_MessageHasBeenUpdatedArgs struct {
|
||||
@@ -271,7 +271,7 @@ type Z_MessageHasBeenUpdatedReturns struct {
|
||||
func (g *hooksRPCClient) MessageHasBeenUpdated(c *Context, newPost, oldPost *model.Post) {
|
||||
_args := &Z_MessageHasBeenUpdatedArgs{c, newPost, oldPost}
|
||||
_returns := &Z_MessageHasBeenUpdatedReturns{}
|
||||
if g.implemented[MessageHasBeenUpdatedId] {
|
||||
if g.implemented[MessageHasBeenUpdatedID] {
|
||||
if err := g.client.Call("Plugin.MessageHasBeenUpdated", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call MessageHasBeenUpdated to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -291,7 +291,7 @@ func (s *hooksRPCServer) MessageHasBeenUpdated(args *Z_MessageHasBeenUpdatedArgs
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["ChannelHasBeenCreated"] = ChannelHasBeenCreatedId
|
||||
hookNameToId["ChannelHasBeenCreated"] = ChannelHasBeenCreatedID
|
||||
}
|
||||
|
||||
type Z_ChannelHasBeenCreatedArgs struct {
|
||||
@@ -305,7 +305,7 @@ type Z_ChannelHasBeenCreatedReturns struct {
|
||||
func (g *hooksRPCClient) ChannelHasBeenCreated(c *Context, channel *model.Channel) {
|
||||
_args := &Z_ChannelHasBeenCreatedArgs{c, channel}
|
||||
_returns := &Z_ChannelHasBeenCreatedReturns{}
|
||||
if g.implemented[ChannelHasBeenCreatedId] {
|
||||
if g.implemented[ChannelHasBeenCreatedID] {
|
||||
if err := g.client.Call("Plugin.ChannelHasBeenCreated", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call ChannelHasBeenCreated to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -325,7 +325,7 @@ func (s *hooksRPCServer) ChannelHasBeenCreated(args *Z_ChannelHasBeenCreatedArgs
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["UserHasJoinedChannel"] = UserHasJoinedChannelId
|
||||
hookNameToId["UserHasJoinedChannel"] = UserHasJoinedChannelID
|
||||
}
|
||||
|
||||
type Z_UserHasJoinedChannelArgs struct {
|
||||
@@ -340,7 +340,7 @@ type Z_UserHasJoinedChannelReturns struct {
|
||||
func (g *hooksRPCClient) UserHasJoinedChannel(c *Context, channelMember *model.ChannelMember, actor *model.User) {
|
||||
_args := &Z_UserHasJoinedChannelArgs{c, channelMember, actor}
|
||||
_returns := &Z_UserHasJoinedChannelReturns{}
|
||||
if g.implemented[UserHasJoinedChannelId] {
|
||||
if g.implemented[UserHasJoinedChannelID] {
|
||||
if err := g.client.Call("Plugin.UserHasJoinedChannel", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call UserHasJoinedChannel to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -360,7 +360,7 @@ func (s *hooksRPCServer) UserHasJoinedChannel(args *Z_UserHasJoinedChannelArgs,
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["UserHasLeftChannel"] = UserHasLeftChannelId
|
||||
hookNameToId["UserHasLeftChannel"] = UserHasLeftChannelID
|
||||
}
|
||||
|
||||
type Z_UserHasLeftChannelArgs struct {
|
||||
@@ -375,7 +375,7 @@ type Z_UserHasLeftChannelReturns struct {
|
||||
func (g *hooksRPCClient) UserHasLeftChannel(c *Context, channelMember *model.ChannelMember, actor *model.User) {
|
||||
_args := &Z_UserHasLeftChannelArgs{c, channelMember, actor}
|
||||
_returns := &Z_UserHasLeftChannelReturns{}
|
||||
if g.implemented[UserHasLeftChannelId] {
|
||||
if g.implemented[UserHasLeftChannelID] {
|
||||
if err := g.client.Call("Plugin.UserHasLeftChannel", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call UserHasLeftChannel to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -395,7 +395,7 @@ func (s *hooksRPCServer) UserHasLeftChannel(args *Z_UserHasLeftChannelArgs, retu
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["UserHasJoinedTeam"] = UserHasJoinedTeamId
|
||||
hookNameToId["UserHasJoinedTeam"] = UserHasJoinedTeamID
|
||||
}
|
||||
|
||||
type Z_UserHasJoinedTeamArgs struct {
|
||||
@@ -410,7 +410,7 @@ type Z_UserHasJoinedTeamReturns struct {
|
||||
func (g *hooksRPCClient) UserHasJoinedTeam(c *Context, teamMember *model.TeamMember, actor *model.User) {
|
||||
_args := &Z_UserHasJoinedTeamArgs{c, teamMember, actor}
|
||||
_returns := &Z_UserHasJoinedTeamReturns{}
|
||||
if g.implemented[UserHasJoinedTeamId] {
|
||||
if g.implemented[UserHasJoinedTeamID] {
|
||||
if err := g.client.Call("Plugin.UserHasJoinedTeam", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call UserHasJoinedTeam to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -430,7 +430,7 @@ func (s *hooksRPCServer) UserHasJoinedTeam(args *Z_UserHasJoinedTeamArgs, return
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["UserHasLeftTeam"] = UserHasLeftTeamId
|
||||
hookNameToId["UserHasLeftTeam"] = UserHasLeftTeamID
|
||||
}
|
||||
|
||||
type Z_UserHasLeftTeamArgs struct {
|
||||
@@ -445,7 +445,7 @@ type Z_UserHasLeftTeamReturns struct {
|
||||
func (g *hooksRPCClient) UserHasLeftTeam(c *Context, teamMember *model.TeamMember, actor *model.User) {
|
||||
_args := &Z_UserHasLeftTeamArgs{c, teamMember, actor}
|
||||
_returns := &Z_UserHasLeftTeamReturns{}
|
||||
if g.implemented[UserHasLeftTeamId] {
|
||||
if g.implemented[UserHasLeftTeamID] {
|
||||
if err := g.client.Call("Plugin.UserHasLeftTeam", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call UserHasLeftTeam to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -465,7 +465,7 @@ func (s *hooksRPCServer) UserHasLeftTeam(args *Z_UserHasLeftTeamArgs, returns *Z
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["ReactionHasBeenAdded"] = ReactionHasBeenAddedId
|
||||
hookNameToId["ReactionHasBeenAdded"] = ReactionHasBeenAddedID
|
||||
}
|
||||
|
||||
type Z_ReactionHasBeenAddedArgs struct {
|
||||
@@ -479,7 +479,7 @@ type Z_ReactionHasBeenAddedReturns struct {
|
||||
func (g *hooksRPCClient) ReactionHasBeenAdded(c *Context, reaction *model.Reaction) {
|
||||
_args := &Z_ReactionHasBeenAddedArgs{c, reaction}
|
||||
_returns := &Z_ReactionHasBeenAddedReturns{}
|
||||
if g.implemented[ReactionHasBeenAddedId] {
|
||||
if g.implemented[ReactionHasBeenAddedID] {
|
||||
if err := g.client.Call("Plugin.ReactionHasBeenAdded", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call ReactionHasBeenAdded to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
@@ -499,7 +499,7 @@ func (s *hooksRPCServer) ReactionHasBeenAdded(args *Z_ReactionHasBeenAddedArgs,
|
||||
}
|
||||
|
||||
func init() {
|
||||
hookNameToId["ReactionHasBeenRemoved"] = ReactionHasBeenRemovedId
|
||||
hookNameToId["ReactionHasBeenRemoved"] = ReactionHasBeenRemovedID
|
||||
}
|
||||
|
||||
type Z_ReactionHasBeenRemovedArgs struct {
|
||||
@@ -513,7 +513,7 @@ type Z_ReactionHasBeenRemovedReturns struct {
|
||||
func (g *hooksRPCClient) ReactionHasBeenRemoved(c *Context, reaction *model.Reaction) {
|
||||
_args := &Z_ReactionHasBeenRemovedArgs{c, reaction}
|
||||
_returns := &Z_ReactionHasBeenRemovedReturns{}
|
||||
if g.implemented[ReactionHasBeenRemovedId] {
|
||||
if g.implemented[ReactionHasBeenRemovedID] {
|
||||
if err := g.client.Call("Plugin.ReactionHasBeenRemoved", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call ReactionHasBeenRemoved to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
|
||||
@@ -13,29 +13,29 @@ import (
|
||||
// These assignments are part of the wire protocol used to trigger hook events in plugins.
|
||||
//
|
||||
// Feel free to add more, but do not change existing assignments. Follow the naming convention of
|
||||
// <HookName>Id as the autogenerated glue code depends on that.
|
||||
// <HookName>ID as the autogenerated glue code depends on that.
|
||||
const (
|
||||
OnActivateId = 0
|
||||
OnDeactivateId = 1
|
||||
ServeHTTPId = 2
|
||||
OnConfigurationChangeId = 3
|
||||
ExecuteCommandId = 4
|
||||
MessageWillBePostedId = 5
|
||||
MessageWillBeUpdatedId = 6
|
||||
MessageHasBeenPostedId = 7
|
||||
MessageHasBeenUpdatedId = 8
|
||||
UserHasJoinedChannelId = 9
|
||||
UserHasLeftChannelId = 10
|
||||
UserHasJoinedTeamId = 11
|
||||
UserHasLeftTeamId = 12
|
||||
ChannelHasBeenCreatedId = 13
|
||||
FileWillBeUploadedId = 14
|
||||
UserWillLogInId = 15
|
||||
UserHasLoggedInId = 16
|
||||
UserHasBeenCreatedId = 17
|
||||
ReactionHasBeenAddedId = 18
|
||||
ReactionHasBeenRemovedId = 19
|
||||
TotalHooksId = iota
|
||||
OnActivateID = 0
|
||||
OnDeactivateID = 1
|
||||
ServeHTTPID = 2
|
||||
OnConfigurationChangeID = 3
|
||||
ExecuteCommandID = 4
|
||||
MessageWillBePostedID = 5
|
||||
MessageWillBeUpdatedID = 6
|
||||
MessageHasBeenPostedID = 7
|
||||
MessageHasBeenUpdatedID = 8
|
||||
UserHasJoinedChannelID = 9
|
||||
UserHasLeftChannelID = 10
|
||||
UserHasJoinedTeamID = 11
|
||||
UserHasLeftTeamID = 12
|
||||
ChannelHasBeenCreatedID = 13
|
||||
FileWillBeUploadedID = 14
|
||||
UserWillLogInID = 15
|
||||
UserHasLoggedInID = 16
|
||||
UserHasBeenCreatedID = 17
|
||||
ReactionHasBeenAddedID = 18
|
||||
ReactionHasBeenRemovedID = 19
|
||||
TotalHooksID = iota
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -292,7 +292,7 @@ package plugin
|
||||
{{range .HooksMethods}}
|
||||
|
||||
func init() {
|
||||
hookNameToId["{{.Name}}"] = {{.Name}}Id
|
||||
hookNameToId["{{.Name}}"] = {{.Name}}ID
|
||||
}
|
||||
|
||||
type {{.Name | obscure}}Args struct {
|
||||
@@ -306,7 +306,7 @@ type {{.Name | obscure}}Returns struct {
|
||||
func (g *hooksRPCClient) {{.Name}}{{funcStyle .Params}} {{funcStyle .Return}} {
|
||||
_args := &{{.Name | obscure}}Args{ {{valuesOnly .Params}} }
|
||||
_returns := &{{.Name | obscure}}Returns{}
|
||||
if g.implemented[{{.Name}}Id] {
|
||||
if g.implemented[{{.Name}}ID] {
|
||||
if err := g.client.Call("Plugin.{{.Name}}", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call {{.Name}} to plugin failed.", mlog.Err(err))
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ type supervisor struct {
|
||||
lock sync.RWMutex
|
||||
client *plugin.Client
|
||||
hooks Hooks
|
||||
implemented [TotalHooksId]bool
|
||||
implemented [TotalHooksID]bool
|
||||
pid int
|
||||
}
|
||||
|
||||
|
||||
@@ -75,18 +75,18 @@ func (e *ErrConflict) Unwrap() error {
|
||||
// ErrNotFound indicates that a resource was not found
|
||||
type ErrNotFound struct {
|
||||
resource string
|
||||
Id string
|
||||
ID string
|
||||
}
|
||||
|
||||
func NewErrNotFound(resource, id string) *ErrNotFound {
|
||||
return &ErrNotFound{
|
||||
resource: resource,
|
||||
Id: id,
|
||||
ID: id,
|
||||
}
|
||||
}
|
||||
|
||||
func (e *ErrNotFound) Error() string {
|
||||
return "resource: " + e.resource + " id: " + e.Id
|
||||
return "resource: " + e.resource + " id: " + e.ID
|
||||
}
|
||||
|
||||
// ErrOutOfBounds indicates that the requested total numbers of rows
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
340
store/store.go
340
store/store.go
@@ -88,8 +88,8 @@ type TeamStore interface {
|
||||
GetAllTeamListing() ([]*model.Team, error)
|
||||
GetAllTeamPageListing(offset int, limit int) ([]*model.Team, error)
|
||||
GetTeamsByUserId(userId string) ([]*model.Team, error)
|
||||
GetByInviteId(inviteId string) (*model.Team, error)
|
||||
PermanentDelete(teamId string) error
|
||||
GetByInviteId(inviteID string) (*model.Team, error)
|
||||
PermanentDelete(teamID string) error
|
||||
AnalyticsTeamCount(includeDeleted bool) (int64, error)
|
||||
AnalyticsPublicTeamCount() (int64, error)
|
||||
AnalyticsPrivateTeamCount() (int64, error)
|
||||
@@ -97,26 +97,26 @@ type TeamStore interface {
|
||||
SaveMember(member *model.TeamMember, maxUsersPerTeam int) (*model.TeamMember, error)
|
||||
UpdateMember(member *model.TeamMember) (*model.TeamMember, error)
|
||||
UpdateMultipleMembers(members []*model.TeamMember) ([]*model.TeamMember, error)
|
||||
GetMember(teamId string, userId string) (*model.TeamMember, error)
|
||||
GetMembers(teamId string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, error)
|
||||
GetMembersByIds(teamId string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error)
|
||||
GetTotalMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error)
|
||||
GetActiveMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error)
|
||||
GetMember(teamID string, userId string) (*model.TeamMember, error)
|
||||
GetMembers(teamID string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, error)
|
||||
GetMembersByIds(teamID string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error)
|
||||
GetTotalMemberCount(teamID string, restrictions *model.ViewUsersRestrictions) (int64, error)
|
||||
GetActiveMemberCount(teamID string, restrictions *model.ViewUsersRestrictions) (int64, error)
|
||||
GetTeamsForUser(ctx context.Context, userId string) ([]*model.TeamMember, error)
|
||||
GetTeamsForUserWithPagination(userId string, page, perPage int) ([]*model.TeamMember, error)
|
||||
GetChannelUnreadsForAllTeams(excludeTeamId, userId string) ([]*model.ChannelUnread, error)
|
||||
GetChannelUnreadsForTeam(teamId, userId string) ([]*model.ChannelUnread, error)
|
||||
RemoveMember(teamId string, userId string) error
|
||||
RemoveMembers(teamId string, userIds []string) error
|
||||
RemoveAllMembersByTeam(teamId string) error
|
||||
GetChannelUnreadsForAllTeams(excludeTeamID, userId string) ([]*model.ChannelUnread, error)
|
||||
GetChannelUnreadsForTeam(teamID, userId string) ([]*model.ChannelUnread, error)
|
||||
RemoveMember(teamID string, userId string) error
|
||||
RemoveMembers(teamID string, userIds []string) error
|
||||
RemoveAllMembersByTeam(teamID string) error
|
||||
RemoveAllMembersByUser(userId string) error
|
||||
UpdateLastTeamIconUpdate(teamId string, curTime int64) error
|
||||
GetTeamsByScheme(schemeId string, offset int, limit int) ([]*model.Team, error)
|
||||
MigrateTeamMembers(fromTeamId string, fromUserId string) (map[string]string, error)
|
||||
UpdateLastTeamIconUpdate(teamID string, curTime int64) error
|
||||
GetTeamsByScheme(schemeID string, offset int, limit int) ([]*model.Team, error)
|
||||
MigrateTeamMembers(fromTeamID string, fromUserId string) (map[string]string, error)
|
||||
ResetAllTeamSchemes() error
|
||||
ClearAllCustomRoleAssignments() error
|
||||
AnalyticsGetTeamCountForScheme(schemeId string) (int64, error)
|
||||
GetAllForExportAfter(limit int, afterId string) ([]*model.TeamForExport, error)
|
||||
AnalyticsGetTeamCountForScheme(schemeID string) (int64, error)
|
||||
GetAllForExportAfter(limit int, afterID string) ([]*model.TeamForExport, error)
|
||||
GetTeamMembersForExport(userId string) ([]*model.TeamMemberForExport, error)
|
||||
UserBelongsToTeams(userId string, teamIds []string) (bool, error)
|
||||
GetUserTeamIds(userId string, allowFromCache bool) ([]string, error)
|
||||
@@ -136,99 +136,99 @@ type ChannelStore interface {
|
||||
CreateDirectChannel(userId *model.User, otherUserId *model.User) (*model.Channel, error)
|
||||
SaveDirectChannel(channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) (*model.Channel, error)
|
||||
Update(channel *model.Channel) (*model.Channel, error)
|
||||
UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamId string) error
|
||||
ClearSidebarOnTeamLeave(userId, teamId string) error
|
||||
UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamID string) error
|
||||
ClearSidebarOnTeamLeave(userId, teamID string) error
|
||||
Get(id string, allowFromCache bool) (*model.Channel, error)
|
||||
InvalidateChannel(id string)
|
||||
InvalidateChannelByName(teamId, name string)
|
||||
InvalidateChannelByName(teamID, name string)
|
||||
GetFromMaster(id string) (*model.Channel, error)
|
||||
Delete(channelId string, time int64) error
|
||||
Restore(channelId string, time int64) error
|
||||
SetDeleteAt(channelId string, deleteAt int64, updateAt int64) error
|
||||
PermanentDelete(channelId string) error
|
||||
PermanentDeleteByTeam(teamId string) error
|
||||
Delete(channelID string, time int64) error
|
||||
Restore(channelID string, time int64) error
|
||||
SetDeleteAt(channelID string, deleteAt int64, updateAt int64) error
|
||||
PermanentDelete(channelID string) error
|
||||
PermanentDeleteByTeam(teamID string) error
|
||||
GetByName(team_id string, name string, allowFromCache bool) (*model.Channel, error)
|
||||
GetByNames(team_id string, names []string, allowFromCache bool) ([]*model.Channel, error)
|
||||
GetByNameIncludeDeleted(team_id string, name string, allowFromCache bool) (*model.Channel, error)
|
||||
GetDeletedByName(team_id string, name string) (*model.Channel, error)
|
||||
GetDeleted(team_id string, offset int, limit int, userId string) (*model.ChannelList, error)
|
||||
GetChannels(teamId string, userId string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error)
|
||||
GetChannels(teamID string, userId string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error)
|
||||
GetAllChannels(page, perPage int, opts ChannelSearchOpts) (*model.ChannelListWithTeamData, error)
|
||||
GetAllChannelsCount(opts ChannelSearchOpts) (int64, error)
|
||||
GetMoreChannels(teamId string, userId string, offset int, limit int) (*model.ChannelList, error)
|
||||
GetPrivateChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, error)
|
||||
GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, error)
|
||||
GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, error)
|
||||
GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, error)
|
||||
GetTeamChannels(teamId string) (*model.ChannelList, error)
|
||||
GetAll(teamId string) ([]*model.Channel, error)
|
||||
GetMoreChannels(teamID string, userId string, offset int, limit int) (*model.ChannelList, error)
|
||||
GetPrivateChannelsForTeam(teamID string, offset int, limit int) (*model.ChannelList, error)
|
||||
GetPublicChannelsForTeam(teamID string, offset int, limit int) (*model.ChannelList, error)
|
||||
GetPublicChannelsByIdsForTeam(teamID string, channelIds []string) (*model.ChannelList, error)
|
||||
GetChannelCounts(teamID string, userId string) (*model.ChannelCounts, error)
|
||||
GetTeamChannels(teamID string) (*model.ChannelList, error)
|
||||
GetAll(teamID string) ([]*model.Channel, error)
|
||||
GetChannelsByIds(channelIds []string, includeDeleted bool) ([]*model.Channel, error)
|
||||
GetForPost(postId string) (*model.Channel, error)
|
||||
GetForPost(postID string) (*model.Channel, error)
|
||||
SaveMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error)
|
||||
SaveMember(member *model.ChannelMember) (*model.ChannelMember, error)
|
||||
UpdateMember(member *model.ChannelMember) (*model.ChannelMember, error)
|
||||
UpdateMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error)
|
||||
GetMembers(channelId string, offset, limit int) (*model.ChannelMembers, error)
|
||||
GetMember(channelId string, userId string) (*model.ChannelMember, error)
|
||||
GetChannelMembersTimezones(channelId string) ([]model.StringMap, error)
|
||||
GetMembers(channelID string, offset, limit int) (*model.ChannelMembers, error)
|
||||
GetMember(channelID string, userId string) (*model.ChannelMember, error)
|
||||
GetChannelMembersTimezones(channelID string) ([]model.StringMap, error)
|
||||
GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, error)
|
||||
InvalidateAllChannelMembersForUser(userId string)
|
||||
IsUserInChannelUseCache(userId string, channelId string) bool
|
||||
GetAllChannelMembersNotifyPropsForChannel(channelId string, allowFromCache bool) (map[string]model.StringMap, error)
|
||||
InvalidateCacheForChannelMembersNotifyProps(channelId string)
|
||||
GetMemberForPost(postId string, userId string) (*model.ChannelMember, error)
|
||||
InvalidateMemberCount(channelId string)
|
||||
GetMemberCountFromCache(channelId string) int64
|
||||
GetMemberCount(channelId string, allowFromCache bool) (int64, error)
|
||||
IsUserInChannelUseCache(userId string, channelID string) bool
|
||||
GetAllChannelMembersNotifyPropsForChannel(channelID string, allowFromCache bool) (map[string]model.StringMap, error)
|
||||
InvalidateCacheForChannelMembersNotifyProps(channelID string)
|
||||
GetMemberForPost(postID string, userId string) (*model.ChannelMember, error)
|
||||
InvalidateMemberCount(channelID string)
|
||||
GetMemberCountFromCache(channelID string) int64
|
||||
GetMemberCount(channelID string, allowFromCache bool) (int64, error)
|
||||
GetMemberCountsByGroup(channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, error)
|
||||
InvalidatePinnedPostCount(channelId string)
|
||||
GetPinnedPostCount(channelId string, allowFromCache bool) (int64, error)
|
||||
InvalidateGuestCount(channelId string)
|
||||
GetGuestCount(channelId string, allowFromCache bool) (int64, error)
|
||||
GetPinnedPosts(channelId string) (*model.PostList, error)
|
||||
RemoveMember(channelId string, userId string) error
|
||||
RemoveMembers(channelId string, userIds []string) error
|
||||
InvalidatePinnedPostCount(channelID string)
|
||||
GetPinnedPostCount(channelID string, allowFromCache bool) (int64, error)
|
||||
InvalidateGuestCount(channelID string)
|
||||
GetGuestCount(channelID string, allowFromCache bool) (int64, error)
|
||||
GetPinnedPosts(channelID string) (*model.PostList, error)
|
||||
RemoveMember(channelID string, userId string) error
|
||||
RemoveMembers(channelID string, userIds []string) error
|
||||
PermanentDeleteMembersByUser(userId string) error
|
||||
PermanentDeleteMembersByChannel(channelId string) error
|
||||
PermanentDeleteMembersByChannel(channelID string) error
|
||||
UpdateLastViewedAt(channelIds []string, userId string, updateThreads bool) (map[string]int64, error)
|
||||
UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int, updateThreads bool) (*model.ChannelUnreadAt, error)
|
||||
CountPostsAfter(channelId string, timestamp int64, userId string) (int, error)
|
||||
IncrementMentionCount(channelId string, userId string, updateThreads bool) error
|
||||
AnalyticsTypeCount(teamId string, channelType string) (int64, error)
|
||||
GetMembersForUser(teamId string, userId string) (*model.ChannelMembers, error)
|
||||
GetMembersForUserWithPagination(teamId, userId string, page, perPage int) (*model.ChannelMembers, error)
|
||||
AutocompleteInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, error)
|
||||
AutocompleteInTeamForSearch(teamId string, userId string, term string, includeDeleted bool) (*model.ChannelList, error)
|
||||
CountPostsAfter(channelID string, timestamp int64, userId string) (int, error)
|
||||
IncrementMentionCount(channelID string, userId string, updateThreads bool) error
|
||||
AnalyticsTypeCount(teamID string, channelType string) (int64, error)
|
||||
GetMembersForUser(teamID string, userId string) (*model.ChannelMembers, error)
|
||||
GetMembersForUserWithPagination(teamID, userId string, page, perPage int) (*model.ChannelMembers, error)
|
||||
AutocompleteInTeam(teamID string, term string, includeDeleted bool) (*model.ChannelList, error)
|
||||
AutocompleteInTeamForSearch(teamID string, userId string, term string, includeDeleted bool) (*model.ChannelList, error)
|
||||
SearchAllChannels(term string, opts ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, error)
|
||||
SearchInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, error)
|
||||
SearchArchivedInTeam(teamId string, term string, userId string) (*model.ChannelList, error)
|
||||
SearchForUserInTeam(userId string, teamId string, term string, includeDeleted bool) (*model.ChannelList, error)
|
||||
SearchMore(userId string, teamId string, term string) (*model.ChannelList, error)
|
||||
SearchInTeam(teamID string, term string, includeDeleted bool) (*model.ChannelList, error)
|
||||
SearchArchivedInTeam(teamID string, term string, userId string) (*model.ChannelList, error)
|
||||
SearchForUserInTeam(userId string, teamID string, term string, includeDeleted bool) (*model.ChannelList, error)
|
||||
SearchMore(userId string, teamID string, term string) (*model.ChannelList, error)
|
||||
SearchGroupChannels(userId, term string) (*model.ChannelList, error)
|
||||
GetMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, error)
|
||||
GetMembersByIds(channelID string, userIds []string) (*model.ChannelMembers, error)
|
||||
GetMembersByChannelIds(channelIds []string, userId string) (*model.ChannelMembers, error)
|
||||
AnalyticsDeletedTypeCount(teamId string, channelType string) (int64, error)
|
||||
GetChannelUnread(channelId, userId string) (*model.ChannelUnread, error)
|
||||
AnalyticsDeletedTypeCount(teamID string, channelType string) (int64, error)
|
||||
GetChannelUnread(channelID, userId string) (*model.ChannelUnread, error)
|
||||
ClearCaches()
|
||||
GetChannelsByScheme(schemeId string, offset int, limit int) (model.ChannelList, error)
|
||||
GetChannelsByScheme(schemeID string, offset int, limit int) (model.ChannelList, error)
|
||||
MigrateChannelMembers(fromChannelId string, fromUserId string) (map[string]string, error)
|
||||
ResetAllChannelSchemes() error
|
||||
ClearAllCustomRoleAssignments() error
|
||||
MigratePublicChannels() error
|
||||
CreateInitialSidebarCategories(userId, teamId string) error
|
||||
GetSidebarCategories(userId, teamId string) (*model.OrderedSidebarCategories, error)
|
||||
GetSidebarCategory(categoryId string) (*model.SidebarCategoryWithChannels, error)
|
||||
GetSidebarCategoryOrder(userId, teamId string) ([]string, error)
|
||||
CreateSidebarCategory(userId, teamId string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error)
|
||||
UpdateSidebarCategoryOrder(userId, teamId string, categoryOrder []string) error
|
||||
UpdateSidebarCategories(userId, teamId string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, error)
|
||||
CreateInitialSidebarCategories(userId, teamID string) error
|
||||
GetSidebarCategories(userId, teamID string) (*model.OrderedSidebarCategories, error)
|
||||
GetSidebarCategory(categoryID string) (*model.SidebarCategoryWithChannels, error)
|
||||
GetSidebarCategoryOrder(userId, teamID string) ([]string, error)
|
||||
CreateSidebarCategory(userId, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error)
|
||||
UpdateSidebarCategoryOrder(userId, teamID string, categoryOrder []string) error
|
||||
UpdateSidebarCategories(userId, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, error)
|
||||
UpdateSidebarChannelsByPreferences(preferences *model.Preferences) error
|
||||
DeleteSidebarChannelsByPreferences(preferences *model.Preferences) error
|
||||
DeleteSidebarCategory(categoryId string) error
|
||||
GetAllChannelsForExportAfter(limit int, afterId string) ([]*model.ChannelForExport, error)
|
||||
GetAllDirectChannelsForExportAfter(limit int, afterId string) ([]*model.DirectChannelForExport, error)
|
||||
GetChannelMembersForExport(userId string, teamId string) ([]*model.ChannelMemberForExport, error)
|
||||
RemoveAllDeactivatedMembers(channelId string) error
|
||||
DeleteSidebarCategory(categoryID string) error
|
||||
GetAllChannelsForExportAfter(limit int, afterID string) ([]*model.ChannelForExport, error)
|
||||
GetAllDirectChannelsForExportAfter(limit int, afterID string) ([]*model.DirectChannelForExport, error)
|
||||
GetChannelMembersForExport(userId string, teamID string) ([]*model.ChannelMemberForExport, error)
|
||||
RemoveAllDeactivatedMembers(channelID string) error
|
||||
GetChannelsBatchForIndexing(startTime, endTime int64, limit int) ([]*model.Channel, error)
|
||||
UserBelongsToChannels(userId string, channelIds []string) (bool, error)
|
||||
|
||||
@@ -241,9 +241,9 @@ type ChannelStore interface {
|
||||
}
|
||||
|
||||
type ChannelMemberHistoryStore interface {
|
||||
LogJoinEvent(userId string, channelId string, joinTime int64) error
|
||||
LogLeaveEvent(userId string, channelId string, leaveTime int64) error
|
||||
GetUsersInChannelDuring(startTime int64, endTime int64, channelId string) ([]*model.ChannelMemberHistoryResult, error)
|
||||
LogJoinEvent(userId string, channelID string, joinTime int64) error
|
||||
LogLeaveEvent(userId string, channelID string, leaveTime int64) error
|
||||
GetUsersInChannelDuring(startTime int64, endTime int64, channelID string) ([]*model.ChannelMemberHistoryResult, error)
|
||||
PermanentDeleteBatch(endTime int64, limit int64) (int64, error)
|
||||
}
|
||||
type ThreadStore interface {
|
||||
@@ -257,15 +257,15 @@ type ThreadStore interface {
|
||||
GetPosts(threadId string, since int64) ([]*model.Post, error)
|
||||
GetThreadMentionsForUserPerChannel(userId, teamId string) (map[string]int64, error)
|
||||
|
||||
MarkAllAsRead(userId, teamId string) error
|
||||
MarkAsRead(userId, threadId string, timestamp int64) error
|
||||
MarkAllAsRead(userId, teamID string) error
|
||||
MarkAsRead(userId, threadID string, timestamp int64) error
|
||||
|
||||
SaveMembership(membership *model.ThreadMembership) (*model.ThreadMembership, error)
|
||||
UpdateMembership(membership *model.ThreadMembership) (*model.ThreadMembership, error)
|
||||
GetMembershipsForUser(userId, teamId string) ([]*model.ThreadMembership, error)
|
||||
GetMembershipForUser(userId, postId string) (*model.ThreadMembership, error)
|
||||
DeleteMembershipForUser(userId, postId string) error
|
||||
CreateMembershipIfNeeded(userId, postId string, following, incrementMentions, updateFollowing bool) error
|
||||
GetMembershipsForUser(userId, teamID string) ([]*model.ThreadMembership, error)
|
||||
GetMembershipForUser(userId, postID string) (*model.ThreadMembership, error)
|
||||
DeleteMembershipForUser(userId, postID string) error
|
||||
CreateMembershipIfNeeded(userId, postID string, following, incrementMentions, updateFollowing bool) error
|
||||
CollectThreadsWithNewerReplies(userId string, channelIds []string, timestamp int64) ([]string, error)
|
||||
UpdateUnreadsByChannel(userId string, changedThreads []string, timestamp int64, updateViewedTimestamp bool) error
|
||||
}
|
||||
@@ -276,28 +276,28 @@ type PostStore interface {
|
||||
Update(newPost *model.Post, oldPost *model.Post) (*model.Post, error)
|
||||
Get(id string, skipFetchThreads, collapsedThreads, collapsedThreadsExtended bool) (*model.PostList, error)
|
||||
GetSingle(id string) (*model.Post, error)
|
||||
Delete(postId string, time int64, deleteByID string) error
|
||||
Delete(postID string, time int64, deleteByID string) error
|
||||
PermanentDeleteByUser(userId string) error
|
||||
PermanentDeleteByChannel(channelId string) error
|
||||
PermanentDeleteByChannel(channelID string) error
|
||||
GetPosts(options model.GetPostsOptions, allowFromCache bool) (*model.PostList, error)
|
||||
GetFlaggedPosts(userId string, offset int, limit int) (*model.PostList, error)
|
||||
// @openTracingParams userId, teamId, offset, limit
|
||||
GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) (*model.PostList, error)
|
||||
GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) (*model.PostList, error)
|
||||
// @openTracingParams userId, teamID, offset, limit
|
||||
GetFlaggedPostsForTeam(userId, teamID string, offset int, limit int) (*model.PostList, error)
|
||||
GetFlaggedPostsForChannel(userId, channelID string, offset int, limit int) (*model.PostList, error)
|
||||
GetPostsBefore(options model.GetPostsOptions) (*model.PostList, error)
|
||||
GetPostsAfter(options model.GetPostsOptions) (*model.PostList, error)
|
||||
GetPostsSince(options model.GetPostsSinceOptions, allowFromCache bool) (*model.PostList, error)
|
||||
GetPostAfterTime(channelId string, time int64) (*model.Post, error)
|
||||
GetPostIdAfterTime(channelId string, time int64) (string, error)
|
||||
GetPostIdBeforeTime(channelId string, time int64) (string, error)
|
||||
GetEtag(channelId string, allowFromCache bool, collapsedThreads bool) string
|
||||
Search(teamId string, userId string, params *model.SearchParams) (*model.PostList, error)
|
||||
AnalyticsUserCountsWithPostsByDay(teamId string) (model.AnalyticsRows, error)
|
||||
GetPostAfterTime(channelID string, time int64) (*model.Post, error)
|
||||
GetPostIdAfterTime(channelID string, time int64) (string, error)
|
||||
GetPostIdBeforeTime(channelID string, time int64) (string, error)
|
||||
GetEtag(channelID string, allowFromCache bool, collapsedThreads bool) string
|
||||
Search(teamID string, userId string, params *model.SearchParams) (*model.PostList, error)
|
||||
AnalyticsUserCountsWithPostsByDay(teamID string) (model.AnalyticsRows, error)
|
||||
AnalyticsPostCountsByDay(options *model.AnalyticsPostCountsOptions) (model.AnalyticsRows, error)
|
||||
AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) (int64, error)
|
||||
AnalyticsPostCount(teamID string, mustHaveFile bool, mustHaveHashtag bool) (int64, error)
|
||||
ClearCaches()
|
||||
InvalidateLastPostTimeCache(channelId string)
|
||||
GetPostsCreatedAt(channelId string, time int64) ([]*model.Post, error)
|
||||
InvalidateLastPostTimeCache(channelID string)
|
||||
GetPostsCreatedAt(channelID string, time int64) ([]*model.Post, error)
|
||||
Overwrite(post *model.Post) (*model.Post, error)
|
||||
OverwriteMultiple(posts []*model.Post) ([]*model.Post, int, error)
|
||||
GetPostsByIds(postIds []string) ([]*model.Post, error)
|
||||
@@ -305,10 +305,10 @@ type PostStore interface {
|
||||
PermanentDeleteBatch(endTime int64, limit int64) (int64, error)
|
||||
GetOldest() (*model.Post, error)
|
||||
GetMaxPostSize() int
|
||||
GetParentsForExportAfter(limit int, afterId string) ([]*model.PostForExport, error)
|
||||
GetRepliesForExport(parentId string) ([]*model.ReplyForExport, error)
|
||||
GetDirectPostParentsForExportAfter(limit int, afterId string) ([]*model.DirectPostForExport, error)
|
||||
SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId, teamId string, page, perPage int) (*model.PostSearchResults, error)
|
||||
GetParentsForExportAfter(limit int, afterID string) ([]*model.PostForExport, error)
|
||||
GetRepliesForExport(parentID string) ([]*model.ReplyForExport, error)
|
||||
GetDirectPostParentsForExportAfter(limit int, afterID string) ([]*model.DirectPostForExport, error)
|
||||
SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId, teamID string, page, perPage int) (*model.PostSearchResults, error)
|
||||
GetOldestEntityCreationTime() (int64, error)
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ type UserStore interface {
|
||||
GetAll() ([]*model.User, error)
|
||||
ClearCaches()
|
||||
InvalidateProfilesInChannelCacheByUser(userId string)
|
||||
InvalidateProfilesInChannelCache(channelId string)
|
||||
InvalidateProfilesInChannelCache(channelID string)
|
||||
GetProfilesInChannel(options *model.UserGetOptions) ([]*model.User, error)
|
||||
GetProfilesInChannelByStatus(options *model.UserGetOptions) ([]*model.User, error)
|
||||
GetAllProfilesInChannel(ctx context.Context, channelId string, allowFromCache bool) (map[string]*model.User, error)
|
||||
@@ -344,35 +344,35 @@ type UserStore interface {
|
||||
GetAllUsingAuthService(authService string) ([]*model.User, error)
|
||||
GetAllNotInAuthService(authServices []string) ([]*model.User, error)
|
||||
GetByUsername(username string) (*model.User, error)
|
||||
GetForLogin(loginId string, allowSignInWithUsername, allowSignInWithEmail bool) (*model.User, error)
|
||||
GetForLogin(loginID string, allowSignInWithUsername, allowSignInWithEmail bool) (*model.User, error)
|
||||
VerifyEmail(userId, email string) (string, error)
|
||||
GetEtagForAllProfiles() string
|
||||
GetEtagForProfiles(teamId string) string
|
||||
GetEtagForProfiles(teamID string) string
|
||||
UpdateFailedPasswordAttempts(userId string, attempts int) error
|
||||
GetSystemAdminProfiles() (map[string]*model.User, error)
|
||||
PermanentDelete(userId string) error
|
||||
AnalyticsActiveCount(time int64, options model.UserCountOptions) (int64, error)
|
||||
AnalyticsActiveCountForPeriod(startTime int64, endTime int64, options model.UserCountOptions) (int64, error)
|
||||
GetUnreadCount(userId string) (int64, error)
|
||||
GetUnreadCountForChannel(userId string, channelId string) (int64, error)
|
||||
GetAnyUnreadPostCountForChannel(userId string, channelId string) (int64, error)
|
||||
GetRecentlyActiveUsersForTeam(teamId string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
|
||||
GetNewUsersForTeam(teamId string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
|
||||
Search(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, error)
|
||||
GetUnreadCountForChannel(userId string, channelID string) (int64, error)
|
||||
GetAnyUnreadPostCountForChannel(userId string, channelID string) (int64, error)
|
||||
GetRecentlyActiveUsersForTeam(teamID string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
|
||||
GetNewUsersForTeam(teamID string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
|
||||
Search(teamID string, term string, options *model.UserSearchOptions) ([]*model.User, error)
|
||||
SearchNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, error)
|
||||
SearchInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error)
|
||||
SearchNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error)
|
||||
SearchInChannel(channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error)
|
||||
SearchNotInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error)
|
||||
SearchWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, error)
|
||||
SearchInGroup(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, error)
|
||||
AnalyticsGetInactiveUsersCount() (int64, error)
|
||||
AnalyticsGetExternalUsers(hostDomain string) (bool, error)
|
||||
AnalyticsGetSystemAdminCount() (int64, error)
|
||||
AnalyticsGetGuestCount() (int64, error)
|
||||
GetProfilesNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
|
||||
GetEtagForProfilesNotInTeam(teamId string) string
|
||||
GetProfilesNotInTeam(teamID string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
|
||||
GetEtagForProfilesNotInTeam(teamID string) string
|
||||
ClearAllCustomRoleAssignments() error
|
||||
InferSystemInstallDate() (int64, error)
|
||||
GetAllAfter(limit int, afterId string) ([]*model.User, error)
|
||||
GetAllAfter(limit int, afterID string) ([]*model.User, error)
|
||||
GetUsersBatchForIndexing(startTime, endTime int64, limit int) ([]*model.UserForIndexing, error)
|
||||
Count(options model.UserCountOptions) (int64, error)
|
||||
GetTeamGroupUsers(teamID string) ([]*model.User, error)
|
||||
@@ -380,7 +380,7 @@ type UserStore interface {
|
||||
PromoteGuestToUser(userID string) error
|
||||
DemoteUserToGuest(userID string) (*model.User, error)
|
||||
DeactivateGuests() ([]string, error)
|
||||
AutocompleteUsersInChannel(teamId, channelId, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error)
|
||||
AutocompleteUsersInChannel(teamID, channelID, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error)
|
||||
GetKnownUsers(userID string) ([]string, error)
|
||||
}
|
||||
|
||||
@@ -393,19 +393,19 @@ type BotStore interface {
|
||||
}
|
||||
|
||||
type SessionStore interface {
|
||||
Get(sessionIdOrToken string) (*model.Session, error)
|
||||
Get(sessionIDOrToken string) (*model.Session, error)
|
||||
Save(session *model.Session) (*model.Session, error)
|
||||
GetSessions(userId string) ([]*model.Session, error)
|
||||
GetSessionsWithActiveDeviceIds(userId string) ([]*model.Session, error)
|
||||
GetSessionsExpired(thresholdMillis int64, mobileOnly bool, unnotifiedOnly bool) ([]*model.Session, error)
|
||||
UpdateExpiredNotify(sessionid string, notified bool) error
|
||||
Remove(sessionIdOrToken string) error
|
||||
Remove(sessionIDOrToken string) error
|
||||
RemoveAllSessions() error
|
||||
PermanentDeleteSessionsByUser(teamId string) error
|
||||
UpdateExpiresAt(sessionId string, time int64) error
|
||||
UpdateLastActivityAt(sessionId string, time int64) error
|
||||
PermanentDeleteSessionsByUser(teamID string) error
|
||||
UpdateExpiresAt(sessionID string, time int64) error
|
||||
UpdateLastActivityAt(sessionID string, time int64) error
|
||||
UpdateRoles(userId string, roles string) (string, error)
|
||||
UpdateDeviceId(id string, deviceId string, expiresAt int64) (string, error)
|
||||
UpdateDeviceId(id string, deviceID string, expiresAt int64) (string, error)
|
||||
UpdateProps(session *model.Session) error
|
||||
AnalyticsSessionCount() (int64, error)
|
||||
Cleanup(expiryTime int64, batchSize int64)
|
||||
@@ -473,43 +473,43 @@ type WebhookStore interface {
|
||||
GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, error)
|
||||
GetIncomingList(offset, limit int) ([]*model.IncomingWebhook, error)
|
||||
GetIncomingListByUser(userId string, offset, limit int) ([]*model.IncomingWebhook, error)
|
||||
GetIncomingByTeam(teamId string, offset, limit int) ([]*model.IncomingWebhook, error)
|
||||
GetIncomingByTeamByUser(teamId string, userId string, offset, limit int) ([]*model.IncomingWebhook, error)
|
||||
GetIncomingByTeam(teamID string, offset, limit int) ([]*model.IncomingWebhook, error)
|
||||
GetIncomingByTeamByUser(teamID string, userId string, offset, limit int) ([]*model.IncomingWebhook, error)
|
||||
UpdateIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error)
|
||||
GetIncomingByChannel(channelId string) ([]*model.IncomingWebhook, error)
|
||||
DeleteIncoming(webhookId string, time int64) error
|
||||
PermanentDeleteIncomingByChannel(channelId string) error
|
||||
GetIncomingByChannel(channelID string) ([]*model.IncomingWebhook, error)
|
||||
DeleteIncoming(webhookID string, time int64) error
|
||||
PermanentDeleteIncomingByChannel(channelID string) error
|
||||
PermanentDeleteIncomingByUser(userId string) error
|
||||
|
||||
SaveOutgoing(webhook *model.OutgoingWebhook) (*model.OutgoingWebhook, error)
|
||||
GetOutgoing(id string) (*model.OutgoingWebhook, error)
|
||||
GetOutgoingByChannel(channelId string, offset, limit int) ([]*model.OutgoingWebhook, error)
|
||||
GetOutgoingByChannelByUser(channelId string, userId string, offset, limit int) ([]*model.OutgoingWebhook, error)
|
||||
GetOutgoingByChannel(channelID string, offset, limit int) ([]*model.OutgoingWebhook, error)
|
||||
GetOutgoingByChannelByUser(channelID string, userId string, offset, limit int) ([]*model.OutgoingWebhook, error)
|
||||
GetOutgoingList(offset, limit int) ([]*model.OutgoingWebhook, error)
|
||||
GetOutgoingListByUser(userId string, offset, limit int) ([]*model.OutgoingWebhook, error)
|
||||
GetOutgoingByTeam(teamId string, offset, limit int) ([]*model.OutgoingWebhook, error)
|
||||
GetOutgoingByTeamByUser(teamId string, userId string, offset, limit int) ([]*model.OutgoingWebhook, error)
|
||||
DeleteOutgoing(webhookId string, time int64) error
|
||||
PermanentDeleteOutgoingByChannel(channelId string) error
|
||||
GetOutgoingByTeam(teamID string, offset, limit int) ([]*model.OutgoingWebhook, error)
|
||||
GetOutgoingByTeamByUser(teamID string, userId string, offset, limit int) ([]*model.OutgoingWebhook, error)
|
||||
DeleteOutgoing(webhookID string, time int64) error
|
||||
PermanentDeleteOutgoingByChannel(channelID string) error
|
||||
PermanentDeleteOutgoingByUser(userId string) error
|
||||
UpdateOutgoing(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, error)
|
||||
|
||||
AnalyticsIncomingCount(teamId string) (int64, error)
|
||||
AnalyticsOutgoingCount(teamId string) (int64, error)
|
||||
AnalyticsIncomingCount(teamID string) (int64, error)
|
||||
AnalyticsOutgoingCount(teamID string) (int64, error)
|
||||
InvalidateWebhookCache(webhook string)
|
||||
ClearCaches()
|
||||
}
|
||||
|
||||
type CommandStore interface {
|
||||
Save(webhook *model.Command) (*model.Command, error)
|
||||
GetByTrigger(teamId string, trigger string) (*model.Command, error)
|
||||
GetByTrigger(teamID string, trigger string) (*model.Command, error)
|
||||
Get(id string) (*model.Command, error)
|
||||
GetByTeam(teamId string) ([]*model.Command, error)
|
||||
Delete(commandId string, time int64) error
|
||||
PermanentDeleteByTeam(teamId string) error
|
||||
GetByTeam(teamID string) ([]*model.Command, error)
|
||||
Delete(commandID string, time int64) error
|
||||
PermanentDeleteByTeam(teamID string) error
|
||||
PermanentDeleteByUser(userId string) error
|
||||
Update(hook *model.Command) (*model.Command, error)
|
||||
AnalyticsCommandCount(teamId string) (int64, error)
|
||||
AnalyticsCommandCount(teamID string) (int64, error)
|
||||
}
|
||||
|
||||
type CommandWebhookStore interface {
|
||||
@@ -569,17 +569,17 @@ type FileInfoStore interface {
|
||||
Get(id string) (*model.FileInfo, error)
|
||||
GetByIds(ids []string) ([]*model.FileInfo, error)
|
||||
GetByPath(path string) (*model.FileInfo, error)
|
||||
GetForPost(postId string, readFromMaster, includeDeleted, allowFromCache bool) ([]*model.FileInfo, error)
|
||||
GetForPost(postID string, readFromMaster, includeDeleted, allowFromCache bool) ([]*model.FileInfo, error)
|
||||
GetForUser(userId string) ([]*model.FileInfo, error)
|
||||
GetWithOptions(page, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, error)
|
||||
InvalidateFileInfosForPostCache(postId string, deleted bool)
|
||||
AttachToPost(fileId string, postId string, creatorId string) error
|
||||
DeleteForPost(postId string) (string, error)
|
||||
PermanentDelete(fileId string) error
|
||||
InvalidateFileInfosForPostCache(postID string, deleted bool)
|
||||
AttachToPost(fileID string, postID string, creatorId string) error
|
||||
DeleteForPost(postID string) (string, error)
|
||||
PermanentDelete(fileID string) error
|
||||
PermanentDeleteBatch(endTime int64, limit int64) (int64, error)
|
||||
PermanentDeleteByUser(userId string) (int64, error)
|
||||
SetContent(fileId, content string) error
|
||||
Search(paramsList []*model.SearchParams, userId, teamId string, page, perPage int) (*model.FileInfoList, error)
|
||||
SetContent(fileID, content string) error
|
||||
Search(paramsList []*model.SearchParams, userId, teamID string, page, perPage int) (*model.FileInfoList, error)
|
||||
ClearCaches()
|
||||
}
|
||||
|
||||
@@ -594,7 +594,7 @@ type UploadSessionStore interface {
|
||||
type ReactionStore interface {
|
||||
Save(reaction *model.Reaction) (*model.Reaction, error)
|
||||
Delete(reaction *model.Reaction) (*model.Reaction, error)
|
||||
GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, error)
|
||||
GetForPost(postID string, allowFromCache bool) ([]*model.Reaction, error)
|
||||
DeleteAllWithEmojiName(emojiName string) error
|
||||
PermanentDeleteBatch(endTime int64, limit int64) (int64, error)
|
||||
BulkGetForPosts(postIds []string) ([]*model.Reaction, error)
|
||||
@@ -619,35 +619,35 @@ type JobStore interface {
|
||||
type UserAccessTokenStore interface {
|
||||
Save(token *model.UserAccessToken) (*model.UserAccessToken, error)
|
||||
DeleteAllForUser(userId string) error
|
||||
Delete(tokenId string) error
|
||||
Get(tokenId string) (*model.UserAccessToken, error)
|
||||
Delete(tokenID string) error
|
||||
Get(tokenID string) (*model.UserAccessToken, error)
|
||||
GetAll(offset int, limit int) ([]*model.UserAccessToken, error)
|
||||
GetByToken(tokenString string) (*model.UserAccessToken, error)
|
||||
GetByUser(userId string, page, perPage int) ([]*model.UserAccessToken, error)
|
||||
Search(term string) ([]*model.UserAccessToken, error)
|
||||
UpdateTokenEnable(tokenId string) error
|
||||
UpdateTokenDisable(tokenId string) error
|
||||
UpdateTokenEnable(tokenID string) error
|
||||
UpdateTokenDisable(tokenID string) error
|
||||
}
|
||||
|
||||
type PluginStore interface {
|
||||
SaveOrUpdate(keyVal *model.PluginKeyValue) (*model.PluginKeyValue, error)
|
||||
CompareAndSet(keyVal *model.PluginKeyValue, oldValue []byte) (bool, error)
|
||||
CompareAndDelete(keyVal *model.PluginKeyValue, oldValue []byte) (bool, error)
|
||||
SetWithOptions(pluginId string, key string, value []byte, options model.PluginKVSetOptions) (bool, error)
|
||||
Get(pluginId, key string) (*model.PluginKeyValue, error)
|
||||
Delete(pluginId, key string) error
|
||||
DeleteAllForPlugin(PluginId string) error
|
||||
SetWithOptions(pluginID string, key string, value []byte, options model.PluginKVSetOptions) (bool, error)
|
||||
Get(pluginID, key string) (*model.PluginKeyValue, error)
|
||||
Delete(pluginID, key string) error
|
||||
DeleteAllForPlugin(PluginID string) error
|
||||
DeleteAllExpired() error
|
||||
List(pluginId string, page, perPage int) ([]string, error)
|
||||
List(pluginID string, page, perPage int) ([]string, error)
|
||||
}
|
||||
|
||||
type RoleStore interface {
|
||||
Save(role *model.Role) (*model.Role, error)
|
||||
Get(roleId string) (*model.Role, error)
|
||||
Get(roleID string) (*model.Role, error)
|
||||
GetAll() ([]*model.Role, error)
|
||||
GetByName(name string) (*model.Role, error)
|
||||
GetByNames(names []string) ([]*model.Role, error)
|
||||
Delete(roleId string) (*model.Role, error)
|
||||
Delete(roleID string) (*model.Role, error)
|
||||
PermanentDeleteAll() error
|
||||
|
||||
// HigherScopedPermissions retrieves the higher-scoped permissions of a list of role names. The higher-scope
|
||||
@@ -664,10 +664,10 @@ type RoleStore interface {
|
||||
|
||||
type SchemeStore interface {
|
||||
Save(scheme *model.Scheme) (*model.Scheme, error)
|
||||
Get(schemeId string) (*model.Scheme, error)
|
||||
Get(schemeID string) (*model.Scheme, error)
|
||||
GetByName(schemeName string) (*model.Scheme, error)
|
||||
GetAllPage(scope string, offset int, limit int) ([]*model.Scheme, error)
|
||||
Delete(schemeId string) (*model.Scheme, error)
|
||||
Delete(schemeID string) (*model.Scheme, error)
|
||||
PermanentDeleteAll() error
|
||||
CountByScope(scope string) (int64, error)
|
||||
CountWithoutPermission(scope, permissionID string, roleScope model.RoleScope, roleType model.RoleType) (int64, error)
|
||||
@@ -738,12 +738,12 @@ type GroupStore interface {
|
||||
// ChannelMembersToRemove returns all channel members that should be removed based on group constraints.
|
||||
ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, error)
|
||||
|
||||
GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)
|
||||
CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, error)
|
||||
GetGroupsByChannel(channelID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)
|
||||
CountGroupsByChannel(channelID string, opts model.GroupSearchOpts) (int64, error)
|
||||
|
||||
GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)
|
||||
GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error)
|
||||
CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, error)
|
||||
GetGroupsByTeam(teamID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)
|
||||
GetGroupsAssociatedToChannelsByTeam(teamID string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error)
|
||||
CountGroupsByTeam(teamID string, opts model.GroupSearchOpts) (int64, error)
|
||||
|
||||
GetGroups(page, perPage int, opts model.GroupSearchOpts) ([]*model.Group, error)
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@ type ChannelMemberHistoryStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// GetUsersInChannelDuring provides a mock function with given fields: startTime, endTime, channelId
|
||||
func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, endTime int64, channelId string) ([]*model.ChannelMemberHistoryResult, error) {
|
||||
ret := _m.Called(startTime, endTime, channelId)
|
||||
// GetUsersInChannelDuring provides a mock function with given fields: startTime, endTime, channelID
|
||||
func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, endTime int64, channelID string) ([]*model.ChannelMemberHistoryResult, error) {
|
||||
ret := _m.Called(startTime, endTime, channelID)
|
||||
|
||||
var r0 []*model.ChannelMemberHistoryResult
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, string) []*model.ChannelMemberHistoryResult); ok {
|
||||
r0 = rf(startTime, endTime, channelId)
|
||||
r0 = rf(startTime, endTime, channelID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.ChannelMemberHistoryResult)
|
||||
@@ -29,7 +29,7 @@ func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, en
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, int64, string) error); ok {
|
||||
r1 = rf(startTime, endTime, channelId)
|
||||
r1 = rf(startTime, endTime, channelID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -37,13 +37,13 @@ func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, en
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// LogJoinEvent provides a mock function with given fields: userId, channelId, joinTime
|
||||
func (_m *ChannelMemberHistoryStore) LogJoinEvent(userId string, channelId string, joinTime int64) error {
|
||||
ret := _m.Called(userId, channelId, joinTime)
|
||||
// LogJoinEvent provides a mock function with given fields: userId, channelID, joinTime
|
||||
func (_m *ChannelMemberHistoryStore) LogJoinEvent(userId string, channelID string, joinTime int64) error {
|
||||
ret := _m.Called(userId, channelID, joinTime)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64) error); ok {
|
||||
r0 = rf(userId, channelId, joinTime)
|
||||
r0 = rf(userId, channelID, joinTime)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -51,13 +51,13 @@ func (_m *ChannelMemberHistoryStore) LogJoinEvent(userId string, channelId strin
|
||||
return r0
|
||||
}
|
||||
|
||||
// LogLeaveEvent provides a mock function with given fields: userId, channelId, leaveTime
|
||||
func (_m *ChannelMemberHistoryStore) LogLeaveEvent(userId string, channelId string, leaveTime int64) error {
|
||||
ret := _m.Called(userId, channelId, leaveTime)
|
||||
// LogLeaveEvent provides a mock function with given fields: userId, channelID, leaveTime
|
||||
func (_m *ChannelMemberHistoryStore) LogLeaveEvent(userId string, channelID string, leaveTime int64) error {
|
||||
ret := _m.Called(userId, channelID, leaveTime)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64) error); ok {
|
||||
r0 = rf(userId, channelId, leaveTime)
|
||||
r0 = rf(userId, channelID, leaveTime)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -14,20 +14,20 @@ type CommandStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// AnalyticsCommandCount provides a mock function with given fields: teamId
|
||||
func (_m *CommandStore) AnalyticsCommandCount(teamId string) (int64, error) {
|
||||
ret := _m.Called(teamId)
|
||||
// AnalyticsCommandCount provides a mock function with given fields: teamID
|
||||
func (_m *CommandStore) AnalyticsCommandCount(teamID string) (int64, error) {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(teamId)
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -35,13 +35,13 @@ func (_m *CommandStore) AnalyticsCommandCount(teamId string) (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: commandId, time
|
||||
func (_m *CommandStore) Delete(commandId string, time int64) error {
|
||||
ret := _m.Called(commandId, time)
|
||||
// Delete provides a mock function with given fields: commandID, time
|
||||
func (_m *CommandStore) Delete(commandID string, time int64) error {
|
||||
ret := _m.Called(commandID, time)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
|
||||
r0 = rf(commandId, time)
|
||||
r0 = rf(commandID, time)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -72,13 +72,13 @@ func (_m *CommandStore) Get(id string) (*model.Command, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetByTeam provides a mock function with given fields: teamId
|
||||
func (_m *CommandStore) GetByTeam(teamId string) ([]*model.Command, error) {
|
||||
ret := _m.Called(teamId)
|
||||
// GetByTeam provides a mock function with given fields: teamID
|
||||
func (_m *CommandStore) GetByTeam(teamID string) ([]*model.Command, error) {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 []*model.Command
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Command); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Command)
|
||||
@@ -87,7 +87,7 @@ func (_m *CommandStore) GetByTeam(teamId string) ([]*model.Command, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(teamId)
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -95,13 +95,13 @@ func (_m *CommandStore) GetByTeam(teamId string) ([]*model.Command, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetByTrigger provides a mock function with given fields: teamId, trigger
|
||||
func (_m *CommandStore) GetByTrigger(teamId string, trigger string) (*model.Command, error) {
|
||||
ret := _m.Called(teamId, trigger)
|
||||
// GetByTrigger provides a mock function with given fields: teamID, trigger
|
||||
func (_m *CommandStore) GetByTrigger(teamID string, trigger string) (*model.Command, error) {
|
||||
ret := _m.Called(teamID, trigger)
|
||||
|
||||
var r0 *model.Command
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.Command); ok {
|
||||
r0 = rf(teamId, trigger)
|
||||
r0 = rf(teamID, trigger)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Command)
|
||||
@@ -110,7 +110,7 @@ func (_m *CommandStore) GetByTrigger(teamId string, trigger string) (*model.Comm
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(teamId, trigger)
|
||||
r1 = rf(teamID, trigger)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -118,13 +118,13 @@ func (_m *CommandStore) GetByTrigger(teamId string, trigger string) (*model.Comm
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDeleteByTeam provides a mock function with given fields: teamId
|
||||
func (_m *CommandStore) PermanentDeleteByTeam(teamId string) error {
|
||||
ret := _m.Called(teamId)
|
||||
// PermanentDeleteByTeam provides a mock function with given fields: teamID
|
||||
func (_m *CommandStore) PermanentDeleteByTeam(teamID string) error {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@ type FileInfoStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// AttachToPost provides a mock function with given fields: fileId, postId, creatorId
|
||||
func (_m *FileInfoStore) AttachToPost(fileId string, postId string, creatorId string) error {
|
||||
ret := _m.Called(fileId, postId, creatorId)
|
||||
// AttachToPost provides a mock function with given fields: fileID, postID, creatorId
|
||||
func (_m *FileInfoStore) AttachToPost(fileID string, postID string, creatorId string) error {
|
||||
ret := _m.Called(fileID, postID, creatorId)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
|
||||
r0 = rf(fileId, postId, creatorId)
|
||||
r0 = rf(fileID, postID, creatorId)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -33,20 +33,20 @@ func (_m *FileInfoStore) ClearCaches() {
|
||||
_m.Called()
|
||||
}
|
||||
|
||||
// DeleteForPost provides a mock function with given fields: postId
|
||||
func (_m *FileInfoStore) DeleteForPost(postId string) (string, error) {
|
||||
ret := _m.Called(postId)
|
||||
// DeleteForPost provides a mock function with given fields: postID
|
||||
func (_m *FileInfoStore) DeleteForPost(postID string) (string, error) {
|
||||
ret := _m.Called(postID)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string) string); ok {
|
||||
r0 = rf(postId)
|
||||
r0 = rf(postID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(postId)
|
||||
r1 = rf(postID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -123,13 +123,13 @@ func (_m *FileInfoStore) GetByPath(path string) (*model.FileInfo, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetForPost provides a mock function with given fields: postId, readFromMaster, includeDeleted, allowFromCache
|
||||
func (_m *FileInfoStore) GetForPost(postId string, readFromMaster bool, includeDeleted bool, allowFromCache bool) ([]*model.FileInfo, error) {
|
||||
ret := _m.Called(postId, readFromMaster, includeDeleted, allowFromCache)
|
||||
// GetForPost provides a mock function with given fields: postID, readFromMaster, includeDeleted, allowFromCache
|
||||
func (_m *FileInfoStore) GetForPost(postID string, readFromMaster bool, includeDeleted bool, allowFromCache bool) ([]*model.FileInfo, error) {
|
||||
ret := _m.Called(postID, readFromMaster, includeDeleted, allowFromCache)
|
||||
|
||||
var r0 []*model.FileInfo
|
||||
if rf, ok := ret.Get(0).(func(string, bool, bool, bool) []*model.FileInfo); ok {
|
||||
r0 = rf(postId, readFromMaster, includeDeleted, allowFromCache)
|
||||
r0 = rf(postID, readFromMaster, includeDeleted, allowFromCache)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.FileInfo)
|
||||
@@ -138,7 +138,7 @@ func (_m *FileInfoStore) GetForPost(postId string, readFromMaster bool, includeD
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool, bool, bool) error); ok {
|
||||
r1 = rf(postId, readFromMaster, includeDeleted, allowFromCache)
|
||||
r1 = rf(postID, readFromMaster, includeDeleted, allowFromCache)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -192,18 +192,18 @@ func (_m *FileInfoStore) GetWithOptions(page int, perPage int, opt *model.GetFil
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// InvalidateFileInfosForPostCache provides a mock function with given fields: postId, deleted
|
||||
func (_m *FileInfoStore) InvalidateFileInfosForPostCache(postId string, deleted bool) {
|
||||
_m.Called(postId, deleted)
|
||||
// InvalidateFileInfosForPostCache provides a mock function with given fields: postID, deleted
|
||||
func (_m *FileInfoStore) InvalidateFileInfosForPostCache(postID string, deleted bool) {
|
||||
_m.Called(postID, deleted)
|
||||
}
|
||||
|
||||
// PermanentDelete provides a mock function with given fields: fileId
|
||||
func (_m *FileInfoStore) PermanentDelete(fileId string) error {
|
||||
ret := _m.Called(fileId)
|
||||
// PermanentDelete provides a mock function with given fields: fileID
|
||||
func (_m *FileInfoStore) PermanentDelete(fileID string) error {
|
||||
ret := _m.Called(fileID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(fileId)
|
||||
r0 = rf(fileID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -276,13 +276,13 @@ func (_m *FileInfoStore) Save(info *model.FileInfo) (*model.FileInfo, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Search provides a mock function with given fields: paramsList, userId, teamId, page, perPage
|
||||
func (_m *FileInfoStore) Search(paramsList []*model.SearchParams, userId string, teamId string, page int, perPage int) (*model.FileInfoList, error) {
|
||||
ret := _m.Called(paramsList, userId, teamId, page, perPage)
|
||||
// Search provides a mock function with given fields: paramsList, userId, teamID, page, perPage
|
||||
func (_m *FileInfoStore) Search(paramsList []*model.SearchParams, userId string, teamID string, page int, perPage int) (*model.FileInfoList, error) {
|
||||
ret := _m.Called(paramsList, userId, teamID, page, perPage)
|
||||
|
||||
var r0 *model.FileInfoList
|
||||
if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) *model.FileInfoList); ok {
|
||||
r0 = rf(paramsList, userId, teamId, page, perPage)
|
||||
r0 = rf(paramsList, userId, teamID, page, perPage)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.FileInfoList)
|
||||
@@ -291,7 +291,7 @@ func (_m *FileInfoStore) Search(paramsList []*model.SearchParams, userId string,
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]*model.SearchParams, string, string, int, int) error); ok {
|
||||
r1 = rf(paramsList, userId, teamId, page, perPage)
|
||||
r1 = rf(paramsList, userId, teamID, page, perPage)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -299,13 +299,13 @@ func (_m *FileInfoStore) Search(paramsList []*model.SearchParams, userId string,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SetContent provides a mock function with given fields: fileId, content
|
||||
func (_m *FileInfoStore) SetContent(fileId string, content string) error {
|
||||
ret := _m.Called(fileId, content)
|
||||
// SetContent provides a mock function with given fields: fileID, content
|
||||
func (_m *FileInfoStore) SetContent(fileID string, content string) error {
|
||||
ret := _m.Called(fileID, content)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(fileId, content)
|
||||
r0 = rf(fileID, content)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -127,20 +127,20 @@ func (_m *GroupStore) CountChannelMembersMinusGroupMembers(channelID string, gro
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CountGroupsByChannel provides a mock function with given fields: channelId, opts
|
||||
func (_m *GroupStore) CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, error) {
|
||||
ret := _m.Called(channelId, opts)
|
||||
// CountGroupsByChannel provides a mock function with given fields: channelID, opts
|
||||
func (_m *GroupStore) CountGroupsByChannel(channelID string, opts model.GroupSearchOpts) (int64, error) {
|
||||
ret := _m.Called(channelID, opts)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) int64); ok {
|
||||
r0 = rf(channelId, opts)
|
||||
r0 = rf(channelID, opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(channelId, opts)
|
||||
r1 = rf(channelID, opts)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -148,20 +148,20 @@ func (_m *GroupStore) CountGroupsByChannel(channelId string, opts model.GroupSea
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CountGroupsByTeam provides a mock function with given fields: teamId, opts
|
||||
func (_m *GroupStore) CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, error) {
|
||||
ret := _m.Called(teamId, opts)
|
||||
// CountGroupsByTeam provides a mock function with given fields: teamID, opts
|
||||
func (_m *GroupStore) CountGroupsByTeam(teamID string, opts model.GroupSearchOpts) (int64, error) {
|
||||
ret := _m.Called(teamID, opts)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) int64); ok {
|
||||
r0 = rf(teamId, opts)
|
||||
r0 = rf(teamID, opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(teamId, opts)
|
||||
r1 = rf(teamID, opts)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -533,13 +533,13 @@ func (_m *GroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpt
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetGroupsAssociatedToChannelsByTeam provides a mock function with given fields: teamId, opts
|
||||
func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error) {
|
||||
ret := _m.Called(teamId, opts)
|
||||
// GetGroupsAssociatedToChannelsByTeam provides a mock function with given fields: teamID, opts
|
||||
func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamID string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error) {
|
||||
ret := _m.Called(teamID, opts)
|
||||
|
||||
var r0 map[string][]*model.GroupWithSchemeAdmin
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) map[string][]*model.GroupWithSchemeAdmin); ok {
|
||||
r0 = rf(teamId, opts)
|
||||
r0 = rf(teamID, opts)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(map[string][]*model.GroupWithSchemeAdmin)
|
||||
@@ -548,7 +548,7 @@ func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts mo
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(teamId, opts)
|
||||
r1 = rf(teamID, opts)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -556,13 +556,13 @@ func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts mo
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetGroupsByChannel provides a mock function with given fields: channelId, opts
|
||||
func (_m *GroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
|
||||
ret := _m.Called(channelId, opts)
|
||||
// GetGroupsByChannel provides a mock function with given fields: channelID, opts
|
||||
func (_m *GroupStore) GetGroupsByChannel(channelID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
|
||||
ret := _m.Called(channelID, opts)
|
||||
|
||||
var r0 []*model.GroupWithSchemeAdmin
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) []*model.GroupWithSchemeAdmin); ok {
|
||||
r0 = rf(channelId, opts)
|
||||
r0 = rf(channelID, opts)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.GroupWithSchemeAdmin)
|
||||
@@ -571,7 +571,7 @@ func (_m *GroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearc
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(channelId, opts)
|
||||
r1 = rf(channelID, opts)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -579,13 +579,13 @@ func (_m *GroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearc
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetGroupsByTeam provides a mock function with given fields: teamId, opts
|
||||
func (_m *GroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
|
||||
ret := _m.Called(teamId, opts)
|
||||
// GetGroupsByTeam provides a mock function with given fields: teamID, opts
|
||||
func (_m *GroupStore) GetGroupsByTeam(teamID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
|
||||
ret := _m.Called(teamID, opts)
|
||||
|
||||
var r0 []*model.GroupWithSchemeAdmin
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) []*model.GroupWithSchemeAdmin); ok {
|
||||
r0 = rf(teamId, opts)
|
||||
r0 = rf(teamID, opts)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.GroupWithSchemeAdmin)
|
||||
@@ -594,7 +594,7 @@ func (_m *GroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts)
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(teamId, opts)
|
||||
r1 = rf(teamID, opts)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -56,13 +56,13 @@ func (_m *PluginStore) CompareAndSet(keyVal *model.PluginKeyValue, oldValue []by
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: pluginId, key
|
||||
func (_m *PluginStore) Delete(pluginId string, key string) error {
|
||||
ret := _m.Called(pluginId, key)
|
||||
// Delete provides a mock function with given fields: pluginID, key
|
||||
func (_m *PluginStore) Delete(pluginID string, key string) error {
|
||||
ret := _m.Called(pluginID, key)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(pluginId, key)
|
||||
r0 = rf(pluginID, key)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -84,13 +84,13 @@ func (_m *PluginStore) DeleteAllExpired() error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// DeleteAllForPlugin provides a mock function with given fields: PluginId
|
||||
func (_m *PluginStore) DeleteAllForPlugin(PluginId string) error {
|
||||
ret := _m.Called(PluginId)
|
||||
// DeleteAllForPlugin provides a mock function with given fields: PluginID
|
||||
func (_m *PluginStore) DeleteAllForPlugin(PluginID string) error {
|
||||
ret := _m.Called(PluginID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(PluginId)
|
||||
r0 = rf(PluginID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -98,13 +98,13 @@ func (_m *PluginStore) DeleteAllForPlugin(PluginId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: pluginId, key
|
||||
func (_m *PluginStore) Get(pluginId string, key string) (*model.PluginKeyValue, error) {
|
||||
ret := _m.Called(pluginId, key)
|
||||
// Get provides a mock function with given fields: pluginID, key
|
||||
func (_m *PluginStore) Get(pluginID string, key string) (*model.PluginKeyValue, error) {
|
||||
ret := _m.Called(pluginID, key)
|
||||
|
||||
var r0 *model.PluginKeyValue
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.PluginKeyValue); ok {
|
||||
r0 = rf(pluginId, key)
|
||||
r0 = rf(pluginID, key)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.PluginKeyValue)
|
||||
@@ -113,7 +113,7 @@ func (_m *PluginStore) Get(pluginId string, key string) (*model.PluginKeyValue,
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(pluginId, key)
|
||||
r1 = rf(pluginID, key)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -121,13 +121,13 @@ func (_m *PluginStore) Get(pluginId string, key string) (*model.PluginKeyValue,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// List provides a mock function with given fields: pluginId, page, perPage
|
||||
func (_m *PluginStore) List(pluginId string, page int, perPage int) ([]string, error) {
|
||||
ret := _m.Called(pluginId, page, perPage)
|
||||
// List provides a mock function with given fields: pluginID, page, perPage
|
||||
func (_m *PluginStore) List(pluginID string, page int, perPage int) ([]string, error) {
|
||||
ret := _m.Called(pluginID, page, perPage)
|
||||
|
||||
var r0 []string
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []string); ok {
|
||||
r0 = rf(pluginId, page, perPage)
|
||||
r0 = rf(pluginID, page, perPage)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]string)
|
||||
@@ -136,7 +136,7 @@ func (_m *PluginStore) List(pluginId string, page int, perPage int) ([]string, e
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(pluginId, page, perPage)
|
||||
r1 = rf(pluginID, page, perPage)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -167,20 +167,20 @@ func (_m *PluginStore) SaveOrUpdate(keyVal *model.PluginKeyValue) (*model.Plugin
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SetWithOptions provides a mock function with given fields: pluginId, key, value, options
|
||||
func (_m *PluginStore) SetWithOptions(pluginId string, key string, value []byte, options model.PluginKVSetOptions) (bool, error) {
|
||||
ret := _m.Called(pluginId, key, value, options)
|
||||
// SetWithOptions provides a mock function with given fields: pluginID, key, value, options
|
||||
func (_m *PluginStore) SetWithOptions(pluginID string, key string, value []byte, options model.PluginKVSetOptions) (bool, error) {
|
||||
ret := _m.Called(pluginID, key, value, options)
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(string, string, []byte, model.PluginKVSetOptions) bool); ok {
|
||||
r0 = rf(pluginId, key, value, options)
|
||||
r0 = rf(pluginID, key, value, options)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, []byte, model.PluginKVSetOptions) error); ok {
|
||||
r1 = rf(pluginId, key, value, options)
|
||||
r1 = rf(pluginID, key, value, options)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -14,20 +14,20 @@ type PostStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// AnalyticsPostCount provides a mock function with given fields: teamId, mustHaveFile, mustHaveHashtag
|
||||
func (_m *PostStore) AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) (int64, error) {
|
||||
ret := _m.Called(teamId, mustHaveFile, mustHaveHashtag)
|
||||
// AnalyticsPostCount provides a mock function with given fields: teamID, mustHaveFile, mustHaveHashtag
|
||||
func (_m *PostStore) AnalyticsPostCount(teamID string, mustHaveFile bool, mustHaveHashtag bool) (int64, error) {
|
||||
ret := _m.Called(teamID, mustHaveFile, mustHaveHashtag)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string, bool, bool) int64); ok {
|
||||
r0 = rf(teamId, mustHaveFile, mustHaveHashtag)
|
||||
r0 = rf(teamID, mustHaveFile, mustHaveHashtag)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool, bool) error); ok {
|
||||
r1 = rf(teamId, mustHaveFile, mustHaveHashtag)
|
||||
r1 = rf(teamID, mustHaveFile, mustHaveHashtag)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -58,13 +58,13 @@ func (_m *PostStore) AnalyticsPostCountsByDay(options *model.AnalyticsPostCounts
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// AnalyticsUserCountsWithPostsByDay provides a mock function with given fields: teamId
|
||||
func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamId string) (model.AnalyticsRows, error) {
|
||||
ret := _m.Called(teamId)
|
||||
// AnalyticsUserCountsWithPostsByDay provides a mock function with given fields: teamID
|
||||
func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamID string) (model.AnalyticsRows, error) {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 model.AnalyticsRows
|
||||
if rf, ok := ret.Get(0).(func(string) model.AnalyticsRows); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(model.AnalyticsRows)
|
||||
@@ -73,7 +73,7 @@ func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamId string) (model.Ana
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(teamId)
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -86,13 +86,13 @@ func (_m *PostStore) ClearCaches() {
|
||||
_m.Called()
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: postId, time, deleteByID
|
||||
func (_m *PostStore) Delete(postId string, time int64, deleteByID string) error {
|
||||
ret := _m.Called(postId, time, deleteByID)
|
||||
// Delete provides a mock function with given fields: postID, time, deleteByID
|
||||
func (_m *PostStore) Delete(postID string, time int64, deleteByID string) error {
|
||||
ret := _m.Called(postID, time, deleteByID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64, string) error); ok {
|
||||
r0 = rf(postId, time, deleteByID)
|
||||
r0 = rf(postID, time, deleteByID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -123,13 +123,13 @@ func (_m *PostStore) Get(id string, skipFetchThreads bool, collapsedThreads bool
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetDirectPostParentsForExportAfter provides a mock function with given fields: limit, afterId
|
||||
func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterId string) ([]*model.DirectPostForExport, error) {
|
||||
ret := _m.Called(limit, afterId)
|
||||
// GetDirectPostParentsForExportAfter provides a mock function with given fields: limit, afterID
|
||||
func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterID string) ([]*model.DirectPostForExport, error) {
|
||||
ret := _m.Called(limit, afterID)
|
||||
|
||||
var r0 []*model.DirectPostForExport
|
||||
if rf, ok := ret.Get(0).(func(int, string) []*model.DirectPostForExport); ok {
|
||||
r0 = rf(limit, afterId)
|
||||
r0 = rf(limit, afterID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.DirectPostForExport)
|
||||
@@ -138,7 +138,7 @@ func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterId strin
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, string) error); ok {
|
||||
r1 = rf(limit, afterId)
|
||||
r1 = rf(limit, afterID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -146,13 +146,13 @@ func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterId strin
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetEtag provides a mock function with given fields: channelId, allowFromCache, collapsedThreads
|
||||
func (_m *PostStore) GetEtag(channelId string, allowFromCache bool, collapsedThreads bool) string {
|
||||
ret := _m.Called(channelId, allowFromCache, collapsedThreads)
|
||||
// GetEtag provides a mock function with given fields: channelID, allowFromCache, collapsedThreads
|
||||
func (_m *PostStore) GetEtag(channelID string, allowFromCache bool, collapsedThreads bool) string {
|
||||
ret := _m.Called(channelID, allowFromCache, collapsedThreads)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string, bool, bool) string); ok {
|
||||
r0 = rf(channelId, allowFromCache, collapsedThreads)
|
||||
r0 = rf(channelID, allowFromCache, collapsedThreads)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
@@ -183,13 +183,13 @@ func (_m *PostStore) GetFlaggedPosts(userId string, offset int, limit int) (*mod
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetFlaggedPostsForChannel provides a mock function with given fields: userId, channelId, offset, limit
|
||||
func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelId string, offset int, limit int) (*model.PostList, error) {
|
||||
ret := _m.Called(userId, channelId, offset, limit)
|
||||
// GetFlaggedPostsForChannel provides a mock function with given fields: userId, channelID, offset, limit
|
||||
func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelID string, offset int, limit int) (*model.PostList, error) {
|
||||
ret := _m.Called(userId, channelID, offset, limit)
|
||||
|
||||
var r0 *model.PostList
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
|
||||
r0 = rf(userId, channelId, offset, limit)
|
||||
r0 = rf(userId, channelID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.PostList)
|
||||
@@ -198,7 +198,7 @@ func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelId string,
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(userId, channelId, offset, limit)
|
||||
r1 = rf(userId, channelID, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -206,13 +206,13 @@ func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelId string,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetFlaggedPostsForTeam provides a mock function with given fields: userId, teamId, offset, limit
|
||||
func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamId string, offset int, limit int) (*model.PostList, error) {
|
||||
ret := _m.Called(userId, teamId, offset, limit)
|
||||
// GetFlaggedPostsForTeam provides a mock function with given fields: userId, teamID, offset, limit
|
||||
func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamID string, offset int, limit int) (*model.PostList, error) {
|
||||
ret := _m.Called(userId, teamID, offset, limit)
|
||||
|
||||
var r0 *model.PostList
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
|
||||
r0 = rf(userId, teamId, offset, limit)
|
||||
r0 = rf(userId, teamID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.PostList)
|
||||
@@ -221,7 +221,7 @@ func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamId string, offset
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(userId, teamId, offset, limit)
|
||||
r1 = rf(userId, teamID, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -287,13 +287,13 @@ func (_m *PostStore) GetOldestEntityCreationTime() (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetParentsForExportAfter provides a mock function with given fields: limit, afterId
|
||||
func (_m *PostStore) GetParentsForExportAfter(limit int, afterId string) ([]*model.PostForExport, error) {
|
||||
ret := _m.Called(limit, afterId)
|
||||
// GetParentsForExportAfter provides a mock function with given fields: limit, afterID
|
||||
func (_m *PostStore) GetParentsForExportAfter(limit int, afterID string) ([]*model.PostForExport, error) {
|
||||
ret := _m.Called(limit, afterID)
|
||||
|
||||
var r0 []*model.PostForExport
|
||||
if rf, ok := ret.Get(0).(func(int, string) []*model.PostForExport); ok {
|
||||
r0 = rf(limit, afterId)
|
||||
r0 = rf(limit, afterID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.PostForExport)
|
||||
@@ -302,7 +302,7 @@ func (_m *PostStore) GetParentsForExportAfter(limit int, afterId string) ([]*mod
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, string) error); ok {
|
||||
r1 = rf(limit, afterId)
|
||||
r1 = rf(limit, afterID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -310,13 +310,13 @@ func (_m *PostStore) GetParentsForExportAfter(limit int, afterId string) ([]*mod
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetPostAfterTime provides a mock function with given fields: channelId, time
|
||||
func (_m *PostStore) GetPostAfterTime(channelId string, time int64) (*model.Post, error) {
|
||||
ret := _m.Called(channelId, time)
|
||||
// GetPostAfterTime provides a mock function with given fields: channelID, time
|
||||
func (_m *PostStore) GetPostAfterTime(channelID string, time int64) (*model.Post, error) {
|
||||
ret := _m.Called(channelID, time)
|
||||
|
||||
var r0 *model.Post
|
||||
if rf, ok := ret.Get(0).(func(string, int64) *model.Post); ok {
|
||||
r0 = rf(channelId, time)
|
||||
r0 = rf(channelID, time)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Post)
|
||||
@@ -325,7 +325,7 @@ func (_m *PostStore) GetPostAfterTime(channelId string, time int64) (*model.Post
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
||||
r1 = rf(channelId, time)
|
||||
r1 = rf(channelID, time)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -333,20 +333,20 @@ func (_m *PostStore) GetPostAfterTime(channelId string, time int64) (*model.Post
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetPostIdAfterTime provides a mock function with given fields: channelId, time
|
||||
func (_m *PostStore) GetPostIdAfterTime(channelId string, time int64) (string, error) {
|
||||
ret := _m.Called(channelId, time)
|
||||
// GetPostIdAfterTime provides a mock function with given fields: channelID, time
|
||||
func (_m *PostStore) GetPostIdAfterTime(channelID string, time int64) (string, error) {
|
||||
ret := _m.Called(channelID, time)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string, int64) string); ok {
|
||||
r0 = rf(channelId, time)
|
||||
r0 = rf(channelID, time)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
||||
r1 = rf(channelId, time)
|
||||
r1 = rf(channelID, time)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -354,20 +354,20 @@ func (_m *PostStore) GetPostIdAfterTime(channelId string, time int64) (string, e
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetPostIdBeforeTime provides a mock function with given fields: channelId, time
|
||||
func (_m *PostStore) GetPostIdBeforeTime(channelId string, time int64) (string, error) {
|
||||
ret := _m.Called(channelId, time)
|
||||
// GetPostIdBeforeTime provides a mock function with given fields: channelID, time
|
||||
func (_m *PostStore) GetPostIdBeforeTime(channelID string, time int64) (string, error) {
|
||||
ret := _m.Called(channelID, time)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string, int64) string); ok {
|
||||
r0 = rf(channelId, time)
|
||||
r0 = rf(channelID, time)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
||||
r1 = rf(channelId, time)
|
||||
r1 = rf(channelID, time)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -490,13 +490,13 @@ func (_m *PostStore) GetPostsByIds(postIds []string) ([]*model.Post, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetPostsCreatedAt provides a mock function with given fields: channelId, time
|
||||
func (_m *PostStore) GetPostsCreatedAt(channelId string, time int64) ([]*model.Post, error) {
|
||||
ret := _m.Called(channelId, time)
|
||||
// GetPostsCreatedAt provides a mock function with given fields: channelID, time
|
||||
func (_m *PostStore) GetPostsCreatedAt(channelID string, time int64) ([]*model.Post, error) {
|
||||
ret := _m.Called(channelID, time)
|
||||
|
||||
var r0 []*model.Post
|
||||
if rf, ok := ret.Get(0).(func(string, int64) []*model.Post); ok {
|
||||
r0 = rf(channelId, time)
|
||||
r0 = rf(channelID, time)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Post)
|
||||
@@ -505,7 +505,7 @@ func (_m *PostStore) GetPostsCreatedAt(channelId string, time int64) ([]*model.P
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
||||
r1 = rf(channelId, time)
|
||||
r1 = rf(channelID, time)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -536,13 +536,13 @@ func (_m *PostStore) GetPostsSince(options model.GetPostsSinceOptions, allowFrom
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetRepliesForExport provides a mock function with given fields: parentId
|
||||
func (_m *PostStore) GetRepliesForExport(parentId string) ([]*model.ReplyForExport, error) {
|
||||
ret := _m.Called(parentId)
|
||||
// GetRepliesForExport provides a mock function with given fields: parentID
|
||||
func (_m *PostStore) GetRepliesForExport(parentID string) ([]*model.ReplyForExport, error) {
|
||||
ret := _m.Called(parentID)
|
||||
|
||||
var r0 []*model.ReplyForExport
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.ReplyForExport); ok {
|
||||
r0 = rf(parentId)
|
||||
r0 = rf(parentID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.ReplyForExport)
|
||||
@@ -551,7 +551,7 @@ func (_m *PostStore) GetRepliesForExport(parentId string) ([]*model.ReplyForExpo
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(parentId)
|
||||
r1 = rf(parentID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -582,9 +582,9 @@ func (_m *PostStore) GetSingle(id string) (*model.Post, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// InvalidateLastPostTimeCache provides a mock function with given fields: channelId
|
||||
func (_m *PostStore) InvalidateLastPostTimeCache(channelId string) {
|
||||
_m.Called(channelId)
|
||||
// InvalidateLastPostTimeCache provides a mock function with given fields: channelID
|
||||
func (_m *PostStore) InvalidateLastPostTimeCache(channelID string) {
|
||||
_m.Called(channelID)
|
||||
}
|
||||
|
||||
// Overwrite provides a mock function with given fields: post
|
||||
@@ -661,13 +661,13 @@ func (_m *PostStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, er
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDeleteByChannel provides a mock function with given fields: channelId
|
||||
func (_m *PostStore) PermanentDeleteByChannel(channelId string) error {
|
||||
ret := _m.Called(channelId)
|
||||
// PermanentDeleteByChannel provides a mock function with given fields: channelID
|
||||
func (_m *PostStore) PermanentDeleteByChannel(channelID string) error {
|
||||
ret := _m.Called(channelID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(channelId)
|
||||
r0 = rf(channelID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -742,13 +742,13 @@ func (_m *PostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, int, erro
|
||||
return r0, r1, r2
|
||||
}
|
||||
|
||||
// Search provides a mock function with given fields: teamId, userId, params
|
||||
func (_m *PostStore) Search(teamId string, userId string, params *model.SearchParams) (*model.PostList, error) {
|
||||
ret := _m.Called(teamId, userId, params)
|
||||
// Search provides a mock function with given fields: teamID, userId, params
|
||||
func (_m *PostStore) Search(teamID string, userId string, params *model.SearchParams) (*model.PostList, error) {
|
||||
ret := _m.Called(teamID, userId, params)
|
||||
|
||||
var r0 *model.PostList
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.SearchParams) *model.PostList); ok {
|
||||
r0 = rf(teamId, userId, params)
|
||||
r0 = rf(teamID, userId, params)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.PostList)
|
||||
@@ -757,7 +757,7 @@ func (_m *PostStore) Search(teamId string, userId string, params *model.SearchPa
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, *model.SearchParams) error); ok {
|
||||
r1 = rf(teamId, userId, params)
|
||||
r1 = rf(teamID, userId, params)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -765,13 +765,13 @@ func (_m *PostStore) Search(teamId string, userId string, params *model.SearchPa
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SearchPostsInTeamForUser provides a mock function with given fields: paramsList, userId, teamId, page, perPage
|
||||
func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId string, teamId string, page int, perPage int) (*model.PostSearchResults, error) {
|
||||
ret := _m.Called(paramsList, userId, teamId, page, perPage)
|
||||
// SearchPostsInTeamForUser provides a mock function with given fields: paramsList, userId, teamID, page, perPage
|
||||
func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId string, teamID string, page int, perPage int) (*model.PostSearchResults, error) {
|
||||
ret := _m.Called(paramsList, userId, teamID, page, perPage)
|
||||
|
||||
var r0 *model.PostSearchResults
|
||||
if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) *model.PostSearchResults); ok {
|
||||
r0 = rf(paramsList, userId, teamId, page, perPage)
|
||||
r0 = rf(paramsList, userId, teamID, page, perPage)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.PostSearchResults)
|
||||
@@ -780,7 +780,7 @@ func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams,
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]*model.SearchParams, string, string, int, int) error); ok {
|
||||
r1 = rf(paramsList, userId, teamId, page, perPage)
|
||||
r1 = rf(paramsList, userId, teamID, page, perPage)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -74,13 +74,13 @@ func (_m *ReactionStore) DeleteAllWithEmojiName(emojiName string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetForPost provides a mock function with given fields: postId, allowFromCache
|
||||
func (_m *ReactionStore) GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, error) {
|
||||
ret := _m.Called(postId, allowFromCache)
|
||||
// GetForPost provides a mock function with given fields: postID, allowFromCache
|
||||
func (_m *ReactionStore) GetForPost(postID string, allowFromCache bool) ([]*model.Reaction, error) {
|
||||
ret := _m.Called(postID, allowFromCache)
|
||||
|
||||
var r0 []*model.Reaction
|
||||
if rf, ok := ret.Get(0).(func(string, bool) []*model.Reaction); ok {
|
||||
r0 = rf(postId, allowFromCache)
|
||||
r0 = rf(postID, allowFromCache)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Reaction)
|
||||
@@ -89,7 +89,7 @@ func (_m *ReactionStore) GetForPost(postId string, allowFromCache bool) ([]*mode
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(postId, allowFromCache)
|
||||
r1 = rf(postID, allowFromCache)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -83,13 +83,13 @@ func (_m *RoleStore) ChannelRolesUnderTeamRole(roleName string) ([]*model.Role,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: roleId
|
||||
func (_m *RoleStore) Delete(roleId string) (*model.Role, error) {
|
||||
ret := _m.Called(roleId)
|
||||
// Delete provides a mock function with given fields: roleID
|
||||
func (_m *RoleStore) Delete(roleID string) (*model.Role, error) {
|
||||
ret := _m.Called(roleID)
|
||||
|
||||
var r0 *model.Role
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Role); ok {
|
||||
r0 = rf(roleId)
|
||||
r0 = rf(roleID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Role)
|
||||
@@ -98,7 +98,7 @@ func (_m *RoleStore) Delete(roleId string) (*model.Role, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(roleId)
|
||||
r1 = rf(roleID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -106,13 +106,13 @@ func (_m *RoleStore) Delete(roleId string) (*model.Role, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: roleId
|
||||
func (_m *RoleStore) Get(roleId string) (*model.Role, error) {
|
||||
ret := _m.Called(roleId)
|
||||
// Get provides a mock function with given fields: roleID
|
||||
func (_m *RoleStore) Get(roleID string) (*model.Role, error) {
|
||||
ret := _m.Called(roleID)
|
||||
|
||||
var r0 *model.Role
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Role); ok {
|
||||
r0 = rf(roleId)
|
||||
r0 = rf(roleID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Role)
|
||||
@@ -121,7 +121,7 @@ func (_m *RoleStore) Get(roleId string) (*model.Role, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(roleId)
|
||||
r1 = rf(roleID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -56,13 +56,13 @@ func (_m *SchemeStore) CountWithoutPermission(scope string, permissionID string,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: schemeId
|
||||
func (_m *SchemeStore) Delete(schemeId string) (*model.Scheme, error) {
|
||||
ret := _m.Called(schemeId)
|
||||
// Delete provides a mock function with given fields: schemeID
|
||||
func (_m *SchemeStore) Delete(schemeID string) (*model.Scheme, error) {
|
||||
ret := _m.Called(schemeID)
|
||||
|
||||
var r0 *model.Scheme
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Scheme); ok {
|
||||
r0 = rf(schemeId)
|
||||
r0 = rf(schemeID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Scheme)
|
||||
@@ -71,7 +71,7 @@ func (_m *SchemeStore) Delete(schemeId string) (*model.Scheme, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(schemeId)
|
||||
r1 = rf(schemeID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -79,13 +79,13 @@ func (_m *SchemeStore) Delete(schemeId string) (*model.Scheme, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: schemeId
|
||||
func (_m *SchemeStore) Get(schemeId string) (*model.Scheme, error) {
|
||||
ret := _m.Called(schemeId)
|
||||
// Get provides a mock function with given fields: schemeID
|
||||
func (_m *SchemeStore) Get(schemeID string) (*model.Scheme, error) {
|
||||
ret := _m.Called(schemeID)
|
||||
|
||||
var r0 *model.Scheme
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Scheme); ok {
|
||||
r0 = rf(schemeId)
|
||||
r0 = rf(schemeID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Scheme)
|
||||
@@ -94,7 +94,7 @@ func (_m *SchemeStore) Get(schemeId string) (*model.Scheme, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(schemeId)
|
||||
r1 = rf(schemeID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -40,13 +40,13 @@ func (_m *SessionStore) Cleanup(expiryTime int64, batchSize int64) {
|
||||
_m.Called(expiryTime, batchSize)
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: sessionIdOrToken
|
||||
func (_m *SessionStore) Get(sessionIdOrToken string) (*model.Session, error) {
|
||||
ret := _m.Called(sessionIdOrToken)
|
||||
// Get provides a mock function with given fields: sessionIDOrToken
|
||||
func (_m *SessionStore) Get(sessionIDOrToken string) (*model.Session, error) {
|
||||
ret := _m.Called(sessionIDOrToken)
|
||||
|
||||
var r0 *model.Session
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Session); ok {
|
||||
r0 = rf(sessionIdOrToken)
|
||||
r0 = rf(sessionIDOrToken)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Session)
|
||||
@@ -55,7 +55,7 @@ func (_m *SessionStore) Get(sessionIdOrToken string) (*model.Session, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(sessionIdOrToken)
|
||||
r1 = rf(sessionIDOrToken)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -132,13 +132,13 @@ func (_m *SessionStore) GetSessionsWithActiveDeviceIds(userId string) ([]*model.
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDeleteSessionsByUser provides a mock function with given fields: teamId
|
||||
func (_m *SessionStore) PermanentDeleteSessionsByUser(teamId string) error {
|
||||
ret := _m.Called(teamId)
|
||||
// PermanentDeleteSessionsByUser provides a mock function with given fields: teamID
|
||||
func (_m *SessionStore) PermanentDeleteSessionsByUser(teamID string) error {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -146,13 +146,13 @@ func (_m *SessionStore) PermanentDeleteSessionsByUser(teamId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// Remove provides a mock function with given fields: sessionIdOrToken
|
||||
func (_m *SessionStore) Remove(sessionIdOrToken string) error {
|
||||
ret := _m.Called(sessionIdOrToken)
|
||||
// Remove provides a mock function with given fields: sessionIDOrToken
|
||||
func (_m *SessionStore) Remove(sessionIDOrToken string) error {
|
||||
ret := _m.Called(sessionIDOrToken)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(sessionIdOrToken)
|
||||
r0 = rf(sessionIDOrToken)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -197,20 +197,20 @@ func (_m *SessionStore) Save(session *model.Session) (*model.Session, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateDeviceId provides a mock function with given fields: id, deviceId, expiresAt
|
||||
func (_m *SessionStore) UpdateDeviceId(id string, deviceId string, expiresAt int64) (string, error) {
|
||||
ret := _m.Called(id, deviceId, expiresAt)
|
||||
// UpdateDeviceId provides a mock function with given fields: id, deviceID, expiresAt
|
||||
func (_m *SessionStore) UpdateDeviceId(id string, deviceID string, expiresAt int64) (string, error) {
|
||||
ret := _m.Called(id, deviceID, expiresAt)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64) string); ok {
|
||||
r0 = rf(id, deviceId, expiresAt)
|
||||
r0 = rf(id, deviceID, expiresAt)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int64) error); ok {
|
||||
r1 = rf(id, deviceId, expiresAt)
|
||||
r1 = rf(id, deviceID, expiresAt)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -232,13 +232,13 @@ func (_m *SessionStore) UpdateExpiredNotify(sessionid string, notified bool) err
|
||||
return r0
|
||||
}
|
||||
|
||||
// UpdateExpiresAt provides a mock function with given fields: sessionId, time
|
||||
func (_m *SessionStore) UpdateExpiresAt(sessionId string, time int64) error {
|
||||
ret := _m.Called(sessionId, time)
|
||||
// UpdateExpiresAt provides a mock function with given fields: sessionID, time
|
||||
func (_m *SessionStore) UpdateExpiresAt(sessionID string, time int64) error {
|
||||
ret := _m.Called(sessionID, time)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
|
||||
r0 = rf(sessionId, time)
|
||||
r0 = rf(sessionID, time)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -246,13 +246,13 @@ func (_m *SessionStore) UpdateExpiresAt(sessionId string, time int64) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// UpdateLastActivityAt provides a mock function with given fields: sessionId, time
|
||||
func (_m *SessionStore) UpdateLastActivityAt(sessionId string, time int64) error {
|
||||
ret := _m.Called(sessionId, time)
|
||||
// UpdateLastActivityAt provides a mock function with given fields: sessionID, time
|
||||
func (_m *SessionStore) UpdateLastActivityAt(sessionID string, time int64) error {
|
||||
ret := _m.Called(sessionID, time)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
|
||||
r0 = rf(sessionId, time)
|
||||
r0 = rf(sessionID, time)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -16,20 +16,20 @@ type TeamStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// AnalyticsGetTeamCountForScheme provides a mock function with given fields: schemeId
|
||||
func (_m *TeamStore) AnalyticsGetTeamCountForScheme(schemeId string) (int64, error) {
|
||||
ret := _m.Called(schemeId)
|
||||
// AnalyticsGetTeamCountForScheme provides a mock function with given fields: schemeID
|
||||
func (_m *TeamStore) AnalyticsGetTeamCountForScheme(schemeID string) (int64, error) {
|
||||
ret := _m.Called(schemeID)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(schemeId)
|
||||
r0 = rf(schemeID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(schemeId)
|
||||
r1 = rf(schemeID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -142,20 +142,20 @@ func (_m *TeamStore) Get(id string) (*model.Team, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetActiveMemberCount provides a mock function with given fields: teamId, restrictions
|
||||
func (_m *TeamStore) GetActiveMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error) {
|
||||
ret := _m.Called(teamId, restrictions)
|
||||
// GetActiveMemberCount provides a mock function with given fields: teamID, restrictions
|
||||
func (_m *TeamStore) GetActiveMemberCount(teamID string, restrictions *model.ViewUsersRestrictions) (int64, error) {
|
||||
ret := _m.Called(teamID, restrictions)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) int64); ok {
|
||||
r0 = rf(teamId, restrictions)
|
||||
r0 = rf(teamID, restrictions)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(teamId, restrictions)
|
||||
r1 = rf(teamID, restrictions)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -186,13 +186,13 @@ func (_m *TeamStore) GetAll() ([]*model.Team, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetAllForExportAfter provides a mock function with given fields: limit, afterId
|
||||
func (_m *TeamStore) GetAllForExportAfter(limit int, afterId string) ([]*model.TeamForExport, error) {
|
||||
ret := _m.Called(limit, afterId)
|
||||
// GetAllForExportAfter provides a mock function with given fields: limit, afterID
|
||||
func (_m *TeamStore) GetAllForExportAfter(limit int, afterID string) ([]*model.TeamForExport, error) {
|
||||
ret := _m.Called(limit, afterID)
|
||||
|
||||
var r0 []*model.TeamForExport
|
||||
if rf, ok := ret.Get(0).(func(int, string) []*model.TeamForExport); ok {
|
||||
r0 = rf(limit, afterId)
|
||||
r0 = rf(limit, afterID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.TeamForExport)
|
||||
@@ -201,7 +201,7 @@ func (_m *TeamStore) GetAllForExportAfter(limit int, afterId string) ([]*model.T
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, string) error); ok {
|
||||
r1 = rf(limit, afterId)
|
||||
r1 = rf(limit, afterID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -347,13 +347,13 @@ func (_m *TeamStore) GetAllTeamPageListing(offset int, limit int) ([]*model.Team
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetByInviteId provides a mock function with given fields: inviteId
|
||||
func (_m *TeamStore) GetByInviteId(inviteId string) (*model.Team, error) {
|
||||
ret := _m.Called(inviteId)
|
||||
// GetByInviteId provides a mock function with given fields: inviteID
|
||||
func (_m *TeamStore) GetByInviteId(inviteID string) (*model.Team, error) {
|
||||
ret := _m.Called(inviteID)
|
||||
|
||||
var r0 *model.Team
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Team); ok {
|
||||
r0 = rf(inviteId)
|
||||
r0 = rf(inviteID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Team)
|
||||
@@ -362,7 +362,7 @@ func (_m *TeamStore) GetByInviteId(inviteId string) (*model.Team, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(inviteId)
|
||||
r1 = rf(inviteID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -416,13 +416,13 @@ func (_m *TeamStore) GetByNames(name []string) ([]*model.Team, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetChannelUnreadsForAllTeams provides a mock function with given fields: excludeTeamId, userId
|
||||
func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamId string, userId string) ([]*model.ChannelUnread, error) {
|
||||
ret := _m.Called(excludeTeamId, userId)
|
||||
// GetChannelUnreadsForAllTeams provides a mock function with given fields: excludeTeamID, userId
|
||||
func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamID string, userId string) ([]*model.ChannelUnread, error) {
|
||||
ret := _m.Called(excludeTeamID, userId)
|
||||
|
||||
var r0 []*model.ChannelUnread
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelUnread); ok {
|
||||
r0 = rf(excludeTeamId, userId)
|
||||
r0 = rf(excludeTeamID, userId)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.ChannelUnread)
|
||||
@@ -431,7 +431,7 @@ func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamId string, userId s
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(excludeTeamId, userId)
|
||||
r1 = rf(excludeTeamID, userId)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -439,13 +439,13 @@ func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamId string, userId s
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetChannelUnreadsForTeam provides a mock function with given fields: teamId, userId
|
||||
func (_m *TeamStore) GetChannelUnreadsForTeam(teamId string, userId string) ([]*model.ChannelUnread, error) {
|
||||
ret := _m.Called(teamId, userId)
|
||||
// GetChannelUnreadsForTeam provides a mock function with given fields: teamID, userId
|
||||
func (_m *TeamStore) GetChannelUnreadsForTeam(teamID string, userId string) ([]*model.ChannelUnread, error) {
|
||||
ret := _m.Called(teamID, userId)
|
||||
|
||||
var r0 []*model.ChannelUnread
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelUnread); ok {
|
||||
r0 = rf(teamId, userId)
|
||||
r0 = rf(teamID, userId)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.ChannelUnread)
|
||||
@@ -454,7 +454,7 @@ func (_m *TeamStore) GetChannelUnreadsForTeam(teamId string, userId string) ([]*
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(teamId, userId)
|
||||
r1 = rf(teamID, userId)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -462,13 +462,13 @@ func (_m *TeamStore) GetChannelUnreadsForTeam(teamId string, userId string) ([]*
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMember provides a mock function with given fields: teamId, userId
|
||||
func (_m *TeamStore) GetMember(teamId string, userId string) (*model.TeamMember, error) {
|
||||
ret := _m.Called(teamId, userId)
|
||||
// GetMember provides a mock function with given fields: teamID, userId
|
||||
func (_m *TeamStore) GetMember(teamID string, userId string) (*model.TeamMember, error) {
|
||||
ret := _m.Called(teamID, userId)
|
||||
|
||||
var r0 *model.TeamMember
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.TeamMember); ok {
|
||||
r0 = rf(teamId, userId)
|
||||
r0 = rf(teamID, userId)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.TeamMember)
|
||||
@@ -477,7 +477,7 @@ func (_m *TeamStore) GetMember(teamId string, userId string) (*model.TeamMember,
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(teamId, userId)
|
||||
r1 = rf(teamID, userId)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -485,13 +485,13 @@ func (_m *TeamStore) GetMember(teamId string, userId string) (*model.TeamMember,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMembers provides a mock function with given fields: teamId, offset, limit, teamMembersGetOptions
|
||||
func (_m *TeamStore) GetMembers(teamId string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, error) {
|
||||
ret := _m.Called(teamId, offset, limit, teamMembersGetOptions)
|
||||
// GetMembers provides a mock function with given fields: teamID, offset, limit, teamMembersGetOptions
|
||||
func (_m *TeamStore) GetMembers(teamID string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, error) {
|
||||
ret := _m.Called(teamID, offset, limit, teamMembersGetOptions)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.TeamMembersGetOptions) []*model.TeamMember); ok {
|
||||
r0 = rf(teamId, offset, limit, teamMembersGetOptions)
|
||||
r0 = rf(teamID, offset, limit, teamMembersGetOptions)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.TeamMember)
|
||||
@@ -500,7 +500,7 @@ func (_m *TeamStore) GetMembers(teamId string, offset int, limit int, teamMember
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int, *model.TeamMembersGetOptions) error); ok {
|
||||
r1 = rf(teamId, offset, limit, teamMembersGetOptions)
|
||||
r1 = rf(teamID, offset, limit, teamMembersGetOptions)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -508,13 +508,13 @@ func (_m *TeamStore) GetMembers(teamId string, offset int, limit int, teamMember
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMembersByIds provides a mock function with given fields: teamId, userIds, restrictions
|
||||
func (_m *TeamStore) GetMembersByIds(teamId string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error) {
|
||||
ret := _m.Called(teamId, userIds, restrictions)
|
||||
// GetMembersByIds provides a mock function with given fields: teamID, userIds, restrictions
|
||||
func (_m *TeamStore) GetMembersByIds(teamID string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error) {
|
||||
ret := _m.Called(teamID, userIds, restrictions)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
if rf, ok := ret.Get(0).(func(string, []string, *model.ViewUsersRestrictions) []*model.TeamMember); ok {
|
||||
r0 = rf(teamId, userIds, restrictions)
|
||||
r0 = rf(teamID, userIds, restrictions)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.TeamMember)
|
||||
@@ -523,7 +523,7 @@ func (_m *TeamStore) GetMembersByIds(teamId string, userIds []string, restrictio
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(teamId, userIds, restrictions)
|
||||
r1 = rf(teamID, userIds, restrictions)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -554,13 +554,13 @@ func (_m *TeamStore) GetTeamMembersForExport(userId string) ([]*model.TeamMember
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetTeamsByScheme provides a mock function with given fields: schemeId, offset, limit
|
||||
func (_m *TeamStore) GetTeamsByScheme(schemeId string, offset int, limit int) ([]*model.Team, error) {
|
||||
ret := _m.Called(schemeId, offset, limit)
|
||||
// GetTeamsByScheme provides a mock function with given fields: schemeID, offset, limit
|
||||
func (_m *TeamStore) GetTeamsByScheme(schemeID string, offset int, limit int) ([]*model.Team, error) {
|
||||
ret := _m.Called(schemeID, offset, limit)
|
||||
|
||||
var r0 []*model.Team
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.Team); ok {
|
||||
r0 = rf(schemeId, offset, limit)
|
||||
r0 = rf(schemeID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Team)
|
||||
@@ -569,7 +569,7 @@ func (_m *TeamStore) GetTeamsByScheme(schemeId string, offset int, limit int) ([
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(schemeId, offset, limit)
|
||||
r1 = rf(schemeID, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -646,20 +646,20 @@ func (_m *TeamStore) GetTeamsForUserWithPagination(userId string, page int, perP
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetTotalMemberCount provides a mock function with given fields: teamId, restrictions
|
||||
func (_m *TeamStore) GetTotalMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error) {
|
||||
ret := _m.Called(teamId, restrictions)
|
||||
// GetTotalMemberCount provides a mock function with given fields: teamID, restrictions
|
||||
func (_m *TeamStore) GetTotalMemberCount(teamID string, restrictions *model.ViewUsersRestrictions) (int64, error) {
|
||||
ret := _m.Called(teamID, restrictions)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) int64); ok {
|
||||
r0 = rf(teamId, restrictions)
|
||||
r0 = rf(teamID, restrictions)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(teamId, restrictions)
|
||||
r1 = rf(teamID, restrictions)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -716,13 +716,13 @@ func (_m *TeamStore) InvalidateAllTeamIdsForUser(userId string) {
|
||||
_m.Called(userId)
|
||||
}
|
||||
|
||||
// MigrateTeamMembers provides a mock function with given fields: fromTeamId, fromUserId
|
||||
func (_m *TeamStore) MigrateTeamMembers(fromTeamId string, fromUserId string) (map[string]string, error) {
|
||||
ret := _m.Called(fromTeamId, fromUserId)
|
||||
// MigrateTeamMembers provides a mock function with given fields: fromTeamID, fromUserId
|
||||
func (_m *TeamStore) MigrateTeamMembers(fromTeamID string, fromUserId string) (map[string]string, error) {
|
||||
ret := _m.Called(fromTeamID, fromUserId)
|
||||
|
||||
var r0 map[string]string
|
||||
if rf, ok := ret.Get(0).(func(string, string) map[string]string); ok {
|
||||
r0 = rf(fromTeamId, fromUserId)
|
||||
r0 = rf(fromTeamID, fromUserId)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(map[string]string)
|
||||
@@ -731,7 +731,7 @@ func (_m *TeamStore) MigrateTeamMembers(fromTeamId string, fromUserId string) (m
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(fromTeamId, fromUserId)
|
||||
r1 = rf(fromTeamID, fromUserId)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -739,13 +739,13 @@ func (_m *TeamStore) MigrateTeamMembers(fromTeamId string, fromUserId string) (m
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDelete provides a mock function with given fields: teamId
|
||||
func (_m *TeamStore) PermanentDelete(teamId string) error {
|
||||
ret := _m.Called(teamId)
|
||||
// PermanentDelete provides a mock function with given fields: teamID
|
||||
func (_m *TeamStore) PermanentDelete(teamID string) error {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -753,13 +753,13 @@ func (_m *TeamStore) PermanentDelete(teamId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// RemoveAllMembersByTeam provides a mock function with given fields: teamId
|
||||
func (_m *TeamStore) RemoveAllMembersByTeam(teamId string) error {
|
||||
ret := _m.Called(teamId)
|
||||
// RemoveAllMembersByTeam provides a mock function with given fields: teamID
|
||||
func (_m *TeamStore) RemoveAllMembersByTeam(teamID string) error {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -781,13 +781,13 @@ func (_m *TeamStore) RemoveAllMembersByUser(userId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// RemoveMember provides a mock function with given fields: teamId, userId
|
||||
func (_m *TeamStore) RemoveMember(teamId string, userId string) error {
|
||||
ret := _m.Called(teamId, userId)
|
||||
// RemoveMember provides a mock function with given fields: teamID, userId
|
||||
func (_m *TeamStore) RemoveMember(teamID string, userId string) error {
|
||||
ret := _m.Called(teamID, userId)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(teamId, userId)
|
||||
r0 = rf(teamID, userId)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -795,13 +795,13 @@ func (_m *TeamStore) RemoveMember(teamId string, userId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// RemoveMembers provides a mock function with given fields: teamId, userIds
|
||||
func (_m *TeamStore) RemoveMembers(teamId string, userIds []string) error {
|
||||
ret := _m.Called(teamId, userIds)
|
||||
// RemoveMembers provides a mock function with given fields: teamID, userIds
|
||||
func (_m *TeamStore) RemoveMembers(teamID string, userIds []string) error {
|
||||
ret := _m.Called(teamID, userIds)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string) error); ok {
|
||||
r0 = rf(teamId, userIds)
|
||||
r0 = rf(teamID, userIds)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1014,13 +1014,13 @@ func (_m *TeamStore) Update(team *model.Team) (*model.Team, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateLastTeamIconUpdate provides a mock function with given fields: teamId, curTime
|
||||
func (_m *TeamStore) UpdateLastTeamIconUpdate(teamId string, curTime int64) error {
|
||||
ret := _m.Called(teamId, curTime)
|
||||
// UpdateLastTeamIconUpdate provides a mock function with given fields: teamID, curTime
|
||||
func (_m *TeamStore) UpdateLastTeamIconUpdate(teamID string, curTime int64) error {
|
||||
ret := _m.Called(teamID, curTime)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
|
||||
r0 = rf(teamId, curTime)
|
||||
r0 = rf(teamID, curTime)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -37,13 +37,13 @@ func (_m *ThreadStore) CollectThreadsWithNewerReplies(userId string, channelIds
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CreateMembershipIfNeeded provides a mock function with given fields: userId, postId, following, incrementMentions, updateFollowing
|
||||
func (_m *ThreadStore) CreateMembershipIfNeeded(userId string, postId string, following bool, incrementMentions bool, updateFollowing bool) error {
|
||||
ret := _m.Called(userId, postId, following, incrementMentions, updateFollowing)
|
||||
// CreateMembershipIfNeeded provides a mock function with given fields: userId, postID, following, incrementMentions, updateFollowing
|
||||
func (_m *ThreadStore) CreateMembershipIfNeeded(userId string, postID string, following bool, incrementMentions bool, updateFollowing bool) error {
|
||||
ret := _m.Called(userId, postID, following, incrementMentions, updateFollowing)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, bool, bool, bool) error); ok {
|
||||
r0 = rf(userId, postId, following, incrementMentions, updateFollowing)
|
||||
r0 = rf(userId, postID, following, incrementMentions, updateFollowing)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -65,13 +65,13 @@ func (_m *ThreadStore) Delete(postId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// DeleteMembershipForUser provides a mock function with given fields: userId, postId
|
||||
func (_m *ThreadStore) DeleteMembershipForUser(userId string, postId string) error {
|
||||
ret := _m.Called(userId, postId)
|
||||
// DeleteMembershipForUser provides a mock function with given fields: userId, postID
|
||||
func (_m *ThreadStore) DeleteMembershipForUser(userId string, postID string) error {
|
||||
ret := _m.Called(userId, postID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(userId, postId)
|
||||
r0 = rf(userId, postID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -102,13 +102,13 @@ func (_m *ThreadStore) Get(id string) (*model.Thread, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMembershipForUser provides a mock function with given fields: userId, postId
|
||||
func (_m *ThreadStore) GetMembershipForUser(userId string, postId string) (*model.ThreadMembership, error) {
|
||||
ret := _m.Called(userId, postId)
|
||||
// GetMembershipForUser provides a mock function with given fields: userId, postID
|
||||
func (_m *ThreadStore) GetMembershipForUser(userId string, postID string) (*model.ThreadMembership, error) {
|
||||
ret := _m.Called(userId, postID)
|
||||
|
||||
var r0 *model.ThreadMembership
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.ThreadMembership); ok {
|
||||
r0 = rf(userId, postId)
|
||||
r0 = rf(userId, postID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ThreadMembership)
|
||||
@@ -117,7 +117,7 @@ func (_m *ThreadStore) GetMembershipForUser(userId string, postId string) (*mode
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, postId)
|
||||
r1 = rf(userId, postID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -125,13 +125,13 @@ func (_m *ThreadStore) GetMembershipForUser(userId string, postId string) (*mode
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMembershipsForUser provides a mock function with given fields: userId, teamId
|
||||
func (_m *ThreadStore) GetMembershipsForUser(userId string, teamId string) ([]*model.ThreadMembership, error) {
|
||||
ret := _m.Called(userId, teamId)
|
||||
// GetMembershipsForUser provides a mock function with given fields: userId, teamID
|
||||
func (_m *ThreadStore) GetMembershipsForUser(userId string, teamID string) ([]*model.ThreadMembership, error) {
|
||||
ret := _m.Called(userId, teamID)
|
||||
|
||||
var r0 []*model.ThreadMembership
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.ThreadMembership); ok {
|
||||
r0 = rf(userId, teamId)
|
||||
r0 = rf(userId, teamID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.ThreadMembership)
|
||||
@@ -140,7 +140,7 @@ func (_m *ThreadStore) GetMembershipsForUser(userId string, teamId string) ([]*m
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, teamId)
|
||||
r1 = rf(userId, teamID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -240,13 +240,13 @@ func (_m *ThreadStore) GetThreadsForUser(userId string, teamId string, opts mode
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MarkAllAsRead provides a mock function with given fields: userId, teamId
|
||||
func (_m *ThreadStore) MarkAllAsRead(userId string, teamId string) error {
|
||||
ret := _m.Called(userId, teamId)
|
||||
// MarkAllAsRead provides a mock function with given fields: userId, teamID
|
||||
func (_m *ThreadStore) MarkAllAsRead(userId string, teamID string) error {
|
||||
ret := _m.Called(userId, teamID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(userId, teamId)
|
||||
r0 = rf(userId, teamID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -254,13 +254,13 @@ func (_m *ThreadStore) MarkAllAsRead(userId string, teamId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// MarkAsRead provides a mock function with given fields: userId, threadId, timestamp
|
||||
func (_m *ThreadStore) MarkAsRead(userId string, threadId string, timestamp int64) error {
|
||||
ret := _m.Called(userId, threadId, timestamp)
|
||||
// MarkAsRead provides a mock function with given fields: userId, threadID, timestamp
|
||||
func (_m *ThreadStore) MarkAsRead(userId string, threadID string, timestamp int64) error {
|
||||
ret := _m.Called(userId, threadID, timestamp)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64) error); ok {
|
||||
r0 = rf(userId, threadId, timestamp)
|
||||
r0 = rf(userId, threadID, timestamp)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@ type UserAccessTokenStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: tokenId
|
||||
func (_m *UserAccessTokenStore) Delete(tokenId string) error {
|
||||
ret := _m.Called(tokenId)
|
||||
// Delete provides a mock function with given fields: tokenID
|
||||
func (_m *UserAccessTokenStore) Delete(tokenID string) error {
|
||||
ret := _m.Called(tokenID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(tokenId)
|
||||
r0 = rf(tokenID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -42,13 +42,13 @@ func (_m *UserAccessTokenStore) DeleteAllForUser(userId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: tokenId
|
||||
func (_m *UserAccessTokenStore) Get(tokenId string) (*model.UserAccessToken, error) {
|
||||
ret := _m.Called(tokenId)
|
||||
// Get provides a mock function with given fields: tokenID
|
||||
func (_m *UserAccessTokenStore) Get(tokenID string) (*model.UserAccessToken, error) {
|
||||
ret := _m.Called(tokenID)
|
||||
|
||||
var r0 *model.UserAccessToken
|
||||
if rf, ok := ret.Get(0).(func(string) *model.UserAccessToken); ok {
|
||||
r0 = rf(tokenId)
|
||||
r0 = rf(tokenID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.UserAccessToken)
|
||||
@@ -57,7 +57,7 @@ func (_m *UserAccessTokenStore) Get(tokenId string) (*model.UserAccessToken, err
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(tokenId)
|
||||
r1 = rf(tokenID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -180,13 +180,13 @@ func (_m *UserAccessTokenStore) Search(term string) ([]*model.UserAccessToken, e
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateTokenDisable provides a mock function with given fields: tokenId
|
||||
func (_m *UserAccessTokenStore) UpdateTokenDisable(tokenId string) error {
|
||||
ret := _m.Called(tokenId)
|
||||
// UpdateTokenDisable provides a mock function with given fields: tokenID
|
||||
func (_m *UserAccessTokenStore) UpdateTokenDisable(tokenID string) error {
|
||||
ret := _m.Called(tokenID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(tokenId)
|
||||
r0 = rf(tokenID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -194,13 +194,13 @@ func (_m *UserAccessTokenStore) UpdateTokenDisable(tokenId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// UpdateTokenEnable provides a mock function with given fields: tokenId
|
||||
func (_m *UserAccessTokenStore) UpdateTokenEnable(tokenId string) error {
|
||||
ret := _m.Called(tokenId)
|
||||
// UpdateTokenEnable provides a mock function with given fields: tokenID
|
||||
func (_m *UserAccessTokenStore) UpdateTokenEnable(tokenID string) error {
|
||||
ret := _m.Called(tokenID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(tokenId)
|
||||
r0 = rf(tokenID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -144,13 +144,13 @@ func (_m *UserStore) AnalyticsGetSystemAdminCount() (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// AutocompleteUsersInChannel provides a mock function with given fields: teamId, channelId, term, options
|
||||
func (_m *UserStore) AutocompleteUsersInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error) {
|
||||
ret := _m.Called(teamId, channelId, term, options)
|
||||
// AutocompleteUsersInChannel provides a mock function with given fields: teamID, channelID, term, options
|
||||
func (_m *UserStore) AutocompleteUsersInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error) {
|
||||
ret := _m.Called(teamID, channelID, term, options)
|
||||
|
||||
var r0 *model.UserAutocompleteInChannel
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, *model.UserSearchOptions) *model.UserAutocompleteInChannel); ok {
|
||||
r0 = rf(teamId, channelId, term, options)
|
||||
r0 = rf(teamID, channelID, term, options)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.UserAutocompleteInChannel)
|
||||
@@ -159,7 +159,7 @@ func (_m *UserStore) AutocompleteUsersInChannel(teamId string, channelId string,
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string, *model.UserSearchOptions) error); ok {
|
||||
r1 = rf(teamId, channelId, term, options)
|
||||
r1 = rf(teamID, channelID, term, options)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -299,13 +299,13 @@ func (_m *UserStore) GetAll() ([]*model.User, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetAllAfter provides a mock function with given fields: limit, afterId
|
||||
func (_m *UserStore) GetAllAfter(limit int, afterId string) ([]*model.User, error) {
|
||||
ret := _m.Called(limit, afterId)
|
||||
// GetAllAfter provides a mock function with given fields: limit, afterID
|
||||
func (_m *UserStore) GetAllAfter(limit int, afterID string) ([]*model.User, error) {
|
||||
ret := _m.Called(limit, afterID)
|
||||
|
||||
var r0 []*model.User
|
||||
if rf, ok := ret.Get(0).(func(int, string) []*model.User); ok {
|
||||
r0 = rf(limit, afterId)
|
||||
r0 = rf(limit, afterID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.User)
|
||||
@@ -314,7 +314,7 @@ func (_m *UserStore) GetAllAfter(limit int, afterId string) ([]*model.User, erro
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, string) error); ok {
|
||||
r1 = rf(limit, afterId)
|
||||
r1 = rf(limit, afterID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -414,20 +414,20 @@ func (_m *UserStore) GetAllUsingAuthService(authService string) ([]*model.User,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetAnyUnreadPostCountForChannel provides a mock function with given fields: userId, channelId
|
||||
func (_m *UserStore) GetAnyUnreadPostCountForChannel(userId string, channelId string) (int64, error) {
|
||||
ret := _m.Called(userId, channelId)
|
||||
// GetAnyUnreadPostCountForChannel provides a mock function with given fields: userId, channelID
|
||||
func (_m *UserStore) GetAnyUnreadPostCountForChannel(userId string, channelID string) (int64, error) {
|
||||
ret := _m.Called(userId, channelID)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string, string) int64); ok {
|
||||
r0 = rf(userId, channelId)
|
||||
r0 = rf(userId, channelID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, channelId)
|
||||
r1 = rf(userId, channelID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -541,13 +541,13 @@ func (_m *UserStore) GetEtagForAllProfiles() string {
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetEtagForProfiles provides a mock function with given fields: teamId
|
||||
func (_m *UserStore) GetEtagForProfiles(teamId string) string {
|
||||
ret := _m.Called(teamId)
|
||||
// GetEtagForProfiles provides a mock function with given fields: teamID
|
||||
func (_m *UserStore) GetEtagForProfiles(teamID string) string {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string) string); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
@@ -555,13 +555,13 @@ func (_m *UserStore) GetEtagForProfiles(teamId string) string {
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetEtagForProfilesNotInTeam provides a mock function with given fields: teamId
|
||||
func (_m *UserStore) GetEtagForProfilesNotInTeam(teamId string) string {
|
||||
ret := _m.Called(teamId)
|
||||
// GetEtagForProfilesNotInTeam provides a mock function with given fields: teamID
|
||||
func (_m *UserStore) GetEtagForProfilesNotInTeam(teamID string) string {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string) string); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
@@ -569,13 +569,13 @@ func (_m *UserStore) GetEtagForProfilesNotInTeam(teamId string) string {
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetForLogin provides a mock function with given fields: loginId, allowSignInWithUsername, allowSignInWithEmail
|
||||
func (_m *UserStore) GetForLogin(loginId string, allowSignInWithUsername bool, allowSignInWithEmail bool) (*model.User, error) {
|
||||
ret := _m.Called(loginId, allowSignInWithUsername, allowSignInWithEmail)
|
||||
// GetForLogin provides a mock function with given fields: loginID, allowSignInWithUsername, allowSignInWithEmail
|
||||
func (_m *UserStore) GetForLogin(loginID string, allowSignInWithUsername bool, allowSignInWithEmail bool) (*model.User, error) {
|
||||
ret := _m.Called(loginID, allowSignInWithUsername, allowSignInWithEmail)
|
||||
|
||||
var r0 *model.User
|
||||
if rf, ok := ret.Get(0).(func(string, bool, bool) *model.User); ok {
|
||||
r0 = rf(loginId, allowSignInWithUsername, allowSignInWithEmail)
|
||||
r0 = rf(loginID, allowSignInWithUsername, allowSignInWithEmail)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.User)
|
||||
@@ -584,7 +584,7 @@ func (_m *UserStore) GetForLogin(loginId string, allowSignInWithUsername bool, a
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool, bool) error); ok {
|
||||
r1 = rf(loginId, allowSignInWithUsername, allowSignInWithEmail)
|
||||
r1 = rf(loginID, allowSignInWithUsername, allowSignInWithEmail)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -638,13 +638,13 @@ func (_m *UserStore) GetMany(ctx context.Context, ids []string) ([]*model.User,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetNewUsersForTeam provides a mock function with given fields: teamId, offset, limit, viewRestrictions
|
||||
func (_m *UserStore) GetNewUsersForTeam(teamId string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamId, offset, limit, viewRestrictions)
|
||||
// GetNewUsersForTeam provides a mock function with given fields: teamID, offset, limit, viewRestrictions
|
||||
func (_m *UserStore) GetNewUsersForTeam(teamID string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamID, offset, limit, viewRestrictions)
|
||||
|
||||
var r0 []*model.User
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) []*model.User); ok {
|
||||
r0 = rf(teamId, offset, limit, viewRestrictions)
|
||||
r0 = rf(teamID, offset, limit, viewRestrictions)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.User)
|
||||
@@ -653,7 +653,7 @@ func (_m *UserStore) GetNewUsersForTeam(teamId string, offset int, limit int, vi
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(teamId, offset, limit, viewRestrictions)
|
||||
r1 = rf(teamID, offset, limit, viewRestrictions)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -822,13 +822,13 @@ func (_m *UserStore) GetProfilesNotInChannel(teamId string, channelId string, gr
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetProfilesNotInTeam provides a mock function with given fields: teamId, groupConstrained, offset, limit, viewRestrictions
|
||||
func (_m *UserStore) GetProfilesNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamId, groupConstrained, offset, limit, viewRestrictions)
|
||||
// GetProfilesNotInTeam provides a mock function with given fields: teamID, groupConstrained, offset, limit, viewRestrictions
|
||||
func (_m *UserStore) GetProfilesNotInTeam(teamID string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamID, groupConstrained, offset, limit, viewRestrictions)
|
||||
|
||||
var r0 []*model.User
|
||||
if rf, ok := ret.Get(0).(func(string, bool, int, int, *model.ViewUsersRestrictions) []*model.User); ok {
|
||||
r0 = rf(teamId, groupConstrained, offset, limit, viewRestrictions)
|
||||
r0 = rf(teamID, groupConstrained, offset, limit, viewRestrictions)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.User)
|
||||
@@ -837,7 +837,7 @@ func (_m *UserStore) GetProfilesNotInTeam(teamId string, groupConstrained bool,
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool, int, int, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(teamId, groupConstrained, offset, limit, viewRestrictions)
|
||||
r1 = rf(teamID, groupConstrained, offset, limit, viewRestrictions)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -868,13 +868,13 @@ func (_m *UserStore) GetProfilesWithoutTeam(options *model.UserGetOptions) ([]*m
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetRecentlyActiveUsersForTeam provides a mock function with given fields: teamId, offset, limit, viewRestrictions
|
||||
func (_m *UserStore) GetRecentlyActiveUsersForTeam(teamId string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamId, offset, limit, viewRestrictions)
|
||||
// GetRecentlyActiveUsersForTeam provides a mock function with given fields: teamID, offset, limit, viewRestrictions
|
||||
func (_m *UserStore) GetRecentlyActiveUsersForTeam(teamID string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamID, offset, limit, viewRestrictions)
|
||||
|
||||
var r0 []*model.User
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) []*model.User); ok {
|
||||
r0 = rf(teamId, offset, limit, viewRestrictions)
|
||||
r0 = rf(teamID, offset, limit, viewRestrictions)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.User)
|
||||
@@ -883,7 +883,7 @@ func (_m *UserStore) GetRecentlyActiveUsersForTeam(teamId string, offset int, li
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(teamId, offset, limit, viewRestrictions)
|
||||
r1 = rf(teamID, offset, limit, viewRestrictions)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -958,20 +958,20 @@ func (_m *UserStore) GetUnreadCount(userId string) (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetUnreadCountForChannel provides a mock function with given fields: userId, channelId
|
||||
func (_m *UserStore) GetUnreadCountForChannel(userId string, channelId string) (int64, error) {
|
||||
ret := _m.Called(userId, channelId)
|
||||
// GetUnreadCountForChannel provides a mock function with given fields: userId, channelID
|
||||
func (_m *UserStore) GetUnreadCountForChannel(userId string, channelID string) (int64, error) {
|
||||
ret := _m.Called(userId, channelID)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string, string) int64); ok {
|
||||
r0 = rf(userId, channelId)
|
||||
r0 = rf(userId, channelID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, channelId)
|
||||
r1 = rf(userId, channelID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1028,9 +1028,9 @@ func (_m *UserStore) InvalidateProfileCacheForUser(userId string) {
|
||||
_m.Called(userId)
|
||||
}
|
||||
|
||||
// InvalidateProfilesInChannelCache provides a mock function with given fields: channelId
|
||||
func (_m *UserStore) InvalidateProfilesInChannelCache(channelId string) {
|
||||
_m.Called(channelId)
|
||||
// InvalidateProfilesInChannelCache provides a mock function with given fields: channelID
|
||||
func (_m *UserStore) InvalidateProfilesInChannelCache(channelID string) {
|
||||
_m.Called(channelID)
|
||||
}
|
||||
|
||||
// InvalidateProfilesInChannelCacheByUser provides a mock function with given fields: userId
|
||||
@@ -1103,13 +1103,13 @@ func (_m *UserStore) Save(user *model.User) (*model.User, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Search provides a mock function with given fields: teamId, term, options
|
||||
func (_m *UserStore) Search(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamId, term, options)
|
||||
// Search provides a mock function with given fields: teamID, term, options
|
||||
func (_m *UserStore) Search(teamID string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamID, term, options)
|
||||
|
||||
var r0 []*model.User
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok {
|
||||
r0 = rf(teamId, term, options)
|
||||
r0 = rf(teamID, term, options)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.User)
|
||||
@@ -1118,7 +1118,7 @@ func (_m *UserStore) Search(teamId string, term string, options *model.UserSearc
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok {
|
||||
r1 = rf(teamId, term, options)
|
||||
r1 = rf(teamID, term, options)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1126,13 +1126,13 @@ func (_m *UserStore) Search(teamId string, term string, options *model.UserSearc
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SearchInChannel provides a mock function with given fields: channelId, term, options
|
||||
func (_m *UserStore) SearchInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
|
||||
ret := _m.Called(channelId, term, options)
|
||||
// SearchInChannel provides a mock function with given fields: channelID, term, options
|
||||
func (_m *UserStore) SearchInChannel(channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
|
||||
ret := _m.Called(channelID, term, options)
|
||||
|
||||
var r0 []*model.User
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok {
|
||||
r0 = rf(channelId, term, options)
|
||||
r0 = rf(channelID, term, options)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.User)
|
||||
@@ -1141,7 +1141,7 @@ func (_m *UserStore) SearchInChannel(channelId string, term string, options *mod
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok {
|
||||
r1 = rf(channelId, term, options)
|
||||
r1 = rf(channelID, term, options)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1172,13 +1172,13 @@ func (_m *UserStore) SearchInGroup(groupID string, term string, options *model.U
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SearchNotInChannel provides a mock function with given fields: teamId, channelId, term, options
|
||||
func (_m *UserStore) SearchNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamId, channelId, term, options)
|
||||
// SearchNotInChannel provides a mock function with given fields: teamID, channelID, term, options
|
||||
func (_m *UserStore) SearchNotInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamID, channelID, term, options)
|
||||
|
||||
var r0 []*model.User
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, *model.UserSearchOptions) []*model.User); ok {
|
||||
r0 = rf(teamId, channelId, term, options)
|
||||
r0 = rf(teamID, channelID, term, options)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.User)
|
||||
@@ -1187,7 +1187,7 @@ func (_m *UserStore) SearchNotInChannel(teamId string, channelId string, term st
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string, *model.UserSearchOptions) error); ok {
|
||||
r1 = rf(teamId, channelId, term, options)
|
||||
r1 = rf(teamID, channelID, term, options)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -14,20 +14,20 @@ type WebhookStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// AnalyticsIncomingCount provides a mock function with given fields: teamId
|
||||
func (_m *WebhookStore) AnalyticsIncomingCount(teamId string) (int64, error) {
|
||||
ret := _m.Called(teamId)
|
||||
// AnalyticsIncomingCount provides a mock function with given fields: teamID
|
||||
func (_m *WebhookStore) AnalyticsIncomingCount(teamID string) (int64, error) {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(teamId)
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -35,20 +35,20 @@ func (_m *WebhookStore) AnalyticsIncomingCount(teamId string) (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// AnalyticsOutgoingCount provides a mock function with given fields: teamId
|
||||
func (_m *WebhookStore) AnalyticsOutgoingCount(teamId string) (int64, error) {
|
||||
ret := _m.Called(teamId)
|
||||
// AnalyticsOutgoingCount provides a mock function with given fields: teamID
|
||||
func (_m *WebhookStore) AnalyticsOutgoingCount(teamID string) (int64, error) {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(teamId)
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(teamId)
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -61,13 +61,13 @@ func (_m *WebhookStore) ClearCaches() {
|
||||
_m.Called()
|
||||
}
|
||||
|
||||
// DeleteIncoming provides a mock function with given fields: webhookId, time
|
||||
func (_m *WebhookStore) DeleteIncoming(webhookId string, time int64) error {
|
||||
ret := _m.Called(webhookId, time)
|
||||
// DeleteIncoming provides a mock function with given fields: webhookID, time
|
||||
func (_m *WebhookStore) DeleteIncoming(webhookID string, time int64) error {
|
||||
ret := _m.Called(webhookID, time)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
|
||||
r0 = rf(webhookId, time)
|
||||
r0 = rf(webhookID, time)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -75,13 +75,13 @@ func (_m *WebhookStore) DeleteIncoming(webhookId string, time int64) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// DeleteOutgoing provides a mock function with given fields: webhookId, time
|
||||
func (_m *WebhookStore) DeleteOutgoing(webhookId string, time int64) error {
|
||||
ret := _m.Called(webhookId, time)
|
||||
// DeleteOutgoing provides a mock function with given fields: webhookID, time
|
||||
func (_m *WebhookStore) DeleteOutgoing(webhookID string, time int64) error {
|
||||
ret := _m.Called(webhookID, time)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
|
||||
r0 = rf(webhookId, time)
|
||||
r0 = rf(webhookID, time)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -112,13 +112,13 @@ func (_m *WebhookStore) GetIncoming(id string, allowFromCache bool) (*model.Inco
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetIncomingByChannel provides a mock function with given fields: channelId
|
||||
func (_m *WebhookStore) GetIncomingByChannel(channelId string) ([]*model.IncomingWebhook, error) {
|
||||
ret := _m.Called(channelId)
|
||||
// GetIncomingByChannel provides a mock function with given fields: channelID
|
||||
func (_m *WebhookStore) GetIncomingByChannel(channelID string) ([]*model.IncomingWebhook, error) {
|
||||
ret := _m.Called(channelID)
|
||||
|
||||
var r0 []*model.IncomingWebhook
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.IncomingWebhook); ok {
|
||||
r0 = rf(channelId)
|
||||
r0 = rf(channelID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.IncomingWebhook)
|
||||
@@ -127,7 +127,7 @@ func (_m *WebhookStore) GetIncomingByChannel(channelId string) ([]*model.Incomin
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(channelId)
|
||||
r1 = rf(channelID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -135,13 +135,13 @@ func (_m *WebhookStore) GetIncomingByChannel(channelId string) ([]*model.Incomin
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetIncomingByTeam provides a mock function with given fields: teamId, offset, limit
|
||||
func (_m *WebhookStore) GetIncomingByTeam(teamId string, offset int, limit int) ([]*model.IncomingWebhook, error) {
|
||||
ret := _m.Called(teamId, offset, limit)
|
||||
// GetIncomingByTeam provides a mock function with given fields: teamID, offset, limit
|
||||
func (_m *WebhookStore) GetIncomingByTeam(teamID string, offset int, limit int) ([]*model.IncomingWebhook, error) {
|
||||
ret := _m.Called(teamID, offset, limit)
|
||||
|
||||
var r0 []*model.IncomingWebhook
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.IncomingWebhook); ok {
|
||||
r0 = rf(teamId, offset, limit)
|
||||
r0 = rf(teamID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.IncomingWebhook)
|
||||
@@ -150,7 +150,7 @@ func (_m *WebhookStore) GetIncomingByTeam(teamId string, offset int, limit int)
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(teamId, offset, limit)
|
||||
r1 = rf(teamID, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -158,13 +158,13 @@ func (_m *WebhookStore) GetIncomingByTeam(teamId string, offset int, limit int)
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetIncomingByTeamByUser provides a mock function with given fields: teamId, userId, offset, limit
|
||||
func (_m *WebhookStore) GetIncomingByTeamByUser(teamId string, userId string, offset int, limit int) ([]*model.IncomingWebhook, error) {
|
||||
ret := _m.Called(teamId, userId, offset, limit)
|
||||
// GetIncomingByTeamByUser provides a mock function with given fields: teamID, userId, offset, limit
|
||||
func (_m *WebhookStore) GetIncomingByTeamByUser(teamID string, userId string, offset int, limit int) ([]*model.IncomingWebhook, error) {
|
||||
ret := _m.Called(teamID, userId, offset, limit)
|
||||
|
||||
var r0 []*model.IncomingWebhook
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.IncomingWebhook); ok {
|
||||
r0 = rf(teamId, userId, offset, limit)
|
||||
r0 = rf(teamID, userId, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.IncomingWebhook)
|
||||
@@ -173,7 +173,7 @@ func (_m *WebhookStore) GetIncomingByTeamByUser(teamId string, userId string, of
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(teamId, userId, offset, limit)
|
||||
r1 = rf(teamID, userId, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -250,13 +250,13 @@ func (_m *WebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetOutgoingByChannel provides a mock function with given fields: channelId, offset, limit
|
||||
func (_m *WebhookStore) GetOutgoingByChannel(channelId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(channelId, offset, limit)
|
||||
// GetOutgoingByChannel provides a mock function with given fields: channelID, offset, limit
|
||||
func (_m *WebhookStore) GetOutgoingByChannel(channelID string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(channelID, offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(channelId, offset, limit)
|
||||
r0 = rf(channelID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.OutgoingWebhook)
|
||||
@@ -265,7 +265,7 @@ func (_m *WebhookStore) GetOutgoingByChannel(channelId string, offset int, limit
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(channelId, offset, limit)
|
||||
r1 = rf(channelID, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -273,13 +273,13 @@ func (_m *WebhookStore) GetOutgoingByChannel(channelId string, offset int, limit
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetOutgoingByChannelByUser provides a mock function with given fields: channelId, userId, offset, limit
|
||||
func (_m *WebhookStore) GetOutgoingByChannelByUser(channelId string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(channelId, userId, offset, limit)
|
||||
// GetOutgoingByChannelByUser provides a mock function with given fields: channelID, userId, offset, limit
|
||||
func (_m *WebhookStore) GetOutgoingByChannelByUser(channelID string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(channelID, userId, offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(channelId, userId, offset, limit)
|
||||
r0 = rf(channelID, userId, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.OutgoingWebhook)
|
||||
@@ -288,7 +288,7 @@ func (_m *WebhookStore) GetOutgoingByChannelByUser(channelId string, userId stri
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(channelId, userId, offset, limit)
|
||||
r1 = rf(channelID, userId, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -296,13 +296,13 @@ func (_m *WebhookStore) GetOutgoingByChannelByUser(channelId string, userId stri
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetOutgoingByTeam provides a mock function with given fields: teamId, offset, limit
|
||||
func (_m *WebhookStore) GetOutgoingByTeam(teamId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(teamId, offset, limit)
|
||||
// GetOutgoingByTeam provides a mock function with given fields: teamID, offset, limit
|
||||
func (_m *WebhookStore) GetOutgoingByTeam(teamID string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(teamID, offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(teamId, offset, limit)
|
||||
r0 = rf(teamID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.OutgoingWebhook)
|
||||
@@ -311,7 +311,7 @@ func (_m *WebhookStore) GetOutgoingByTeam(teamId string, offset int, limit int)
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(teamId, offset, limit)
|
||||
r1 = rf(teamID, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -319,13 +319,13 @@ func (_m *WebhookStore) GetOutgoingByTeam(teamId string, offset int, limit int)
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetOutgoingByTeamByUser provides a mock function with given fields: teamId, userId, offset, limit
|
||||
func (_m *WebhookStore) GetOutgoingByTeamByUser(teamId string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(teamId, userId, offset, limit)
|
||||
// GetOutgoingByTeamByUser provides a mock function with given fields: teamID, userId, offset, limit
|
||||
func (_m *WebhookStore) GetOutgoingByTeamByUser(teamID string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(teamID, userId, offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(teamId, userId, offset, limit)
|
||||
r0 = rf(teamID, userId, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.OutgoingWebhook)
|
||||
@@ -334,7 +334,7 @@ func (_m *WebhookStore) GetOutgoingByTeamByUser(teamId string, userId string, of
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(teamId, userId, offset, limit)
|
||||
r1 = rf(teamID, userId, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -393,13 +393,13 @@ func (_m *WebhookStore) InvalidateWebhookCache(webhook string) {
|
||||
_m.Called(webhook)
|
||||
}
|
||||
|
||||
// PermanentDeleteIncomingByChannel provides a mock function with given fields: channelId
|
||||
func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelId string) error {
|
||||
ret := _m.Called(channelId)
|
||||
// PermanentDeleteIncomingByChannel provides a mock function with given fields: channelID
|
||||
func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelID string) error {
|
||||
ret := _m.Called(channelID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(channelId)
|
||||
r0 = rf(channelID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -421,13 +421,13 @@ func (_m *WebhookStore) PermanentDeleteIncomingByUser(userId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// PermanentDeleteOutgoingByChannel provides a mock function with given fields: channelId
|
||||
func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelId string) error {
|
||||
ret := _m.Called(channelId)
|
||||
// PermanentDeleteOutgoingByChannel provides a mock function with given fields: channelID
|
||||
func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelID string) error {
|
||||
ret := _m.Called(channelID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(channelId)
|
||||
r0 = rf(channelID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -115,7 +115,7 @@ func RenderWebError(config *model.Config, w http.ResponseWriter, r *http.Request
|
||||
fmt.Fprintln(w, `</body></html>`)
|
||||
}
|
||||
|
||||
func RenderMobileAuthComplete(w http.ResponseWriter, redirectUrl string) {
|
||||
func RenderMobileAuthComplete(w http.ResponseWriter, redirectURL string) {
|
||||
RenderMobileMessage(w, `
|
||||
<div class="icon text-success" style="font-size: 4em">
|
||||
<i class="fa fa-check-circle" title="Success Icon"></i>
|
||||
@@ -123,13 +123,13 @@ func RenderMobileAuthComplete(w http.ResponseWriter, redirectUrl string) {
|
||||
<h2> `+T("api.oauth.auth_complete")+` </h2>
|
||||
<p id="redirecting-message"> `+T("api.oauth.redirecting_back")+` </p>
|
||||
<p id="close-tab-message" style="display: none"> `+T("api.oauth.close_browser")+` </p>
|
||||
<noscript><meta http-equiv="refresh" content="2; url=`+template.HTMLEscapeString(redirectUrl)+`"></noscript>
|
||||
<noscript><meta http-equiv="refresh" content="2; url=`+template.HTMLEscapeString(redirectURL)+`"></noscript>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
setTimeout(function() {
|
||||
document.getElementById('redirecting-message').style.display = 'none';
|
||||
document.getElementById('close-tab-message').style.display = 'block';
|
||||
window.location='`+template.HTMLEscapeString(template.JSEscapeString(redirectUrl))+`';
|
||||
window.location='`+template.HTMLEscapeString(template.JSEscapeString(redirectURL))+`';
|
||||
}, 2000);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -89,7 +89,7 @@ type HTMLTemplate struct {
|
||||
Templates *template.Template
|
||||
TemplateName string
|
||||
Props map[string]interface{}
|
||||
Html map[string]template.HTML
|
||||
HTML map[string]template.HTML
|
||||
}
|
||||
|
||||
func NewHTMLTemplate(templates *template.Template, templateName string) *HTMLTemplate {
|
||||
@@ -97,7 +97,7 @@ func NewHTMLTemplate(templates *template.Template, templateName string) *HTMLTem
|
||||
Templates: templates,
|
||||
TemplateName: templateName,
|
||||
Props: make(map[string]interface{}),
|
||||
Html: make(map[string]template.HTML),
|
||||
HTML: make(map[string]template.HTML),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,14 +120,14 @@ func (t *HTMLTemplate) RenderToWriter(w io.Writer) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func TranslateAsHtml(t i18n.TranslateFunc, translationID string, args map[string]interface{}) template.HTML {
|
||||
message := t(translationID, escapeForHtml(args))
|
||||
func TranslateAsHTML(t i18n.TranslateFunc, translationID string, args map[string]interface{}) template.HTML {
|
||||
message := t(translationID, escapeForHTML(args))
|
||||
message = strings.Replace(message, "[[", "<strong>", -1)
|
||||
message = strings.Replace(message, "]]", "</strong>", -1)
|
||||
return template.HTML(message)
|
||||
}
|
||||
|
||||
func escapeForHtml(arg interface{}) interface{} {
|
||||
func escapeForHTML(arg interface{}) interface{} {
|
||||
switch typedArg := arg.(type) {
|
||||
case string:
|
||||
return template.HTMLEscapeString(typedArg)
|
||||
@@ -136,7 +136,7 @@ func escapeForHtml(arg interface{}) interface{} {
|
||||
case map[string]interface{}:
|
||||
safeArg := make(map[string]interface{}, len(typedArg))
|
||||
for key, value := range typedArg {
|
||||
safeArg[key] = escapeForHtml(value)
|
||||
safeArg[key] = escapeForHTML(value)
|
||||
}
|
||||
return safeArg
|
||||
default:
|
||||
|
||||
@@ -103,7 +103,7 @@ func TestHTMLTemplate_RenderError(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestTranslateAsHtml(t *testing.T) {
|
||||
assert.EqualValues(t, "<p><strong><i>foo</i></strong></p>", TranslateAsHtml(i18n.TranslateFunc(htmlTestTranslationBundle.MustTfunc("en")), "foo.bold", map[string]interface{}{
|
||||
assert.EqualValues(t, "<p><strong><i>foo</i></strong></p>", TranslateAsHTML(i18n.TranslateFunc(htmlTestTranslationBundle.MustTfunc("en")), "foo.bold", map[string]interface{}{
|
||||
"Foo": "<i>foo</i>",
|
||||
}))
|
||||
}
|
||||
@@ -141,7 +141,7 @@ func TestEscapeForHtml(t *testing.T) {
|
||||
},
|
||||
} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
assert.Equal(t, tc.Expected, escapeForHtml(tc.In))
|
||||
assert.Equal(t, tc.Expected, escapeForHTML(tc.In))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,34 +10,34 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type HumanizedJsonError struct {
|
||||
type HumanizedJSONError struct {
|
||||
Err error
|
||||
Line int
|
||||
Character int
|
||||
}
|
||||
|
||||
func (e *HumanizedJsonError) Error() string {
|
||||
func (e *HumanizedJSONError) Error() string {
|
||||
return e.Err.Error()
|
||||
}
|
||||
|
||||
// HumanizeJsonError extracts error offsets and annotates the error with useful context
|
||||
func HumanizeJsonError(err error, data []byte) error {
|
||||
// HumanizeJSONError extracts error offsets and annotates the error with useful context
|
||||
func HumanizeJSONError(err error, data []byte) error {
|
||||
if syntaxError, ok := err.(*json.SyntaxError); ok {
|
||||
return NewHumanizedJsonError(syntaxError, data, syntaxError.Offset)
|
||||
return NewHumanizedJSONError(syntaxError, data, syntaxError.Offset)
|
||||
} else if unmarshalError, ok := err.(*json.UnmarshalTypeError); ok {
|
||||
return NewHumanizedJsonError(unmarshalError, data, unmarshalError.Offset)
|
||||
return NewHumanizedJSONError(unmarshalError, data, unmarshalError.Offset)
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
func NewHumanizedJsonError(err error, data []byte, offset int64) *HumanizedJsonError {
|
||||
func NewHumanizedJSONError(err error, data []byte, offset int64) *HumanizedJSONError {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if offset < 0 || offset > int64(len(data)) {
|
||||
return &HumanizedJsonError{
|
||||
return &HumanizedJSONError{
|
||||
Err: errors.Wrapf(err, "invalid offset %d", offset),
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ func NewHumanizedJsonError(err error, data []byte, offset int64) *HumanizedJsonE
|
||||
lastLineOffset := bytes.LastIndex(data[:offset], lineSep)
|
||||
character := int(offset) - (lastLineOffset + 1) + 1
|
||||
|
||||
return &HumanizedJsonError{
|
||||
return &HumanizedJSONError{
|
||||
Line: line,
|
||||
Character: character,
|
||||
Err: errors.Wrapf(err, "parsing error at line %d, character %d", line, character),
|
||||
|
||||
@@ -63,7 +63,7 @@ func TestHumanizeJsonError(t *testing.T) {
|
||||
for _, testCase := range testCases {
|
||||
testCase := testCase
|
||||
t.Run(testCase.Description, func(t *testing.T) {
|
||||
actual := jsonutils.HumanizeJsonError(testCase.Err, testCase.Data)
|
||||
actual := jsonutils.HumanizeJSONError(testCase.Err, testCase.Data)
|
||||
if testCase.ExpectedErr == "" {
|
||||
assert.NoError(t, actual)
|
||||
} else {
|
||||
@@ -73,7 +73,7 @@ func TestHumanizeJsonError(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewHumanizedJsonError(t *testing.T) {
|
||||
func TestNewHumanizedJSONError(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCases := []struct {
|
||||
@@ -81,7 +81,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
Data []byte
|
||||
Offset int64
|
||||
Err error
|
||||
Expected *jsonutils.HumanizedJsonError
|
||||
Expected *jsonutils.HumanizedJSONError
|
||||
}{
|
||||
{
|
||||
"nil error",
|
||||
@@ -95,7 +95,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
-1,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "invalid offset -1"),
|
||||
},
|
||||
},
|
||||
@@ -104,7 +104,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
0,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "parsing error at line 1, character 1"),
|
||||
Line: 1,
|
||||
Character: 1,
|
||||
@@ -115,7 +115,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
5,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "parsing error at line 1, character 6"),
|
||||
Line: 1,
|
||||
Character: 6,
|
||||
@@ -126,7 +126,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
6,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "parsing error at line 1, character 7"),
|
||||
Line: 1,
|
||||
Character: 7,
|
||||
@@ -137,7 +137,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
7,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "parsing error at line 2, character 1"),
|
||||
Line: 2,
|
||||
Character: 1,
|
||||
@@ -148,7 +148,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
12,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "parsing error at line 2, character 6"),
|
||||
Line: 2,
|
||||
Character: 6,
|
||||
@@ -159,7 +159,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
13,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "parsing error at line 2, character 7"),
|
||||
Line: 2,
|
||||
Character: 7,
|
||||
@@ -170,7 +170,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
17,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "parsing error at line 3, character 4"),
|
||||
Line: 3,
|
||||
Character: 4,
|
||||
@@ -181,7 +181,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
19,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "parsing error at line 3, character 6"),
|
||||
Line: 3,
|
||||
Character: 6,
|
||||
@@ -192,7 +192,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
20,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "parsing error at line 3, character 7"),
|
||||
Line: 3,
|
||||
Character: 7,
|
||||
@@ -203,7 +203,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3\n"),
|
||||
21,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "parsing error at line 4, character 1"),
|
||||
Line: 4,
|
||||
Character: 1,
|
||||
@@ -214,7 +214,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
[]byte("line 1\nline 2\nline 3"),
|
||||
21,
|
||||
errors.New("message"),
|
||||
&jsonutils.HumanizedJsonError{
|
||||
&jsonutils.HumanizedJSONError{
|
||||
Err: errors.Wrap(errors.New("message"), "invalid offset 21"),
|
||||
},
|
||||
},
|
||||
@@ -223,7 +223,7 @@ func TestNewHumanizedJsonError(t *testing.T) {
|
||||
for _, testCase := range testCases {
|
||||
testCase := testCase
|
||||
t.Run(testCase.Description, func(t *testing.T) {
|
||||
actual := jsonutils.NewHumanizedJsonError(testCase.Err, testCase.Data, testCase.Offset)
|
||||
actual := jsonutils.NewHumanizedJSONError(testCase.Err, testCase.Data, testCase.Offset)
|
||||
if testCase.Expected != nil && actual.Err != nil {
|
||||
if assert.EqualValues(t, testCase.Expected.Err.Error(), actual.Err.Error()) {
|
||||
actual.Err = testCase.Expected.Err
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
// Based off of extensions/autolink.c from https://github.com/github/cmark
|
||||
|
||||
var (
|
||||
DefaultUrlSchemes = []string{"http", "https", "ftp", "mailto", "tel"}
|
||||
DefaultURLSchemes = []string{"http", "https", "ftp", "mailto", "tel"}
|
||||
wwwAutoLinkRegex = regexp.MustCompile(`^www\d{0,3}\.`)
|
||||
)
|
||||
|
||||
@@ -111,7 +111,7 @@ func parseURLAutolink(data string, position int) (Range, bool) {
|
||||
|
||||
func isSchemeAllowed(scheme string) bool {
|
||||
// Note that this doesn't support the custom URL schemes implemented by the client
|
||||
for _, allowed := range DefaultUrlSchemes {
|
||||
for _, allowed := range DefaultURLSchemes {
|
||||
if strings.EqualFold(allowed, scheme) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -62,8 +62,8 @@ func UpdateAssetsSubpathInDir(subpath, directory string) error {
|
||||
return errors.Wrapf(err, "failed to resolve symlinks to %s", staticDir)
|
||||
}
|
||||
|
||||
rootHtmlPath := filepath.Join(staticDir, "root.html")
|
||||
oldRootHtml, err := ioutil.ReadFile(rootHtmlPath)
|
||||
rootHTMLPath := filepath.Join(staticDir, "root.html")
|
||||
oldRootHTML, err := ioutil.ReadFile(rootHTMLPath)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to open root.html")
|
||||
}
|
||||
@@ -73,7 +73,7 @@ func UpdateAssetsSubpathInDir(subpath, directory string) error {
|
||||
// Determine if a previous subpath had already been rewritten into the assets.
|
||||
reWebpackPublicPathScript := regexp.MustCompile("window.publicPath='([^']+/)static/'")
|
||||
alreadyRewritten := false
|
||||
if matches := reWebpackPublicPathScript.FindStringSubmatch(string(oldRootHtml)); matches != nil {
|
||||
if matches := reWebpackPublicPathScript.FindStringSubmatch(string(oldRootHTML)); matches != nil {
|
||||
oldSubpath = matches[1]
|
||||
alreadyRewritten = true
|
||||
}
|
||||
@@ -83,14 +83,14 @@ func UpdateAssetsSubpathInDir(subpath, directory string) error {
|
||||
|
||||
mlog.Debug("Rewriting static assets", mlog.String("from_subpath", oldSubpath), mlog.String("to_subpath", subpath))
|
||||
|
||||
newRootHtml := string(oldRootHtml)
|
||||
newRootHTML := string(oldRootHTML)
|
||||
|
||||
reCSP := regexp.MustCompile(`<meta http-equiv="Content-Security-Policy" content="script-src 'self' cdn.rudderlabs.com/ js.stripe.com/v3([^"]*)">`)
|
||||
if results := reCSP.FindAllString(newRootHtml, -1); len(results) == 0 {
|
||||
if results := reCSP.FindAllString(newRootHTML, -1); len(results) == 0 {
|
||||
return fmt.Errorf("failed to find 'Content-Security-Policy' meta tag to rewrite")
|
||||
}
|
||||
|
||||
newRootHtml = reCSP.ReplaceAllLiteralString(newRootHtml, fmt.Sprintf(
|
||||
newRootHTML = reCSP.ReplaceAllLiteralString(newRootHTML, fmt.Sprintf(
|
||||
`<meta http-equiv="Content-Security-Policy" content="script-src 'self' cdn.rudderlabs.com/ js.stripe.com/v3%s">`,
|
||||
GetSubpathScriptHash(subpath),
|
||||
))
|
||||
@@ -98,22 +98,22 @@ func UpdateAssetsSubpathInDir(subpath, directory string) error {
|
||||
// Rewrite the root.html references to `/static/*` to include the given subpath.
|
||||
// This potentially includes a previously injected inline script that needs to
|
||||
// be updated (and isn't covered by the cases above).
|
||||
newRootHtml = strings.Replace(newRootHtml, pathToReplace, newPath, -1)
|
||||
newRootHTML = strings.Replace(newRootHTML, pathToReplace, newPath, -1)
|
||||
|
||||
if alreadyRewritten && subpath == "/" {
|
||||
// Remove the injected script since no longer required. Note that the rewrite above
|
||||
// will have affected the script, so look for the new subpath, not the old one.
|
||||
oldScript := getSubpathScript(subpath)
|
||||
newRootHtml = strings.Replace(newRootHtml, fmt.Sprintf("</style><script>%s</script>", oldScript), "</style>", 1)
|
||||
newRootHTML = strings.Replace(newRootHTML, fmt.Sprintf("</style><script>%s</script>", oldScript), "</style>", 1)
|
||||
|
||||
} else if !alreadyRewritten && subpath != "/" {
|
||||
// Otherwise, inject the script to define `window.publicPath`.
|
||||
script := getSubpathScript(subpath)
|
||||
newRootHtml = strings.Replace(newRootHtml, "</style>", fmt.Sprintf("</style><script>%s</script>", script), 1)
|
||||
newRootHTML = strings.Replace(newRootHTML, "</style>", fmt.Sprintf("</style><script>%s</script>", script), 1)
|
||||
}
|
||||
|
||||
// Write out the updated root.html.
|
||||
if err = ioutil.WriteFile(rootHtmlPath, []byte(newRootHtml), 0); err != nil {
|
||||
if err = ioutil.WriteFile(rootHTMLPath, []byte(newRootHTML), 0); err != nil {
|
||||
return errors.Wrapf(err, "failed to update root.html with subpath %s", subpath)
|
||||
}
|
||||
|
||||
|
||||
@@ -86,78 +86,78 @@ func TestUpdateAssetsSubpath(t *testing.T) {
|
||||
"no changes required, empty subpath provided",
|
||||
baseRootHtml,
|
||||
baseCss,
|
||||
baseManifestJson,
|
||||
baseManifestJSON,
|
||||
"",
|
||||
nil,
|
||||
baseRootHtml,
|
||||
baseCss,
|
||||
baseManifestJson,
|
||||
baseManifestJSON,
|
||||
},
|
||||
{
|
||||
"no changes required",
|
||||
baseRootHtml,
|
||||
baseCss,
|
||||
baseManifestJson,
|
||||
baseManifestJSON,
|
||||
"/",
|
||||
nil,
|
||||
baseRootHtml,
|
||||
baseCss,
|
||||
baseManifestJson,
|
||||
baseManifestJSON,
|
||||
},
|
||||
{
|
||||
"content security policy not found (missing quotes)",
|
||||
contentSecurityPolicyNotFoundHtml,
|
||||
baseCss,
|
||||
baseManifestJson,
|
||||
baseManifestJSON,
|
||||
"/subpath",
|
||||
fmt.Errorf("failed to find 'Content-Security-Policy' meta tag to rewrite"),
|
||||
contentSecurityPolicyNotFoundHtml,
|
||||
baseCss,
|
||||
baseManifestJson,
|
||||
baseManifestJSON,
|
||||
},
|
||||
{
|
||||
"content security policy not found (missing unsafe-eval)",
|
||||
contentSecurityPolicyNotFound2Html,
|
||||
baseCss,
|
||||
baseManifestJson,
|
||||
baseManifestJSON,
|
||||
"/subpath",
|
||||
fmt.Errorf("failed to find 'Content-Security-Policy' meta tag to rewrite"),
|
||||
contentSecurityPolicyNotFound2Html,
|
||||
baseCss,
|
||||
baseManifestJson,
|
||||
baseManifestJSON,
|
||||
},
|
||||
{
|
||||
"subpath",
|
||||
baseRootHtml,
|
||||
baseCss,
|
||||
baseManifestJson,
|
||||
baseManifestJSON,
|
||||
"/subpath",
|
||||
nil,
|
||||
subpathRootHtml,
|
||||
subpathCss,
|
||||
subpathCSS,
|
||||
subpathManifestJson,
|
||||
},
|
||||
{
|
||||
"new subpath from old",
|
||||
subpathRootHtml,
|
||||
subpathCss,
|
||||
subpathCSS,
|
||||
subpathManifestJson,
|
||||
"/nested/subpath",
|
||||
nil,
|
||||
newSubpathRootHtml,
|
||||
newSubpathCss,
|
||||
newSubpathRootHTML,
|
||||
newSubpathCSS,
|
||||
newSubpathManifestJson,
|
||||
},
|
||||
{
|
||||
"resetting to /",
|
||||
subpathRootHtml,
|
||||
subpathCss,
|
||||
baseManifestJson,
|
||||
subpathCSS,
|
||||
baseManifestJSON,
|
||||
"/",
|
||||
nil,
|
||||
baseRootHtml,
|
||||
baseCss,
|
||||
baseManifestJson,
|
||||
baseManifestJSON,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -278,13 +278,13 @@ const baseCss = `@font-face{font-family:FontAwesome;src:url(/static/files/674f50
|
||||
|
||||
const subpathRootHtml = `<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta http-equiv="Content-Security-Policy" content="script-src 'self' cdn.rudderlabs.com/ js.stripe.com/v3 'sha256-tPOjw+tkVs9axL78ZwGtYl975dtyPHB6LYKAO2R3gR4='"> <meta http-equiv=X-UA-Compatible content="IE=edge"> <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> <meta name=robots content="noindex, nofollow"> <meta name=referrer content=no-referrer> <title>Mattermost</title> <meta name=apple-mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-status-bar-style content=default> <meta name=mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-title content=Mattermost> <meta name=application-name content=Mattermost> <meta name=format-detection content="telephone=no"> <link rel=apple-touch-icon sizes=57x57 href=/subpath/static/files/78b7e73b41b8731ce2c41c870ecc8886.png> <link rel=apple-touch-icon sizes=60x60 href=/subpath/static/files/51d00ffd13afb6d74fd8f6dfdeef768a.png> <link rel=apple-touch-icon sizes=72x72 href=/subpath/static/files/23645596f8f78f017bd4d457abb855c4.png> <link rel=apple-touch-icon sizes=76x76 href=/subpath/static/files/26e9d72f472663a00b4b206149459fab.png> <link rel=apple-touch-icon sizes=144x144 href=/subpath/static/files/7bd91659bf3fc8c68fcd45fc1db9c630.png> <link rel=apple-touch-icon sizes=120x120 href=/subpath/static/files/fa69ffe11eb334aaef5aece8d848ca62.png> <link rel=apple-touch-icon sizes=152x152 href=/subpath/static/files/f046777feb6ab12fc43b8f9908b1db35.png> <link rel=icon type=image/png sizes=16x16 href=/subpath/static/files/02b96247d275680adaaabf01c71c571d.png> <link rel=icon type=image/png sizes=32x32 href=/subpath/static/files/1d9020f201a6762421cab8d30624fdd8.png> <link rel=icon type=image/png sizes=96x96 href=/subpath/static/files/fe23af39ae98d77dc26ae8586565970f.png> <link rel=icon type=image/png sizes=192x192 href=/subpath/static/files/d7ff68a7675f84337cc154c3d4abe713.png> <link rel=manifest href=/subpath/static/files/a985ad72552ad069537d6eea81e719c7.json> <link rel=stylesheet class=code_theme> <style>.error-screen{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding-top:50px;max-width:750px;font-size:14px;color:#333;margin:auto;display:none;line-height:1.5}.error-screen h2{font-size:30px;font-weight:400;line-height:1.2}.error-screen ul{padding-left:15px;line-height:1.7;margin-top:0;margin-bottom:10px}.error-screen hr{color:#ddd;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.error-screen-visible{display:block}</style><script>window.publicPath='/subpath/static/'</script> <link href="/subpath/static/main.364fd054d7a6d741efc6.css" rel="stylesheet"><script type="text/javascript" src="/subpath/static/main.e49599ac425584ffead5.js"></script></head> <body class=font--open_sans> <div id=root> <div class=error-screen> <h2>Cannot connect to Mattermost</h2> <hr/> <p>We're having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.</p> <br/> </div> <div class=loading-screen style=position:relative> <div class=loading__content> <div class="round round-1"></div> <div class="round round-2"></div> <div class="round round-3"></div> </div> </div> </div> <noscript> To use Mattermost, please enable JavaScript. </noscript> </body> </html>`
|
||||
|
||||
const subpathCss = `@font-face{font-family:FontAwesome;src:url(/subpath/static/files/674f50d287a8c48dc19ba404d20fe713.eot);src:url(/subpath/static/files/674f50d287a8c48dc19ba404d20fe713.eot?#iefix&v=4.7.0) format("embedded-opentype"),url(/subpath/static/files/af7ae505a9eed503f8b8e6982036873e.woff2) format("woff2"),url(/subpath/static/files/fee66e712a8a08eef5805a46892932ad.woff) format("woff"),url(/subpath/static/files/b06871f281fee6b241d60582ae9369b9.ttf) format("truetype"),url(/subpath/static/files/677433a0892aaed7b7d2628c313c9775.svg#fontawesomeregular) format("svg");font-weight:400;font-style:normal}`
|
||||
const subpathCSS = `@font-face{font-family:FontAwesome;src:url(/subpath/static/files/674f50d287a8c48dc19ba404d20fe713.eot);src:url(/subpath/static/files/674f50d287a8c48dc19ba404d20fe713.eot?#iefix&v=4.7.0) format("embedded-opentype"),url(/subpath/static/files/af7ae505a9eed503f8b8e6982036873e.woff2) format("woff2"),url(/subpath/static/files/fee66e712a8a08eef5805a46892932ad.woff) format("woff"),url(/subpath/static/files/b06871f281fee6b241d60582ae9369b9.ttf) format("truetype"),url(/subpath/static/files/677433a0892aaed7b7d2628c313c9775.svg#fontawesomeregular) format("svg");font-weight:400;font-style:normal}`
|
||||
|
||||
const newSubpathRootHtml = `<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta http-equiv="Content-Security-Policy" content="script-src 'self' cdn.rudderlabs.com/ js.stripe.com/v3 'sha256-mbRaPRRpWz6MNkX9SyXWMJ8XnWV4w/DoqK2M0ryUAvc='"> <meta http-equiv=X-UA-Compatible content="IE=edge"> <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> <meta name=robots content="noindex, nofollow"> <meta name=referrer content=no-referrer> <title>Mattermost</title> <meta name=apple-mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-status-bar-style content=default> <meta name=mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-title content=Mattermost> <meta name=application-name content=Mattermost> <meta name=format-detection content="telephone=no"> <link rel=apple-touch-icon sizes=57x57 href=/nested/subpath/static/files/78b7e73b41b8731ce2c41c870ecc8886.png> <link rel=apple-touch-icon sizes=60x60 href=/nested/subpath/static/files/51d00ffd13afb6d74fd8f6dfdeef768a.png> <link rel=apple-touch-icon sizes=72x72 href=/nested/subpath/static/files/23645596f8f78f017bd4d457abb855c4.png> <link rel=apple-touch-icon sizes=76x76 href=/nested/subpath/static/files/26e9d72f472663a00b4b206149459fab.png> <link rel=apple-touch-icon sizes=144x144 href=/nested/subpath/static/files/7bd91659bf3fc8c68fcd45fc1db9c630.png> <link rel=apple-touch-icon sizes=120x120 href=/nested/subpath/static/files/fa69ffe11eb334aaef5aece8d848ca62.png> <link rel=apple-touch-icon sizes=152x152 href=/nested/subpath/static/files/f046777feb6ab12fc43b8f9908b1db35.png> <link rel=icon type=image/png sizes=16x16 href=/nested/subpath/static/files/02b96247d275680adaaabf01c71c571d.png> <link rel=icon type=image/png sizes=32x32 href=/nested/subpath/static/files/1d9020f201a6762421cab8d30624fdd8.png> <link rel=icon type=image/png sizes=96x96 href=/nested/subpath/static/files/fe23af39ae98d77dc26ae8586565970f.png> <link rel=icon type=image/png sizes=192x192 href=/nested/subpath/static/files/d7ff68a7675f84337cc154c3d4abe713.png> <link rel=manifest href=/nested/subpath/static/files/a985ad72552ad069537d6eea81e719c7.json> <link rel=stylesheet class=code_theme> <style>.error-screen{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding-top:50px;max-width:750px;font-size:14px;color:#333;margin:auto;display:none;line-height:1.5}.error-screen h2{font-size:30px;font-weight:400;line-height:1.2}.error-screen ul{padding-left:15px;line-height:1.7;margin-top:0;margin-bottom:10px}.error-screen hr{color:#ddd;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.error-screen-visible{display:block}</style><script>window.publicPath='/nested/subpath/static/'</script> <link href="/nested/subpath/static/main.364fd054d7a6d741efc6.css" rel="stylesheet"><script type="text/javascript" src="/nested/subpath/static/main.e49599ac425584ffead5.js"></script></head> <body class=font--open_sans> <div id=root> <div class=error-screen> <h2>Cannot connect to Mattermost</h2> <hr/> <p>We're having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.</p> <br/> </div> <div class=loading-screen style=position:relative> <div class=loading__content> <div class="round round-1"></div> <div class="round round-2"></div> <div class="round round-3"></div> </div> </div> </div> <noscript> To use Mattermost, please enable JavaScript. </noscript> </body> </html>`
|
||||
const newSubpathRootHTML = `<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta http-equiv="Content-Security-Policy" content="script-src 'self' cdn.rudderlabs.com/ js.stripe.com/v3 'sha256-mbRaPRRpWz6MNkX9SyXWMJ8XnWV4w/DoqK2M0ryUAvc='"> <meta http-equiv=X-UA-Compatible content="IE=edge"> <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> <meta name=robots content="noindex, nofollow"> <meta name=referrer content=no-referrer> <title>Mattermost</title> <meta name=apple-mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-status-bar-style content=default> <meta name=mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-title content=Mattermost> <meta name=application-name content=Mattermost> <meta name=format-detection content="telephone=no"> <link rel=apple-touch-icon sizes=57x57 href=/nested/subpath/static/files/78b7e73b41b8731ce2c41c870ecc8886.png> <link rel=apple-touch-icon sizes=60x60 href=/nested/subpath/static/files/51d00ffd13afb6d74fd8f6dfdeef768a.png> <link rel=apple-touch-icon sizes=72x72 href=/nested/subpath/static/files/23645596f8f78f017bd4d457abb855c4.png> <link rel=apple-touch-icon sizes=76x76 href=/nested/subpath/static/files/26e9d72f472663a00b4b206149459fab.png> <link rel=apple-touch-icon sizes=144x144 href=/nested/subpath/static/files/7bd91659bf3fc8c68fcd45fc1db9c630.png> <link rel=apple-touch-icon sizes=120x120 href=/nested/subpath/static/files/fa69ffe11eb334aaef5aece8d848ca62.png> <link rel=apple-touch-icon sizes=152x152 href=/nested/subpath/static/files/f046777feb6ab12fc43b8f9908b1db35.png> <link rel=icon type=image/png sizes=16x16 href=/nested/subpath/static/files/02b96247d275680adaaabf01c71c571d.png> <link rel=icon type=image/png sizes=32x32 href=/nested/subpath/static/files/1d9020f201a6762421cab8d30624fdd8.png> <link rel=icon type=image/png sizes=96x96 href=/nested/subpath/static/files/fe23af39ae98d77dc26ae8586565970f.png> <link rel=icon type=image/png sizes=192x192 href=/nested/subpath/static/files/d7ff68a7675f84337cc154c3d4abe713.png> <link rel=manifest href=/nested/subpath/static/files/a985ad72552ad069537d6eea81e719c7.json> <link rel=stylesheet class=code_theme> <style>.error-screen{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding-top:50px;max-width:750px;font-size:14px;color:#333;margin:auto;display:none;line-height:1.5}.error-screen h2{font-size:30px;font-weight:400;line-height:1.2}.error-screen ul{padding-left:15px;line-height:1.7;margin-top:0;margin-bottom:10px}.error-screen hr{color:#ddd;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.error-screen-visible{display:block}</style><script>window.publicPath='/nested/subpath/static/'</script> <link href="/nested/subpath/static/main.364fd054d7a6d741efc6.css" rel="stylesheet"><script type="text/javascript" src="/nested/subpath/static/main.e49599ac425584ffead5.js"></script></head> <body class=font--open_sans> <div id=root> <div class=error-screen> <h2>Cannot connect to Mattermost</h2> <hr/> <p>We're having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.</p> <br/> </div> <div class=loading-screen style=position:relative> <div class=loading__content> <div class="round round-1"></div> <div class="round round-2"></div> <div class="round round-3"></div> </div> </div> </div> <noscript> To use Mattermost, please enable JavaScript. </noscript> </body> </html>`
|
||||
|
||||
const newSubpathCss = `@font-face{font-family:FontAwesome;src:url(/nested/subpath/static/files/674f50d287a8c48dc19ba404d20fe713.eot);src:url(/nested/subpath/static/files/674f50d287a8c48dc19ba404d20fe713.eot?#iefix&v=4.7.0) format("embedded-opentype"),url(/nested/subpath/static/files/af7ae505a9eed503f8b8e6982036873e.woff2) format("woff2"),url(/nested/subpath/static/files/fee66e712a8a08eef5805a46892932ad.woff) format("woff"),url(/nested/subpath/static/files/b06871f281fee6b241d60582ae9369b9.ttf) format("truetype"),url(/nested/subpath/static/files/677433a0892aaed7b7d2628c313c9775.svg#fontawesomeregular) format("svg");font-weight:400;font-style:normal}`
|
||||
const newSubpathCSS = `@font-face{font-family:FontAwesome;src:url(/nested/subpath/static/files/674f50d287a8c48dc19ba404d20fe713.eot);src:url(/nested/subpath/static/files/674f50d287a8c48dc19ba404d20fe713.eot?#iefix&v=4.7.0) format("embedded-opentype"),url(/nested/subpath/static/files/af7ae505a9eed503f8b8e6982036873e.woff2) format("woff2"),url(/nested/subpath/static/files/fee66e712a8a08eef5805a46892932ad.woff) format("woff"),url(/nested/subpath/static/files/b06871f281fee6b241d60582ae9369b9.ttf) format("truetype"),url(/nested/subpath/static/files/677433a0892aaed7b7d2628c313c9775.svg#fontawesomeregular) format("svg");font-weight:400;font-style:normal}`
|
||||
|
||||
const baseManifestJson = `{
|
||||
const baseManifestJSON = `{
|
||||
"icons": [
|
||||
{
|
||||
"src": "/static/icon_96x96.png",
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func UrlEncode(str string) string {
|
||||
func URLEncode(str string) string {
|
||||
strs := strings.Split(str, " ")
|
||||
|
||||
for i, s := range strs {
|
||||
|
||||
@@ -12,17 +12,17 @@ import (
|
||||
func TestUrlEncode(t *testing.T) {
|
||||
|
||||
toEncode := "testing 1 2 3"
|
||||
encoded := UrlEncode(toEncode)
|
||||
encoded := URLEncode(toEncode)
|
||||
|
||||
require.Equal(t, encoded, "testing%201%202%203")
|
||||
|
||||
toEncode = "testing123"
|
||||
encoded = UrlEncode(toEncode)
|
||||
encoded = URLEncode(toEncode)
|
||||
|
||||
require.Equal(t, encoded, "testing123")
|
||||
|
||||
toEncode = "testing$#~123"
|
||||
encoded = UrlEncode(toEncode)
|
||||
encoded = URLEncode(toEncode)
|
||||
|
||||
require.Equal(t, encoded, "testing%24%23~123")
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ func StringSliceDiff(a, b []string) []string {
|
||||
return result
|
||||
}
|
||||
|
||||
func GetIpAddress(r *http.Request, trustedProxyIPHeader []string) string {
|
||||
func GetIPAddress(r *http.Request, trustedProxyIPHeader []string) string {
|
||||
address := ""
|
||||
|
||||
for _, proxyHeader := range trustedProxyIPHeader {
|
||||
@@ -135,7 +135,7 @@ type RequestCache struct {
|
||||
|
||||
// Fetch JSON data from the notices server
|
||||
// if skip is passed, does a fetch without touching the cache
|
||||
func GetUrlWithCache(url string, cache *RequestCache, skip bool) ([]byte, error) {
|
||||
func GetURLWithCache(url string, cache *RequestCache, skip bool) ([]byte, error) {
|
||||
// Build a GET Request, including optional If-None-Match header.
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
@@ -198,8 +198,8 @@ func IsValidWebAuthRedirectURL(config *model.Config, redirectURL string) bool {
|
||||
u, err := url.Parse(redirectURL)
|
||||
if err == nil && (u.Scheme == "http" || u.Scheme == "https") {
|
||||
if config.ServiceSettings.SiteURL != nil {
|
||||
siteUrl := *config.ServiceSettings.SiteURL
|
||||
return strings.Index(strings.ToLower(redirectURL), strings.ToLower(siteUrl)) == 0
|
||||
siteURL := *config.ServiceSettings.SiteURL
|
||||
return strings.Index(strings.ToLower(redirectURL), strings.ToLower(siteURL)) == 0
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ func TestStringSliceDiff(t *testing.T) {
|
||||
assert.Equal(t, expected, StringSliceDiff(a, b))
|
||||
}
|
||||
|
||||
func TestGetIpAddress(t *testing.T) {
|
||||
func TestGetIPAddress(t *testing.T) {
|
||||
// Test with a single IP in the X-Forwarded-For
|
||||
httpRequest1 := http.Request{
|
||||
Header: http.Header{
|
||||
@@ -59,7 +59,7 @@ func TestGetIpAddress(t *testing.T) {
|
||||
RemoteAddr: "10.2.0.1:12345",
|
||||
}
|
||||
|
||||
assert.Equal(t, "10.0.0.1", GetIpAddress(&httpRequest1, []string{"X-Forwarded-For"}))
|
||||
assert.Equal(t, "10.0.0.1", GetIPAddress(&httpRequest1, []string{"X-Forwarded-For"}))
|
||||
|
||||
// Test with multiple IPs in the X-Forwarded-For
|
||||
httpRequest2 := http.Request{
|
||||
@@ -70,7 +70,7 @@ func TestGetIpAddress(t *testing.T) {
|
||||
RemoteAddr: "10.2.0.1:12345",
|
||||
}
|
||||
|
||||
assert.Equal(t, "10.0.0.1", GetIpAddress(&httpRequest2, []string{"X-Forwarded-For"}))
|
||||
assert.Equal(t, "10.0.0.1", GetIPAddress(&httpRequest2, []string{"X-Forwarded-For"}))
|
||||
|
||||
// Test with an empty X-Forwarded-For
|
||||
httpRequest3 := http.Request{
|
||||
@@ -81,7 +81,7 @@ func TestGetIpAddress(t *testing.T) {
|
||||
RemoteAddr: "10.2.0.1:12345",
|
||||
}
|
||||
|
||||
assert.Equal(t, "10.1.0.1", GetIpAddress(&httpRequest3, []string{"X-Forwarded-For", "X-Real-Ip"}))
|
||||
assert.Equal(t, "10.1.0.1", GetIPAddress(&httpRequest3, []string{"X-Forwarded-For", "X-Real-Ip"}))
|
||||
|
||||
// Test without an X-Fowarded-For
|
||||
httpRequest4 := http.Request{
|
||||
@@ -91,14 +91,14 @@ func TestGetIpAddress(t *testing.T) {
|
||||
RemoteAddr: "10.2.0.1:12345",
|
||||
}
|
||||
|
||||
assert.Equal(t, "10.1.0.1", GetIpAddress(&httpRequest4, []string{"X-Forwarded-For", "X-Real-Ip"}))
|
||||
assert.Equal(t, "10.1.0.1", GetIPAddress(&httpRequest4, []string{"X-Forwarded-For", "X-Real-Ip"}))
|
||||
|
||||
// Test without any headers
|
||||
httpRequest5 := http.Request{
|
||||
RemoteAddr: "10.2.0.1:12345",
|
||||
}
|
||||
|
||||
assert.Equal(t, "10.2.0.1", GetIpAddress(&httpRequest5, []string{"X-Forwarded-For", "X-Real-Ip"}))
|
||||
assert.Equal(t, "10.2.0.1", GetIPAddress(&httpRequest5, []string{"X-Forwarded-For", "X-Real-Ip"}))
|
||||
|
||||
// Test with both headers, but both untrusted
|
||||
httpRequest6 := http.Request{
|
||||
@@ -109,7 +109,7 @@ func TestGetIpAddress(t *testing.T) {
|
||||
RemoteAddr: "10.2.0.1:12345",
|
||||
}
|
||||
|
||||
assert.Equal(t, "10.2.0.1", GetIpAddress(&httpRequest6, nil))
|
||||
assert.Equal(t, "10.2.0.1", GetIPAddress(&httpRequest6, nil))
|
||||
|
||||
// Test with both headers, but only X-Real-Ip trusted
|
||||
httpRequest7 := http.Request{
|
||||
@@ -120,7 +120,7 @@ func TestGetIpAddress(t *testing.T) {
|
||||
RemoteAddr: "10.2.0.1:12345",
|
||||
}
|
||||
|
||||
assert.Equal(t, "10.1.0.1", GetIpAddress(&httpRequest7, []string{"X-Real-Ip"}))
|
||||
assert.Equal(t, "10.1.0.1", GetIPAddress(&httpRequest7, []string{"X-Real-Ip"}))
|
||||
|
||||
// Test with X-Forwarded-For, comma separated, untrusted
|
||||
httpRequest8 := http.Request{
|
||||
@@ -130,7 +130,7 @@ func TestGetIpAddress(t *testing.T) {
|
||||
RemoteAddr: "10.2.0.1:12345",
|
||||
}
|
||||
|
||||
assert.Equal(t, "10.2.0.1", GetIpAddress(&httpRequest8, nil))
|
||||
assert.Equal(t, "10.2.0.1", GetIPAddress(&httpRequest8, nil))
|
||||
|
||||
// Test with X-Forwarded-For, comma separated, untrusted
|
||||
httpRequest9 := http.Request{
|
||||
@@ -140,7 +140,7 @@ func TestGetIpAddress(t *testing.T) {
|
||||
RemoteAddr: "10.2.0.1:12345",
|
||||
}
|
||||
|
||||
assert.Equal(t, "10.3.0.1", GetIpAddress(&httpRequest9, []string{"X-Forwarded-For"}))
|
||||
assert.Equal(t, "10.3.0.1", GetIPAddress(&httpRequest9, []string{"X-Forwarded-For"}))
|
||||
|
||||
// Test with both headers, both allowed, first one in trusted used
|
||||
httpRequest10 := http.Request{
|
||||
@@ -151,7 +151,7 @@ func TestGetIpAddress(t *testing.T) {
|
||||
RemoteAddr: "10.2.0.1:12345",
|
||||
}
|
||||
|
||||
assert.Equal(t, "10.1.0.1", GetIpAddress(&httpRequest10, []string{"X-Real-Ip", "X-Forwarded-For"}))
|
||||
assert.Equal(t, "10.1.0.1", GetIPAddress(&httpRequest10, []string{"X-Real-Ip", "X-Forwarded-For"}))
|
||||
}
|
||||
|
||||
func TestRemoveStringFromSlice(t *testing.T) {
|
||||
|
||||
@@ -111,7 +111,7 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
t, _ := utils.GetTranslationsAndLocale(r)
|
||||
c.App.SetT(t)
|
||||
c.App.SetRequestId(requestID)
|
||||
c.App.SetIpAddress(utils.GetIpAddress(r, c.App.Config().ServiceSettings.TrustedProxyIPHeader))
|
||||
c.App.SetIpAddress(utils.GetIPAddress(r, c.App.Config().ServiceSettings.TrustedProxyIPHeader))
|
||||
c.App.SetUserAgent(r.UserAgent())
|
||||
c.App.SetAcceptLanguage(r.Header.Get("Accept-Language"))
|
||||
c.App.SetPath(r.URL.Path)
|
||||
|
||||
@@ -62,7 +62,7 @@ func CheckClientCompatibility(agentString string) bool {
|
||||
|
||||
func Handle404(config configservice.ConfigService, w http.ResponseWriter, r *http.Request) {
|
||||
err := model.NewAppError("Handle404", "api.context.404.app_error", nil, "", http.StatusNotFound)
|
||||
ipAddress := utils.GetIpAddress(r, config.Config().ServiceSettings.TrustedProxyIPHeader)
|
||||
ipAddress := utils.GetIPAddress(r, config.Config().ServiceSettings.TrustedProxyIPHeader)
|
||||
mlog.Debug("not found handler triggered", mlog.String("path", r.URL.Path), mlog.Int("code", 404), mlog.String("ip", ipAddress))
|
||||
|
||||
if IsApiCall(config, r) {
|
||||
|
||||
Ссылка в новой задаче
Block a user