slashcommands

package
v5.28.1-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2020 License: AGPL-3.0, Apache-2.0 Imports: 22 Imported by: 4

Documentation

Index

Constants

View Source
const (
	USER_PASSWORD           = "passwd"
	CHANNEL_TYPE            = model.CHANNEL_OPEN
	BTEST_TEAM_DISPLAY_NAME = "TestTeam"
	BTEST_TEAM_NAME         = "z-z-testdomaina"
	BTEST_TEAM_EMAIL        = "test@nowhere.com"
	BTEST_TEAM_TYPE         = model.TEAM_OPEN
	BTEST_USER_NAME         = "Mr. Testing Tester"
	BTEST_USER_EMAIL        = "success+ttester@simulator.amazonses.com"
	BTEST_USER_PASSWORD     = "passwd"
)
View Source
const (
	CMD_EXPAND   = "expand"
	CMD_COLLAPSE = "collapse"
)
View Source
const (
	CMD_REMOVE = "remove"
	CMD_KICK   = "kick"
)
View Source
const (
	CMD_AWAY = "away"
)
View Source
const (
	CMD_CODE = "code"
)
View Source
const (
	CMD_DND = "dnd"
)
View Source
const (
	CMD_ECHO = "echo"
)
View Source
const (
	CMD_GROUPMSG = "groupmsg"
)
View Source
const (
	CMD_HEADER = "header"
)
View Source
const (
	CMD_HELP = "help"
)
View Source
const (
	CMD_INVITE = "invite"
)
View Source
const (
	CMD_INVITE_PEOPLE = "invite_people"
)
View Source
const (
	CMD_JOIN = "join"
)
View Source
const (
	CMD_LEAVE = "leave"
)
View Source
const (
	CMD_LOGOUT = "logout"
)
View Source
const (
	CMD_ME = "me"
)
View Source
const (
	CMD_MSG = "msg"
)
View Source
const (
	CMD_MUTE = "mute"
)
View Source
const (
	CMD_OFFLINE = "offline"
)
View Source
const (
	CMD_ONLINE = "online"
)
View Source
const (
	CMD_OPEN = "open"
)
View Source
const (
	CMD_PURPOSE = "purpose"
)
View Source
const (
	CMD_RENAME = "rename"
)
View Source
const (
	CMD_SEARCH = "search"
)
View Source
const (
	CMD_SETTINGS = "settings"
)
View Source
const (
	CMD_SHORTCUTS = "shortcuts"
)
View Source
const (
	CMD_SHRUG = "shrug"
)
View Source
const (
	CMD_TEST = "test"
)

Variables

View Source
var (
	TEAM_NAME_LEN            = utils.Range{Begin: 10, End: 20}
	TEAM_DOMAIN_NAME_LEN     = utils.Range{Begin: 10, End: 20}
	TEAM_EMAIL_LEN           = utils.Range{Begin: 15, End: 30}
	USER_NAME_LEN            = utils.Range{Begin: 5, End: 20}
	USER_EMAIL_LEN           = utils.Range{Begin: 15, End: 30}
	CHANNEL_DISPLAY_NAME_LEN = utils.Range{Begin: 10, End: 20}
	CHANNEL_NAME_LEN         = utils.Range{Begin: 5, End: 20}
	TEST_IMAGE_FILENAMES     = []string{"test.png", "testjpg.jpg", "testgif.gif"}
)

Functions

func CreateBasicUser

func CreateBasicUser(a *app.App, client *model.Client4) *model.AppError

Basic test team and user so you always know one

Types

type AutoChannelCreator

type AutoChannelCreator struct {
	Fuzzy              bool
	DisplayNameLen     utils.Range
	DisplayNameCharset string
	NameLen            utils.Range
	NameCharset        string
	ChannelType        string
	// contains filtered or unexported fields
}

func NewAutoChannelCreator

func NewAutoChannelCreator(a *app.App, team *model.Team, userId string) *AutoChannelCreator

func (*AutoChannelCreator) CreateTestChannels

func (cfg *AutoChannelCreator) CreateTestChannels(num utils.Range) ([]*model.Channel, error)

