Expose public/ API as submodule (#23345)

* model -> public/model

* plugin -> public/plugin

* public/model/utils -> public/utils

* platform/shared/mlog -> public/shared/mlog

* platform/shared/i18n -> public/shared/i18n

* platform/shared/markdown -> public/shared/markdown

* platform/services/timezones -> public/shared/timezones

* channels/einterfaces -> einterfaces

* expose public/ submodule

* go mod tidy

* .github: cache-dependency-path, setup-go-work

* modules-tidy for public/ too

* remove old gomodtidy
Этот коммит содержится в:
Jesse Hallam
2023-05-10 13:07:02 -03:00
коммит произвёл GitHub
родитель 070ee26081
Коммит bb02b35048
1378 изменённых файлов: 2270 добавлений и 1868 удалений

Просмотреть файл

@@ -10,10 +10,10 @@ import (
"fmt"
"sync"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/channels/app/request"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/services/remotecluster"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
// postsToAttachments returns the file attachments for a slice of posts that need to be synchronized.

Просмотреть файл

@@ -9,10 +9,10 @@ import (
"fmt"
"strings"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/channels/app/request"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/services/remotecluster"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
// channelInviteMsg represents an invitation for a remote cluster to start sharing a channel.

Просмотреть файл

@@ -13,10 +13,10 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/plugin/plugintest/mock"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/channels/store/storetest/mocks"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/plugin/plugintest/mock"
)
func TestOnReceiveChannelInvite(t *testing.T) {

Просмотреть файл

@@ -8,7 +8,7 @@ import (
filestore "github.com/mattermost/mattermost-server/server/v8/platform/shared/filestore"
mock "github.com/stretchr/testify/mock"
model "github.com/mattermost/mattermost-server/server/v8/model"
model "github.com/mattermost/mattermost-server/server/public/model"
request "github.com/mattermost/mattermost-server/server/v8/channels/app/request"
)

Просмотреть файл

@@ -5,10 +5,10 @@
package sharedchannel
import (
mlog "github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
mlog "github.com/mattermost/mattermost-server/server/public/shared/mlog"
mock "github.com/stretchr/testify/mock"
model "github.com/mattermost/mattermost-server/server/v8/model"
model "github.com/mattermost/mattermost-server/server/public/model"
remotecluster "github.com/mattermost/mattermost-server/server/v8/platform/services/remotecluster"

Просмотреть файл

@@ -6,7 +6,7 @@ package sharedchannel
import (
"encoding/json"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
// syncMsg represents a change in content (post add/edit/delete, reaction add/remove, users).

Просмотреть файл

@@ -9,9 +9,9 @@ import (
"regexp"
"strings"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/i18n"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/i18n"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
)
var (

Просмотреть файл

@@ -10,11 +10,11 @@ import (
"github.com/stretchr/testify/assert"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/plugin/plugintest/mock"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/channels/store/storetest/mocks"
"github.com/mattermost/mattermost-server/server/v8/channels/utils"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/plugin/plugintest/mock"
)
func TestProcessPermalinkToRemote(t *testing.T) {

Просмотреть файл

@@ -10,12 +10,12 @@ import (
"sync"
"time"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/channels/app/request"
"github.com/mattermost/mattermost-server/server/v8/channels/store"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/services/remotecluster"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/filestore"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
const (

Просмотреть файл

@@ -11,10 +11,10 @@ import (
"strconv"
"strings"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/channels/app/request"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/services/remotecluster"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
func (scs *Service) onReceiveSyncMessage(msg model.RemoteClusterMsg, rc *model.RemoteCluster, response *remotecluster.Response) error {

Просмотреть файл

@@ -8,11 +8,11 @@ import (
"fmt"
"time"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/i18n"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/channels/app/request"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/services/remotecluster"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/i18n"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
type syncTask struct {

Просмотреть файл

@@ -11,10 +11,10 @@ import (
"github.com/wiggin77/merror"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
"github.com/mattermost/mattermost-server/server/v8/channels/app/request"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/services/remotecluster"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
type sendSyncMsgResultFunc func(syncResp SyncResponse, err error)

Просмотреть файл

@@ -7,7 +7,7 @@ import (
"fmt"
"strings"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
// fixMention replaces any mentions in a post for the user with the user's real username.