Documentation ¶
Overview ¶
Package mock_commands is a generated GoMock package.
Index ¶
- Constants
- func CleanUrls(input string) string
- func ExtractArtifactsDefinition(defType string, opts CommandOptions) eve.ArtifactDefinitions
- func ExtractBoolOpt(defType string, opts CommandOptions) bool
- func ExtractMetadataField(opts CommandOptions) eve.MetadataField
- func ExtractStringListOpt(defType string, opts CommandOptions) eve.StringList
- func ExtractStringOpt(defType string, opts CommandOptions) string
- type ChatChannelInfoFn
- type ChatInfo
- type CommandOptions
- type EvebotCommand
- func NewAuthCommand(cmdFields []string, channel, user string) EvebotCommand
- func NewDeleteCommand(cmdFields []string, channel, user string) EvebotCommand
- func NewDeployCommand(cmdFields []string, channel, user string) EvebotCommand
- func NewHelpCommand(cmdFields []string, channel, user string) EvebotCommand
- func NewInvalidCommand(cmdFields []string, channel, user string) EvebotCommand
- func NewReleaseCommand(cmdFields []string, channel, user string) EvebotCommand
- func NewRestartCommand(cmdFields []string, channel, user string) EvebotCommand
- func NewRootCmd(cmdFields []string, channel, user string) EvebotCommand
- func NewRunCommand(cmdFields []string, channel, user string) EvebotCommand
- func NewSetCommand(cmdFields []string, channel, user string) EvebotCommand
- func NewShowCommand(cmdFields []string, channel, user string) EvebotCommand
- type Factory
- type InputLengthBounds
- type MockEvebotCommand
- func (m *MockEvebotCommand) AckMsg() (string, bool)
- func (m *MockEvebotCommand) EXPECT() *MockEvebotCommandMockRecorder
- func (m *MockEvebotCommand) Info() ChatInfo
- func (m *MockEvebotCommand) IsAuthenticated(chatUserFn *chatmodels.ChatUser, db *dynamodb.DynamoDB) bool
- func (m *MockEvebotCommand) IsAuthorized(allowedChannel map[string]interface{}, chatChanFn ChatChannelInfoFn) bool
- func (m *MockEvebotCommand) Options() CommandOptions
- type MockEvebotCommandMockRecorder
- func (mr *MockEvebotCommandMockRecorder) AckMsg() *gomock.Call
- func (mr *MockEvebotCommandMockRecorder) Info() *gomock.Call
- func (mr *MockEvebotCommandMockRecorder) IsAuthenticated(chatUserFn, db interface{}) *gomock.Call
- func (mr *MockEvebotCommandMockRecorder) IsAuthorized(allowedChannel, chatChanFn interface{}) *gomock.Call
- func (mr *MockEvebotCommandMockRecorder) Options() *gomock.Call
Constants ¶
const (
// AuthCmdName used as key/id for the auth command
AuthCmdName = "auth"
)
const (
// DeleteCmdName used as key/id for the delete command
DeleteCmdName = "delete"
)
const (
// DeployCmdName is used as key/id for the deploy command
DeployCmdName = "deploy"
)
const (
// ReleaseCmdName is the ID/Key for the ReleaseCmd
ReleaseCmdName = "release"
)
const (
RestartCmdName = "restart"
)
const (
RunCmdName = "run"
)
const (
// SetCmdName id/key
SetCmdName = "set"
)
const (
// ShowCmdName id/key
ShowCmdName = "show"
)
Variables ¶
This section is empty.
Functions ¶
func CleanUrls ¶
CleanUrls cleans the incoming URLs this iterates the incoming command and removes any encoding slack adds to URLs
func ExtractArtifactsDefinition ¶
func ExtractArtifactsDefinition(defType string, opts CommandOptions) eve.ArtifactDefinitions
ExtractArtifactsDefinition extracts the ArtifactDefinitions from the CommandOptions
func ExtractBoolOpt ¶
func ExtractBoolOpt(defType string, opts CommandOptions) bool
ExtractBoolOpt extracts a bool key/val from the opts
func ExtractMetadataField ¶
func ExtractMetadataField(opts CommandOptions) eve.MetadataField
func ExtractStringListOpt ¶
func ExtractStringListOpt(defType string, opts CommandOptions) eve.StringList
ExtractStringListOpt extracts a string slice key value from the options
func ExtractStringOpt ¶
func ExtractStringOpt(defType string, opts CommandOptions) string
ExtractStringOpt extracts a string key/val from the options
Types ¶
type ChatChannelInfoFn ¶
type CommandOptions ¶
type CommandOptions map[string]interface{}
CommandOptions is the dynamic command options that become Key:Value pairs
type EvebotCommand ¶
type EvebotCommand interface { Info() ChatInfo Options() CommandOptions AckMsg() (string, bool) }
EvebotCommand interface (each evebot command needs to implement this interface)
func NewAuthCommand ¶
func NewAuthCommand(cmdFields []string, channel, user string) EvebotCommand
NewAuthCommand creates a New AuthCmd that implements the EvebotCommand interface
func NewDeleteCommand ¶
func NewDeleteCommand(cmdFields []string, channel, user string) EvebotCommand
NewDeleteCommand creates a New DeleteCmd that implements the EvebotCommand interface
func NewDeployCommand ¶
func NewDeployCommand(cmdFields []string, channel, user string) EvebotCommand
NewDeployCommand creates a New DeployCmd that implements the EvebotCommand interface
func NewHelpCommand ¶
func NewHelpCommand(cmdFields []string, channel, user string) EvebotCommand
NewHelpCommand creates a New HelpCmd that implements the EvebotCommand interface
func NewInvalidCommand ¶
func NewInvalidCommand(cmdFields []string, channel, user string) EvebotCommand
NewInvalidCommand creates a New InvalidCmd that implements the EvebotCommand interface
func NewReleaseCommand ¶
func NewReleaseCommand(cmdFields []string, channel, user string) EvebotCommand
NewReleaseCommand creates a New ReleaseCmd that implements the EvebotCommand interface
func NewRestartCommand ¶
func NewRestartCommand(cmdFields []string, channel, user string) EvebotCommand
NewRestartCommand creates a New RestartCmd that implements the EvebotCommand interface
func NewRootCmd ¶
func NewRootCmd(cmdFields []string, channel, user string) EvebotCommand
NewRootCmd creates a New RootCmd that implements the EvebotCommand interface
func NewRunCommand ¶
func NewRunCommand(cmdFields []string, channel, user string) EvebotCommand
NewRunCommand creates a New RunCmd that implements the EvebotCommand interface
func NewSetCommand ¶
func NewSetCommand(cmdFields []string, channel, user string) EvebotCommand
NewSetCommand creates a New SetCmd that implements the EvebotCommand interface
func NewShowCommand ¶
func NewShowCommand(cmdFields []string, channel, user string) EvebotCommand
NewShowCommand creates a New ShowCmd that implements the EvebotCommand interface
type Factory ¶
type Factory interface { Items() map[string]func(cmdFields []string, channel, user string) EvebotCommand NonHelpExamples() help.Examples NonHelpCmds() string }
func NewFactory ¶
func NewFactory() Factory
type InputLengthBounds ¶
type InputLengthBounds struct {
Min, Max int
}
InputLengthBounds structures the Min/Max
func (*InputLengthBounds) Valid ¶
func (ilb *InputLengthBounds) Valid(input []string) bool
Valid verifies that the input meets the minmum/maximum lengths
func (*InputLengthBounds) ValidMax ¶
func (ilb *InputLengthBounds) ValidMax(input []string) bool
ValidMax verifies that the input is less than or equal to the defined Max value
func (*InputLengthBounds) ValidMin ¶
func (ilb *InputLengthBounds) ValidMin(input []string) bool
ValidMin verifies that the input is greater than or equal to the defined Min value
type MockEvebotCommand ¶
type MockEvebotCommand struct {
// contains filtered or unexported fields
}
MockEvebotCommand is a mock of EvebotCommand interface.
func NewMockEvebotCommand ¶
func NewMockEvebotCommand(ctrl *gomock.Controller) *MockEvebotCommand
NewMockEvebotCommand creates a new mock instance.
func (*MockEvebotCommand) AckMsg ¶
func (m *MockEvebotCommand) AckMsg() (string, bool)
AckMsg mocks base method.
func (*MockEvebotCommand) EXPECT ¶
func (m *MockEvebotCommand) EXPECT() *MockEvebotCommandMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEvebotCommand) Info ¶
func (m *MockEvebotCommand) Info() ChatInfo
Info mocks base method.
func (*MockEvebotCommand) IsAuthenticated ¶
func (m *MockEvebotCommand) IsAuthenticated(chatUserFn *chatmodels.ChatUser, db *dynamodb.DynamoDB) bool
IsAuthenticated mocks base method.
func (*MockEvebotCommand) IsAuthorized ¶
func (m *MockEvebotCommand) IsAuthorized(allowedChannel map[string]interface{}, chatChanFn ChatChannelInfoFn) bool
IsAuthorized mocks base method.
func (*MockEvebotCommand) Options ¶
func (m *MockEvebotCommand) Options() CommandOptions
Options mocks base method.
type MockEvebotCommandMockRecorder ¶
type MockEvebotCommandMockRecorder struct {
// contains filtered or unexported fields
}
MockEvebotCommandMockRecorder is the mock recorder for MockEvebotCommand.
func (*MockEvebotCommandMockRecorder) AckMsg ¶
func (mr *MockEvebotCommandMockRecorder) AckMsg() *gomock.Call
AckMsg indicates an expected call of AckMsg.
func (*MockEvebotCommandMockRecorder) Info ¶
func (mr *MockEvebotCommandMockRecorder) Info() *gomock.Call
Info indicates an expected call of Info.
func (*MockEvebotCommandMockRecorder) IsAuthenticated ¶
func (mr *MockEvebotCommandMockRecorder) IsAuthenticated(chatUserFn, db interface{}) *gomock.Call
IsAuthenticated indicates an expected call of IsAuthenticated.
func (*MockEvebotCommandMockRecorder) IsAuthorized ¶
func (mr *MockEvebotCommandMockRecorder) IsAuthorized(allowedChannel, chatChanFn interface{}) *gomock.Call
IsAuthorized indicates an expected call of IsAuthorized.
func (*MockEvebotCommandMockRecorder) Options ¶
func (mr *MockEvebotCommandMockRecorder) Options() *gomock.Call
Options indicates an expected call of Options.