focalboard/server/einterfaces/einterfaces.go

27 lines
654 B
Go
Raw Normal View History

2021-03-29 20:10:12 +02:00
package einterfaces
import (
"github.com/gorilla/mux"
"github.com/mattermost/focalboard/server/model"
)
type MattermostAuth interface {
RegisterRoutes(*mux.Router)
DoesUserHaveWorkspaceAccess(session *model.Session, workspaceID string) bool
2021-03-31 00:25:16 +02:00
GetWorkspace(session *model.Session, workspaceID string) *model.Workspace
2021-03-29 20:10:12 +02:00
}
type MattermostAuthParameters struct {
ServerRoot string
MattermostURL string
ClientID string
ClientSecret string
UseSecureCookie bool
}
type MattermostAuthStore interface {
GetUserById(userID string) (*model.User, error)
CreateUser(user *model.User) error
CreateSession(session *model.Session) error
}