slashcommands

package
v5.37.10 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: AGPL-3.0, Apache-2.0 Imports: 26 Imported by: 4

Documentation

Index

Constants

View Source
const (
	UserPassword         = "Usr@MMTest123"
	ChannelType          = model.CHANNEL_OPEN
	BTestTeamDisplayName = "TestTeam"
	BTestTeamName        = "z-z-testdomaina"
	BTestTeamEmail       = "test@nowhere.com"
	BTestTeamType        = model.TEAM_OPEN
	BTestUserName        = "Mr. Testing Tester"
	BTestUserEmail       = "success+ttester@simulator.amazonses.com"
	BTestUserPassword    = "passwd"
)
View Source
const (
	CmdCustomStatus      = app.CmdCustomStatusTrigger
	CmdCustomStatusClear = "clear"
)
View Source
const (
	CmdExpand   = "expand"
	CmdCollapse = "collapse"
)
View Source
const (
	CmdRemove = "remove"
	CmdKick   = "kick"
)
View Source
const (
	CommandTriggerShare   = "share-channel"
	AvailableShareActions = "invite, uninvite, unshare, status"
)
View Source
const (
	ActionKey = "-action"
)
View Source
const (
	AvailableRemoteActions = "create, accept, remove, status"
)
View Source
const (
	CmdAway = "away"
)
View Source
const (
	CmdCode = "code"
)
View Source
const (
	CmdDND = "dnd"
)
View Source
const (
	CmdEcho = "echo"
)
View Source
const (
	CmdGroupMsg = "groupmsg"
)
View Source
const (
	CmdHeader = "header"
)
View Source
const (
	CmdHelp = "help"
)
View Source
const (
	CmdInvite = "invite"
)
View Source
const (
	CmdInvite_PEOPLE = "invite_people"
)
View Source
const (
	CmdJoin = "join"
)
View Source
const (
	CmdLeave = "leave"
)
View Source
const (
	CmdLogout = "logout"
)
View Source
const (
	CmdMe = "me"
)
View Source
const (
	CmdMsg = "msg"
)
View Source
const (
	CmdMute = "mute"
)
View Source
const (
	CmdOffline = "offline"
)
View Source
const (
	CmdOnline = "online"
)
View Source
const (
	CmdOpen = "open"
)
View Source
const (
	CmdPurpose = "purpose"
)
View Source
const (
	CmdRename = "rename"
)
View Source
const (
	CmdSearch = "search"
)
View Source
const (
	CmdSettings = "settings"
)
View Source
const (
	CmdShortcuts = "shortcuts"
)
View Source
const (
	CmdShrug = "shrug"
)
View Source
const (
	CmdTest = "test"
)
View Source
const (
	CommandTriggerRemote = "secure-connection"
)

Variables

