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 удалений

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

@@ -8,7 +8,7 @@ import (
"strconv"
"strings"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
// GenerateClientConfig renders the given configuration for a client.

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

@@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
func TestGetClientConfig(t *testing.T) {

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

@@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
var emptyConfig, readOnlyConfig, minimalConfig, minimalConfigNoFF, invalidConfig, fixesRequiredConfig, ldapConfig, testConfig, customConfigDefaults *model.Config

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

@@ -25,9 +25,9 @@ import (
"github.com/mattermost/morph"
"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/store/sqlstore"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
"github.com/mattermost/morph/drivers"
ms "github.com/mattermost/morph/drivers/mysql"

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

@@ -16,7 +16,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
func getDsn(driver string, source string) string {

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

@@ -7,7 +7,7 @@ import (
"fmt"
"reflect"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
type ConfigDiffs []ConfigDiff

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

@@ -6,7 +6,7 @@ package config
import (
"testing"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/stretchr/testify/require"
)

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

@@ -6,8 +6,8 @@ package config
import (
"sync"
"github.com/mattermost/mattermost-server/server/v8/model"
"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/mlog"
)
// Listener is a callback function invoked when the configuration changes.

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

@@ -8,8 +8,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/mattermost/mattermost-server/server/v8/model"
"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/mlog"
)
func TestEmitter(t *testing.T) {

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

@@ -10,7 +10,7 @@ import (
"strconv"
"strings"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
func GetEnvironment() map[string]string {

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

@@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
func modifiedDefault(modify func(*model.Config)) *model.Config {

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

@@ -11,9 +11,9 @@ import (
"github.com/pkg/errors"
"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/utils/fileutils"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
var (

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

@@ -15,8 +15,8 @@ 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/v8/channels/utils"
"github.com/mattermost/mattermost-server/server/v8/model"
)
func setupConfigFile(t *testing.T, cfg *model.Config) (string, func()) {

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

@@ -10,7 +10,7 @@ import (
"strings"
"sync"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
)
type LogSrcListener func(old, new mlog.LoggerConfiguration)

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

@@ -9,9 +9,9 @@ import (
"path/filepath"
"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/utils/fileutils"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
const (

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

@@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/server/v8/model"
"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/mlog"
)
func TestMloggerConfigFromAuditConfig(t *testing.T) {

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

@@ -11,8 +11,8 @@ import (
"github.com/lib/pq"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/v8/channels/testlib"
"github.com/mattermost/mattermost-server/server/v8/model"
)
var mainHelper *testlib.MainHelper

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

@@ -8,7 +8,7 @@ import (
"github.com/pkg/errors"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
// MemoryStore implements the Store interface. It is meant primarily for testing.

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

@@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/public/model"
)
type cleanUpFn func(store *Store)

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

@@ -11,9 +11,9 @@ import (
"github.com/pkg/errors"
"github.com/mattermost/mattermost-server/server/v8/model"
"github.com/mattermost/mattermost-server/server/v8/model/utils"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/i18n"
"github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/i18n"
"github.com/mattermost/mattermost-server/server/public/utils"
)
var (

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

@@ -10,10 +10,10 @@ import (
"reflect"
"strings"
"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/utils"
"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"
)
// marshalConfig converts the given configuration into JSON bytes for persistence.

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

@@ -9,8 +9,8 @@ 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/v8/channels/utils"
"github.com/mattermost/mattermost-server/server/v8/model"
)
func TestDesanitize(t *testing.T) {