type AutoPostCreator

type AutoPostCreator struct {
	Fuzzy          bool
	TextLength     utils.Range
	HasImage       bool
	ImageFilenames []string
	Users          []string
	Mentions       utils.Range
	Tags           utils.Range
	// contains filtered or unexported fields
}

func NewAutoPostCreator

func NewAutoPostCreator(a *app.App, channelid, userid string) *AutoPostCreator

Automatic poster used for testing

func (*AutoPostCreator) CreateRandomPost

func (cfg *AutoPostCreator) CreateRandomPost() (*model.Post, error)

func (*AutoPostCreator) CreateRandomPostNested

func (cfg *AutoPostCreator) CreateRandomPostNested(parentId, rootId string) (*model.Post, error)

func (*AutoPostCreator) UploadTestFile

func (cfg *AutoPostCreator) UploadTestFile() ([]string, error)

type AutoTeamCreator

type AutoTeamCreator struct {
	Fuzzy         bool
	NameLength    utils.Range
	NameCharset   string
	DomainLength  utils.Range
	DomainCharset string
	EmailLength   utils.Range
	EmailCharset  string
	// contains filtered or unexported fields
}

func NewAutoTeamCreator

func NewAutoTeamCreator(client *model.Client4) *AutoTeamCreator

func (*AutoTeamCreator) CreateTestTeams

func (cfg *AutoTeamCreator) CreateTestTeams(num utils.Range) ([]*model.Team, error)

type AutoUserCreator

type AutoUserCreator struct {
	EmailLength  utils.Range
	EmailCharset string
	NameLength   utils.Range
	NameCharset  string
	Fuzzy        bool
	// contains filtered or unexported fields
}

func NewAutoUserCreator

func NewAutoUserCreator(a *app.App, client *model.Client4, team *model.Team) *AutoUserCreator

func (*AutoUserCreator) CreateTestUsers

func (cfg *AutoUserCreator) CreateTestUsers(num utils.Range) ([]*model.User, error)

type AwayProvider

type AwayProvider struct {
}

func (*AwayProvider) DoCommand

func (me *AwayProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*AwayProvider) GetCommand

func (me *AwayProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*AwayProvider) GetTrigger

func (me *AwayProvider) GetTrigger() string

type CodeProvider

type CodeProvider struct {
}

func (*CodeProvider) DoCommand

func (me *CodeProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*CodeProvider) GetCommand

func (me *CodeProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*CodeProvider) GetTrigger

func (me *CodeProvider) GetTrigger() string

type CollapseProvider

type CollapseProvider struct {
}

func (*CollapseProvider) DoCommand

func (me *CollapseProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*CollapseProvider) GetCommand

func (me *CollapseProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*CollapseProvider) GetTrigger

func (me *CollapseProvider) GetTrigger() string

type DndProvider

type DndProvider struct {
}

func (*DndProvider) DoCommand

func (me *DndProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*DndProvider) GetCommand

func (me *DndProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*DndProvider) GetTrigger

func (me *DndProvider) GetTrigger() string

type EchoProvider

type EchoProvider struct {
}

func (*EchoProvider) DoCommand

func (me *EchoProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*EchoProvider) GetCommand

func (me *EchoProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*EchoProvider) GetTrigger

func (me *EchoProvider) GetTrigger() string

type ExpandProvider

type ExpandProvider struct {
}

func (*ExpandProvider) DoCommand

func (me *ExpandProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*ExpandProvider) GetCommand

func (me *ExpandProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*ExpandProvider) GetTrigger

func (me *ExpandProvider) GetTrigger() string

type HeaderProvider

type HeaderProvider struct {
}

func (*HeaderProvider) DoCommand

func (me *HeaderProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*HeaderProvider) GetCommand

func (me *HeaderProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*HeaderProvider) GetTrigger

func (me *HeaderProvider) GetTrigger() string

type HelpProvider

type HelpProvider struct {
}

func (*HelpProvider) DoCommand

func (h *HelpProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*HelpProvider) GetCommand

func (h *HelpProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*HelpProvider) GetTrigger