View Source
var (
	TeamNameLen           = utils.Range{Begin: 10, End: 20}
	TeamDomainNameLen     = utils.Range{Begin: 10, End: 20}
	TeamEmailLen          = utils.Range{Begin: 15, End: 30}
	UserNameLen           = utils.Range{Begin: 5, End: 20}
	UserEmailLen          = utils.Range{Begin: 15, End: 30}
	ChannelDisplayNameLen = utils.Range{Begin: 10, End: 20}
	ChannelNameLen        = utils.Range{Begin: 5, End: 20}
	TestImageFileNames    = []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

func GetCustomStatus added in v5.37.0

func GetCustomStatus(message string) *model.CustomStatus

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(c *request.Context, 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(c *request.Context) (*model.Post, error)

func (*AutoPostCreator) CreateRandomPostNested

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

func (*AutoPostCreator) UploadTestFile

func (cfg *AutoPostCreator) UploadTestFile(c *request.Context) ([]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(c *request.Context, num utils.Range) ([]*model.User, error)

type AwayProvider

type AwayProvider struct {
}

func (*AwayProvider) DoCommand

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

func (*AwayProvider) GetCommand

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

func (*AwayProvider) GetTrigger

func (*AwayProvider) GetTrigger() string

type CodeProvider

type CodeProvider struct {
}

func (*CodeProvider) DoCommand

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

func (*CodeProvider) GetCommand

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

func (*CodeProvider) GetTrigger

func (*CodeProvider) GetTrigger() string

type CollapseProvider

type CollapseProvider struct {
}

func (*CollapseProvider) DoCommand

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

func (*CollapseProvider) GetCommand

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

func (*CollapseProvider) GetTrigger

func (*CollapseProvider) GetTrigger() string

type CustomStatusProvider added in v5.33.0

type CustomStatusProvider struct {
}

func (*CustomStatusProvider) DoCommand added in v5.33.0

func (*CustomStatusProvider) GetCommand added in v5.33.0

func (*CustomStatusProvider) GetTrigger added in v5.33.0

func (*CustomStatusProvider) GetTrigger() string

type DndProvider

type DndProvider struct {
}

func (*DndProvider) DoCommand

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

func (*DndProvider) GetCommand

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

func (*DndProvider) GetTrigger

func (*DndProvider) GetTrigger() string

type EchoProvider

type EchoProvider struct {
}

func (*EchoProvider) DoCommand

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

func (*EchoProvider) GetCommand

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

func (*EchoProvider) GetTrigger

func (*EchoProvider) GetTrigger() string

type ExpandProvider

type ExpandProvider struct {
}

func (*ExpandProvider) DoCommand

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

func (*ExpandProvider) GetCommand

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

func (*ExpandProvider) GetTrigger

func (*ExpandProvider) GetTrigger() string

type HeaderProvider

type HeaderProvider struct {
}

func (*HeaderProvider) DoCommand

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

func (*HeaderProvider) GetCommand

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

func (*HeaderProvider) GetTrigger

func (*HeaderProvider) GetTrigger() string

type HelpProvider

type HelpProvider struct {
}

func (*HelpProvider) DoCommand

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

func (*HelpProvider) GetCommand

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

func (*HelpProvider) GetTrigger

func (h *HelpProvider) GetTrigger() string

type InvitePeopleProvider

type InvitePeopleProvider struct {
}

func (*InvitePeopleProvider) DoCommand

func (*InvitePeopleProvider) GetCommand

func (*InvitePeopleProvider) GetTrigger

func (*InvitePeopleProvider) GetTrigger() string

type InviteProvider

type InviteProvider struct {
}

func (*InviteProvider) DoCommand

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

func (*InviteProvider) GetCommand

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

func (*InviteProvider) GetTrigger

func (*InviteProvider) GetTrigger() string

type JoinProvider

type JoinProvider struct {
}

func (*JoinProvider) DoCommand

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

func (*JoinProvider) GetCommand

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

func (*JoinProvider) GetTrigger

func (*JoinProvider) GetTrigger() string

type KickProvider

type KickProvider struct {
}

func (*KickProvider) DoCommand

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

func (*KickProvider) GetCommand

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

func (*KickProvider) GetTrigger

func (*KickProvider) GetTrigger() string

type LeaveProvider

type LeaveProvider struct {
}

func (*LeaveProvider) DoCommand

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

func (*LeaveProvider) GetCommand

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

func (*LeaveProvider) GetTrigger

func (*LeaveProvider) GetTrigger() string

type LoadTestProvider

type LoadTestProvider struct {
}

func (*LoadTestProvider) ActivateUserCommand

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

func (*LoadTestProvider) ChannelsCommand

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

func (*LoadTestProvider) DeActivateUserCommand

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

func (*LoadTestProvider) DoCommand

func (lt *LoadTestProvider) DoCommand(a *app.App, c *request.Context, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) GetCommand

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

func (*LoadTestProvider) GetTrigger

func (*LoadTestProvider) GetTrigger() string

func (*LoadTestProvider) HelpCommand

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

func (*LoadTestProvider) JsonCommand

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

func (*LoadTestProvider) PostCommand

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

func (*LoadTestProvider) PostsCommand

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

func (*LoadTestProvider) SetupCommand

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

func (*LoadTestProvider) ThreadedPostCommand

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

func (*LoadTestProvider) UrlCommand

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

func (*LoadTestProvider) UsersCommand

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

type LogoutProvider

type LogoutProvider struct {
}

func (*LogoutProvider) DoCommand

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

func (*LogoutProvider) GetCommand

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

func (*LogoutProvider) GetTrigger

func (*LogoutProvider) GetTrigger() string

type MeProvider

type MeProvider struct {
}

func (*MeProvider) DoCommand

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

func (*MeProvider) GetCommand

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

func (*MeProvider) GetTrigger

func (*MeProvider) GetTrigger() string

type MuteProvider

type MuteProvider struct {
}

func (*MuteProvider) DoCommand

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

func (*MuteProvider) GetCommand

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

func (*MuteProvider) GetTrigger

func (*MuteProvider) GetTrigger() string

type OfflineProvider

type OfflineProvider struct {
}

func (*OfflineProvider) DoCommand

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

func (*OfflineProvider) GetCommand

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

func (*OfflineProvider) GetTrigger

func (*OfflineProvider) GetTrigger() string

type OnlineProvider

type OnlineProvider struct {
}

func (*OnlineProvider) DoCommand

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

func (*OnlineProvider) GetCommand

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

func (*OnlineProvider) GetTrigger

func (*OnlineProvider) GetTrigger() string

type OpenProvider

type OpenProvider struct {
	JoinProvider
}

func (*OpenProvider) GetCommand

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

func (*OpenProvider) GetTrigger

func (open *OpenProvider) GetTrigger() string

type PurposeProvider

type PurposeProvider struct {
}

func (*PurposeProvider) DoCommand

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

func (*PurposeProvider) GetCommand

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

func (*PurposeProvider) GetTrigger

func (*PurposeProvider) GetTrigger() string

type RemoteProvider added in v5.35.0

type RemoteProvider struct {
}

func (*RemoteProvider) DoCommand added in v5.35.0

func (rp *RemoteProvider) DoCommand(a *app.App, c *request.Context, args *model.CommandArgs, message string) *model.CommandResponse

func (*RemoteProvider) GetAutoCompleteListItems added in v5.35.0

func (rp *RemoteProvider) GetAutoCompleteListItems(a *app.App, commandArgs *model.CommandArgs, arg *model.AutocompleteArg, parsed, toBeParsed string) ([]model.AutocompleteListItem, error)

func (*RemoteProvider) GetCommand added in v5.35.0

func (rp *RemoteProvider) GetCommand(a *app.App, T i18n.TranslateFunc) *model.Command

func (*RemoteProvider) GetTrigger added in v5.35.0

func (rp *RemoteProvider) GetTrigger() string

type RemoveProvider

type RemoveProvider struct {
}

func (*RemoveProvider) DoCommand

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

func (*RemoveProvider) GetCommand

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

func (*RemoveProvider) GetTrigger

func (*RemoveProvider) GetTrigger() string

type RenameProvider

type RenameProvider struct {
}

func (*RenameProvider) DoCommand

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

func (*RenameProvider) GetCommand

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

func (*RenameProvider) GetTrigger

func (*RenameProvider) GetTrigger() string

type SearchProvider

type SearchProvider struct {
}

func (*SearchProvider) DoCommand

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

func (*SearchProvider) GetCommand

func (search *SearchProvider) GetCommand(a *app.App, T i18n.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, c *request.Context, args *model.CommandArgs, message string) *model.CommandResponse

func (*SettingsProvider) GetCommand

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

func (*SettingsProvider) GetTrigger

func (settings *SettingsProvider) GetTrigger() string

type ShareProvider added in v5.35.0

type ShareProvider struct {
}

func (*ShareProvider) DoCommand added in v5.35.0

func (sp *ShareProvider) DoCommand(a *app.App, c *request.Context, args *model.CommandArgs, message string) *model.CommandResponse

func (*ShareProvider) GetAutoCompleteListItems added in v5.35.0

func (sp *ShareProvider) GetAutoCompleteListItems(a *app.App, commandArgs *model.CommandArgs, arg *model.AutocompleteArg, parsed, toBeParsed string) ([]model.AutocompleteListItem, error)

func (*ShareProvider) GetCommand added in v5.35.0

func (sp *ShareProvider) GetCommand(a *app.App, T i18n.TranslateFunc) *model.Command

func (*ShareProvider) GetTrigger added in v5.35.0

func (sp *ShareProvider) GetTrigger() string

type ShortcutsProvider

type ShortcutsProvider struct {
}

func (*ShortcutsProvider) DoCommand

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

func (*ShortcutsProvider) GetCommand

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

func (*ShortcutsProvider) GetTrigger

func (*ShortcutsProvider) GetTrigger() string

type ShrugProvider

type ShrugProvider struct {
}

func (*ShrugProvider) DoCommand

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

func (*ShrugProvider) GetCommand

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

func (*ShrugProvider) GetTrigger

func (*ShrugProvider) GetTrigger() string

type TeamEnvironment

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

func CreateTestEnvironmentInTeam

func CreateTestEnvironmentInTeam(a *app.App, c *request.Context, 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, c *request.Context, 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