Documentation ¶
Index ¶
- Constants
- func GetMigrationState(migration string, store store.Store) (string, *model.Job, *model.AppError)
- func MakeMigrationsList() []string
- func StopTestStore()
- func UseTestStore(container *storetest.RunningContainer, settings *model.SqlSettings)
- type AdvancedPermissionsPhase2Progress
- type FakeClusterInterface
- func (me *FakeClusterInterface) ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError
- func (me *FakeClusterInterface) GetClusterId() string
- func (me *FakeClusterInterface) GetClusterInfos() []*model.ClusterInfo
- func (me *FakeClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.AppError)
- func (me *FakeClusterInterface) GetLogs(page, perPage int) ([]string, *model.AppError)
- func (me *FakeClusterInterface) GetMyClusterInfo() *model.ClusterInfo
- func (me *FakeClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.AppError)
- func (me *FakeClusterInterface) IsLeader() bool
- func (me *FakeClusterInterface) NotifyMsg(buf []byte)
- func (me *FakeClusterInterface) RegisterClusterMessageHandler(event string, crm einterfaces.ClusterMessageHandler)
- func (me *FakeClusterInterface) SendClusterMessage(cluster *model.ClusterMessage)
- func (me *FakeClusterInterface) StartInterNodeCommunication()
- func (me *FakeClusterInterface) StopInterNodeCommunication()
- type MigrationsJobInterfaceImpl
- type Scheduler
- func (scheduler *Scheduler) Enabled(cfg *model.Config) bool
- func (scheduler *Scheduler) JobType() string
- func (scheduler *Scheduler) Name() string
- func (scheduler *Scheduler) NextScheduleTime(cfg *model.Config, now time.Time, pendingJobs bool, ...) *time.Time
- func (scheduler *Scheduler) ScheduleJob(cfg *model.Config, pendingJobs bool, lastSuccessfulJob *model.Job) (*model.Job, *model.AppError)
- type TestHelper
- func (me *TestHelper) AddUserToChannel(user *model.User, channel *model.Channel) *model.ChannelMember
- func (me *TestHelper) CreateChannel(team *model.Team) *model.Channel
- func (me *TestHelper) CreateDmChannel(user *model.User) *model.Channel
- func (me *TestHelper) CreatePost(channel *model.Channel) *model.Post
- func (me *TestHelper) CreateTeam() *model.Team
- func (me *TestHelper) CreateUser() *model.User
- func (me *TestHelper) DeleteAllJobsByTypeAndMigrationKey(jobType string, migrationKey string)
- func (me *TestHelper) InitBasic() *TestHelper
- func (me *TestHelper) InitSystemAdmin() *TestHelper
- func (me *TestHelper) LinkUserToTeam(user *model.User, team *model.Team)
- func (me *TestHelper) MakeEmail() string
- func (me *TestHelper) ResetRoleMigration()
- func (me *TestHelper) TearDown()
- type Worker
Constants ¶
View Source
const ( MIGRATION_STATE_UNSCHEDULED = "unscheduled" MIGRATION_STATE_IN_PROGRESS = "in_progress" MIGRATION_STATE_COMPLETED = "completed" JOB_DATA_KEY_MIGRATION = "migration_key" JOB_DATA_KEY_MIGRATION_LAST_DONE = "last_done" )
View Source
const (
MIGRATION_JOB_WEDGED_TIMEOUT_MILLISECONDS = 3600000 // 1 hour
)
View Source
const (
TIME_BETWEEN_BATCHES = 100
)
Variables ¶
This section is empty.
Functions ¶
func GetMigrationState ¶
func MakeMigrationsList ¶
func MakeMigrationsList() []string
func StopTestStore ¶
func StopTestStore()
func UseTestStore ¶
func UseTestStore(container *storetest.RunningContainer, settings *model.SqlSettings)
UseTestStore sets the container and corresponding settings to use for tests. Once the tests are complete (e.g. at the end of your TestMain implementation), you should call StopTestStore.
Types ¶
type AdvancedPermissionsPhase2Progress ¶
type AdvancedPermissionsPhase2Progress struct { CurrentTable string `json:"current_table"` LastTeamId string `json:"last_team_id"` LastChannelId string `json:"last_channel_id"` LastUserId string `json:"last_user"` }
func AdvancedPermissionsPhase2ProgressFromJson ¶
func AdvancedPermissionsPhase2ProgressFromJson(data io.Reader) *AdvancedPermissionsPhase2Progress
func (*AdvancedPermissionsPhase2Progress) IsValid ¶
func (p *AdvancedPermissionsPhase2Progress) IsValid() bool
func (*AdvancedPermissionsPhase2Progress) ToJson ¶
func (p *AdvancedPermissionsPhase2Progress) ToJson() string
type FakeClusterInterface ¶
type FakeClusterInterface struct {
// contains filtered or unexported fields
}
func (*FakeClusterInterface) ConfigChanged ¶
func (*FakeClusterInterface) GetClusterId ¶
func (me *FakeClusterInterface) GetClusterId() string
func (*FakeClusterInterface) GetClusterInfos ¶
func (me *FakeClusterInterface) GetClusterInfos() []*model.ClusterInfo
func (*FakeClusterInterface) GetClusterStats ¶
func (me *FakeClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.AppError)
func (*FakeClusterInterface) GetLogs ¶
func (me *FakeClusterInterface) GetLogs(page, perPage int) ([]string, *model.AppError)
func (*FakeClusterInterface) GetMyClusterInfo ¶
func (me *FakeClusterInterface) GetMyClusterInfo() *model.ClusterInfo
func (*FakeClusterInterface) GetPluginStatuses ¶
func (me *FakeClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.AppError)
func (*FakeClusterInterface) IsLeader ¶
func (me *FakeClusterInterface) IsLeader() bool
func (*FakeClusterInterface) NotifyMsg ¶
func (me *FakeClusterInterface) NotifyMsg(buf []byte)
func (*FakeClusterInterface) RegisterClusterMessageHandler ¶
func (me *FakeClusterInterface) RegisterClusterMessageHandler(event string, crm einterfaces.ClusterMessageHandler)
func (*FakeClusterInterface) SendClusterMessage ¶
func (me *FakeClusterInterface) SendClusterMessage(cluster *model.ClusterMessage)
func (*FakeClusterInterface) StartInterNodeCommunication ¶
func (me *FakeClusterInterface) StartInterNodeCommunication()
func (*FakeClusterInterface) StopInterNodeCommunication ¶
func (me *FakeClusterInterface) StopInterNodeCommunication()
type MigrationsJobInterfaceImpl ¶
func (*MigrationsJobInterfaceImpl) MakeScheduler ¶
func (m *MigrationsJobInterfaceImpl) MakeScheduler() model.Scheduler
func (*MigrationsJobInterfaceImpl) MakeWorker ¶
func (m *MigrationsJobInterfaceImpl) MakeWorker() model.Worker
type Scheduler ¶
func (*Scheduler) NextScheduleTime ¶
type TestHelper ¶
type TestHelper struct { App *app.App BasicTeam *model.Team BasicUser *model.User BasicUser2 *model.User BasicChannel *model.Channel BasicPost *model.Post SystemAdminUser *model.User // contains filtered or unexported fields }
func Setup ¶
func Setup() *TestHelper
func SetupEnterprise ¶
func SetupEnterprise() *TestHelper
func (*TestHelper) AddUserToChannel ¶
func (me *TestHelper) AddUserToChannel(user *model.User, channel *model.Channel) *model.ChannelMember
func (*TestHelper) CreateChannel ¶
func (me *TestHelper) CreateChannel(team *model.Team) *model.Channel
func (*TestHelper) CreateDmChannel ¶
func (me *TestHelper) CreateDmChannel(user *model.User) *model.Channel
func (*TestHelper) CreatePost ¶
func (me *TestHelper) CreatePost(channel *model.Channel) *model.Post
func (*TestHelper) CreateTeam ¶
func (me *TestHelper) CreateTeam() *model.Team
func (*TestHelper) CreateUser ¶
func (me *TestHelper) CreateUser() *model.User
func (*TestHelper) DeleteAllJobsByTypeAndMigrationKey ¶
func (me *TestHelper) DeleteAllJobsByTypeAndMigrationKey(jobType string, migrationKey string)
func (*TestHelper) InitBasic ¶
func (me *TestHelper) InitBasic() *TestHelper
func (*TestHelper) InitSystemAdmin ¶
func (me *TestHelper) InitSystemAdmin() *TestHelper
func (*TestHelper) LinkUserToTeam ¶
func (me *TestHelper) LinkUserToTeam(user *model.User, team *model.Team)
func (*TestHelper) MakeEmail ¶
func (me *TestHelper) MakeEmail() string
func (*TestHelper) ResetRoleMigration ¶
func (me *TestHelper) ResetRoleMigration()
func (*TestHelper) TearDown ¶
func (me *TestHelper) TearDown()
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) JobChannel ¶
Click to show internal directories.
Click to hide internal directories.