Files
mostlymatter/server/boards/services/store/sqlstore/params.go
Jesse Hallam bb02b35048 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
2023-05-10 13:07:02 -03:00

46 строки
1.0 KiB
Go

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package sqlstore
import (
"database/sql"
"fmt"
mm_model "github.com/mattermost/mattermost-server/server/public/model"
"github.com/mattermost/mattermost-server/server/public/shared/mlog"
)
// servicesAPI is the interface required my the Params to interact with the mattermost-server.
// You can use plugin-api or product-api adapter implementations.
type servicesAPI interface {
GetChannelByID(string) (*mm_model.Channel, error)
}
type Params struct {
DBType string
ConnectionString string
TablePrefix string
Logger mlog.LoggerIFace
DB *sql.DB
IsPlugin bool
IsSingleUser bool
ServicesAPI servicesAPI
SkipMigrations bool
ConfigFn func() *mm_model.Config
}
func (p Params) CheckValid() error {
return nil
}
type ErrStoreParam struct {
name string
issue string
}
func (e ErrStoreParam) Error() string {
return fmt.Sprintf("invalid store params: %s %s", e.name, e.issue)
}