func (h *HelpProvider) GetTrigger() string

type InvitePeopleProvider

type InvitePeopleProvider struct {
}

func (*InvitePeopleProvider) DoCommand

func (me *InvitePeopleProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*InvitePeopleProvider) GetCommand

func (me *InvitePeopleProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*InvitePeopleProvider) GetTrigger

func (me *InvitePeopleProvider) GetTrigger() string

type InviteProvider

type InviteProvider struct {
}

func (*InviteProvider) DoCommand

func (me *InviteProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*InviteProvider) GetCommand

func (me *InviteProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*InviteProvider) GetTrigger

func (me *InviteProvider) GetTrigger() string

type JoinProvider

type JoinProvider struct {
}

func (*JoinProvider) DoCommand

func (me *JoinProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*JoinProvider) GetCommand

func (me *JoinProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*JoinProvider) GetTrigger

func (me *JoinProvider) GetTrigger() string

type KickProvider

type KickProvider struct {
}

func (*KickProvider) DoCommand

func (me *KickProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*KickProvider) GetCommand

func (me *KickProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*KickProvider) GetTrigger

func (me *KickProvider) GetTrigger() string

type LeaveProvider

type LeaveProvider struct {
}

func (*LeaveProvider) DoCommand

func (me *LeaveProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LeaveProvider) GetCommand

func (me *LeaveProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*LeaveProvider) GetTrigger

func (me *LeaveProvider) GetTrigger() string

type LoadTestProvider

type LoadTestProvider struct {
}

func (*LoadTestProvider) ActivateUserCommand

func (me *LoadTestProvider) ActivateUserCommand(a *app.App, args *model.CommandArgs, message string) (*model.CommandResponse, error)

func (*LoadTestProvider) ChannelsCommand

func (me *LoadTestProvider) ChannelsCommand(a *app.App, args *model.CommandArgs, message string) (*model.CommandResponse, error)

func (*LoadTestProvider) DeActivateUserCommand

func (me *LoadTestProvider) DeActivateUserCommand(a *app.App, args *model.CommandArgs, message string) (*model.CommandResponse, error)

func (*LoadTestProvider) DoCommand

func (me *LoadTestProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) GetCommand

func (me *LoadTestProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*LoadTestProvider) GetTrigger

func (me *LoadTestProvider) GetTrigger() string

func (*LoadTestProvider) HelpCommand

func (me *LoadTestProvider) HelpCommand(args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) JsonCommand

func (me *LoadTestProvider) JsonCommand(a *app.App, args *model.CommandArgs, message string) (*model.CommandResponse, error)

func (*LoadTestProvider) PostCommand

func (me *LoadTestProvider) PostCommand(a *app.App, args *model.CommandArgs, message string) (*model.CommandResponse, error)

func (*LoadTestProvider) PostsCommand

func (me *LoadTestProvider) PostsCommand(a *app.App, args *model.CommandArgs, message string) (*model.CommandResponse, error)

func (*LoadTestProvider) SetupCommand

func (me *LoadTestProvider) SetupCommand(a *app.App, args *model.CommandArgs, message string) (*model.CommandResponse, error)

func (*LoadTestProvider) ThreadedPostCommand

func (me *LoadTestProvider) ThreadedPostCommand(a *app.App, args *model.CommandArgs, message string) (*model.CommandResponse, error)

func (*LoadTestProvider) UrlCommand

func (me *LoadTestProvider) UrlCommand(a *app.App, args *model.CommandArgs, message string) (*model.CommandResponse, error)

func (*LoadTestProvider) UsersCommand

func (me *LoadTestProvider) UsersCommand(a *app.App, args *model.CommandArgs, message string) (*model.CommandResponse, error)

type LogoutProvider

type LogoutProvider struct {
}

func (*LogoutProvider) DoCommand

func (me *LogoutProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LogoutProvider) GetCommand

func (me *LogoutProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*LogoutProvider) GetTrigger

func (me *LogoutProvider) GetTrigger() string

type MeProvider

type MeProvider struct {
}

func (*MeProvider) DoCommand

func (me *MeProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*MeProvider) GetCommand

func (me *MeProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*MeProvider) GetTrigger

func (me *MeProvider) GetTrigger() string

type MuteProvider

type MuteProvider struct {
}

func (*MuteProvider) DoCommand

func (me *MuteProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*MuteProvider) GetCommand

func (me *MuteProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*MuteProvider) GetTrigger

func (me *MuteProvider) GetTrigger() string

type OfflineProvider

type OfflineProvider struct {
}

func (*OfflineProvider) DoCommand

func (me *OfflineProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*OfflineProvider) GetCommand

func (me *OfflineProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*OfflineProvider) GetTrigger

func (me *OfflineProvider) GetTrigger() string

type OnlineProvider

type OnlineProvider struct {
}

func (*OnlineProvider) DoCommand

func (me *OnlineProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*OnlineProvider) GetCommand

func (me *OnlineProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*OnlineProvider) GetTrigger

func (me *OnlineProvider) GetTrigger() string

type OpenProvider

type OpenProvider struct {
	JoinProvider
}

func (*OpenProvider) GetCommand

func (open *OpenProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*OpenProvider) GetTrigger

func (open *OpenProvider) GetTrigger() string

type PurposeProvider

type PurposeProvider struct {
}

func (*PurposeProvider) DoCommand

func (me *PurposeProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*PurposeProvider) GetCommand

func (me *PurposeProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*PurposeProvider) GetTrigger

func (me *PurposeProvider) GetTrigger() string

type RemoveProvider

type RemoveProvider struct {
}

func (*RemoveProvider) DoCommand

func (me *RemoveProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*RemoveProvider) GetCommand

func (me *RemoveProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*RemoveProvider) GetTrigger

func (me *RemoveProvider) GetTrigger() string

type RenameProvider

type RenameProvider struct {
}

func (*RenameProvider) DoCommand

func (me *RenameProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*RenameProvider) GetCommand

func (me *RenameProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*RenameProvider) GetTrigger

func (me *RenameProvider) GetTrigger() string

type SearchProvider

type SearchProvider struct {
}

func (*SearchProvider) DoCommand

func (search *SearchProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*SearchProvider) GetCommand

func (search *SearchProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*SearchProvider) GetTrigger

func (search *SearchProvider) GetTrigger() string

type SettingsProvider

type SettingsProvider struct {
}

func (*SettingsProvider) DoCommand

func (settings *SettingsProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*SettingsProvider) GetCommand

func (settings *SettingsProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*SettingsProvider) GetTrigger

func (settings *SettingsProvider) GetTrigger() string

type ShortcutsProvider

type ShortcutsProvider struct {
}

func (*ShortcutsProvider) DoCommand

func (me *ShortcutsProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*ShortcutsProvider) GetCommand

func (me *ShortcutsProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*ShortcutsProvider) GetTrigger

func (me *ShortcutsProvider) GetTrigger() string

type ShrugProvider

type ShrugProvider struct {
}

func (*ShrugProvider) DoCommand

func (me *ShrugProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse

func (*ShrugProvider) GetCommand

func (me *ShrugProvider) GetCommand(a *app.App, T goi18n.TranslateFunc) *model.Command

func (*ShrugProvider) GetTrigger

func (me *ShrugProvider) GetTrigger() string

type TeamEnvironment

type TeamEnvironment struct {
	Users    []*model.User
	Channels []*model.Channel
}

func CreateTestEnvironmentInTeam

func CreateTestEnvironmentInTeam(a *app.App, client *model.Client4, team *model.Team, rangeChannels utils.Range, rangeUsers utils.Range, rangePosts utils.Range, fuzzy bool) (TeamEnvironment, error)

type TestEnvironment

type TestEnvironment struct {
	Teams        []*model.Team
	Environments []TeamEnvironment
}

func CreateTestEnvironmentWithTeams

func CreateTestEnvironmentWithTeams(a *app.App, client *model.Client4, rangeTeams utils.Range, rangeChannels utils.Range, rangeUsers utils.Range, rangePosts utils.Range, fuzzy bool) (TestEnvironment, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL