Documentation
¶
Index ¶
- type ConfigAssetsFunc
- type ConfigAssetsFuncCall
- type ConfigDumpFunc
- func (f *ConfigDumpFunc) History() []ConfigDumpFuncCall
- func (f *ConfigDumpFunc) PushHook(hook func() map[string]string)
- func (f *ConfigDumpFunc) PushReturn(r0 map[string]string)
- func (f *ConfigDumpFunc) SetDefaultHook(hook func() map[string]string)
- func (f *ConfigDumpFunc) SetDefaultReturn(r0 map[string]string)
- type ConfigDumpFuncCall
- type ConfigInitFunc
- type ConfigInitFuncCall
- type ConfigLoadFunc
- func (f *ConfigLoadFunc) History() []ConfigLoadFuncCall
- func (f *ConfigLoadFunc) PushHook(hook func(interface{}, ...config.TagModifier) error)
- func (f *ConfigLoadFunc) PushReturn(r0 error)
- func (f *ConfigLoadFunc) SetDefaultHook(hook func(interface{}, ...config.TagModifier) error)
- func (f *ConfigLoadFunc) SetDefaultReturn(r0 error)
- type ConfigLoadFuncCall
- type ConfigMustLoadFunc
- func (f *ConfigMustLoadFunc) History() []ConfigMustLoadFuncCall
- func (f *ConfigMustLoadFunc) PushHook(hook func(interface{}, ...config.TagModifier))
- func (f *ConfigMustLoadFunc) PushReturn()
- func (f *ConfigMustLoadFunc) SetDefaultHook(hook func(interface{}, ...config.TagModifier))
- func (f *ConfigMustLoadFunc) SetDefaultReturn()
- type ConfigMustLoadFuncCall
- type LoggerPrintfFunc
- type LoggerPrintfFuncCall
- type MockConfig
- type MockLogger
- type MockSourcer
- type MockTagModifier
- type SourcerAssetsFunc
- type SourcerAssetsFuncCall
- type SourcerDumpFunc
- func (f *SourcerDumpFunc) History() []SourcerDumpFuncCall
- func (f *SourcerDumpFunc) PushHook(hook func() map[string]string)
- func (f *SourcerDumpFunc) PushReturn(r0 map[string]string)
- func (f *SourcerDumpFunc) SetDefaultHook(hook func() map[string]string)
- func (f *SourcerDumpFunc) SetDefaultReturn(r0 map[string]string)
- type SourcerDumpFuncCall
- type SourcerGetFunc
- func (f *SourcerGetFunc) History() []SourcerGetFuncCall
- func (f *SourcerGetFunc) PushHook(hook func([]string) (string, config.SourcerFlag, error))
- func (f *SourcerGetFunc) PushReturn(r0 string, r1 config.SourcerFlag, r2 error)
- func (f *SourcerGetFunc) SetDefaultHook(hook func([]string) (string, config.SourcerFlag, error))
- func (f *SourcerGetFunc) SetDefaultReturn(r0 string, r1 config.SourcerFlag, r2 error)
- type SourcerGetFuncCall
- type SourcerInitFunc
- type SourcerInitFuncCall
- type SourcerTagsFunc
- type SourcerTagsFuncCall
- type TagModifierAlterFieldTagFunc
- func (f *TagModifierAlterFieldTagFunc) History() []TagModifierAlterFieldTagFuncCall
- func (f *TagModifierAlterFieldTagFunc) PushHook(hook func(reflect.StructField, *structtag.Tags) error)
- func (f *TagModifierAlterFieldTagFunc) PushReturn(r0 error)
- func (f *TagModifierAlterFieldTagFunc) SetDefaultHook(hook func(reflect.StructField, *structtag.Tags) error)
- func (f *TagModifierAlterFieldTagFunc) SetDefaultReturn(r0 error)
- type TagModifierAlterFieldTagFuncCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigAssetsFunc ¶
type ConfigAssetsFunc struct {
// contains filtered or unexported fields
}
ConfigAssetsFunc describes the behavior when the Assets method of the parent MockConfig instance is invoked.
func (*ConfigAssetsFunc) History ¶
func (f *ConfigAssetsFunc) History() []ConfigAssetsFuncCall
History returns a sequence of ConfigAssetsFuncCall objects describing the invocations of this function.
func (*ConfigAssetsFunc) PushHook ¶
func (f *ConfigAssetsFunc) PushHook(hook func() []string)
PushHook adds a function to the end of hook queue. Each invocation of the Assets method of the parent MockConfig instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*ConfigAssetsFunc) PushReturn ¶
func (f *ConfigAssetsFunc) PushReturn(r0 []string)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*ConfigAssetsFunc) SetDefaultHook ¶
func (f *ConfigAssetsFunc) SetDefaultHook(hook func() []string)
SetDefaultHook sets function that is called when the Assets method of the parent MockConfig instance is invoked and the hook queue is empty.
func (*ConfigAssetsFunc) SetDefaultReturn ¶
func (f *ConfigAssetsFunc) SetDefaultReturn(r0 []string)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type ConfigAssetsFuncCall ¶
type ConfigAssetsFuncCall struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 []string }
ConfigAssetsFuncCall is an object that describes an invocation of method Assets on an instance of MockConfig.
func (ConfigAssetsFuncCall) Args ¶
func (c ConfigAssetsFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (ConfigAssetsFuncCall) Results ¶
func (c ConfigAssetsFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type ConfigDumpFunc ¶
type ConfigDumpFunc struct {
// contains filtered or unexported fields
}
ConfigDumpFunc describes the behavior when the Dump method of the parent MockConfig instance is invoked.
func (*ConfigDumpFunc) History ¶
func (f *ConfigDumpFunc) History() []ConfigDumpFuncCall
History returns a sequence of ConfigDumpFuncCall objects describing the invocations of this function.
func (*ConfigDumpFunc) PushHook ¶
func (f *ConfigDumpFunc) PushHook(hook func() map[string]string)
PushHook adds a function to the end of hook queue. Each invocation of the Dump method of the parent MockConfig instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*ConfigDumpFunc) PushReturn ¶
func (f *ConfigDumpFunc) PushReturn(r0 map[string]string)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*ConfigDumpFunc) SetDefaultHook ¶
func (f *ConfigDumpFunc) SetDefaultHook(hook func() map[string]string)
SetDefaultHook sets function that is called when the Dump method of the parent MockConfig instance is invoked and the hook queue is empty.
func (*ConfigDumpFunc) SetDefaultReturn ¶
func (f *ConfigDumpFunc) SetDefaultReturn(r0 map[string]string)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type ConfigDumpFuncCall ¶
type ConfigDumpFuncCall struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 map[string]string }
ConfigDumpFuncCall is an object that describes an invocation of method Dump on an instance of MockConfig.
func (ConfigDumpFuncCall) Args ¶
func (c ConfigDumpFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (ConfigDumpFuncCall) Results ¶
func (c ConfigDumpFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type ConfigInitFunc ¶ added in v1.2.0
type ConfigInitFunc struct {
// contains filtered or unexported fields
}
ConfigInitFunc describes the behavior when the Init method of the parent MockConfig instance is invoked.
func (*ConfigInitFunc) History ¶ added in v1.2.0
func (f *ConfigInitFunc) History() []ConfigInitFuncCall
History returns a sequence of ConfigInitFuncCall objects describing the invocations of this function.
func (*ConfigInitFunc) PushHook ¶ added in v1.2.0
func (f *ConfigInitFunc) PushHook(hook func() error)
PushHook adds a function to the end of hook queue. Each invocation of the Init method of the parent MockConfig instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*ConfigInitFunc) PushReturn ¶ added in v1.2.0
func (f *ConfigInitFunc) PushReturn(r0 error)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*ConfigInitFunc) SetDefaultHook ¶ added in v1.2.0
func (f *ConfigInitFunc) SetDefaultHook(hook func() error)
SetDefaultHook sets function that is called when the Init method of the parent MockConfig instance is invoked and the hook queue is empty.
func (*ConfigInitFunc) SetDefaultReturn ¶ added in v1.2.0
func (f *ConfigInitFunc) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type ConfigInitFuncCall ¶ added in v1.2.0
type ConfigInitFuncCall struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
ConfigInitFuncCall is an object that describes an invocation of method Init on an instance of MockConfig.
func (ConfigInitFuncCall) Args ¶ added in v1.2.0
func (c ConfigInitFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (ConfigInitFuncCall) Results ¶ added in v1.2.0
func (c ConfigInitFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type ConfigLoadFunc ¶
type ConfigLoadFunc struct {
// contains filtered or unexported fields
}
ConfigLoadFunc describes the behavior when the Load method of the parent MockConfig instance is invoked.
func (*ConfigLoadFunc) History ¶
func (f *ConfigLoadFunc) History() []ConfigLoadFuncCall
History returns a sequence of ConfigLoadFuncCall objects describing the invocations of this function.
func (*ConfigLoadFunc) PushHook ¶
func (f *ConfigLoadFunc) PushHook(hook func(interface{}, ...config.TagModifier) error)
PushHook adds a function to the end of hook queue. Each invocation of the Load method of the parent MockConfig instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*ConfigLoadFunc) PushReturn ¶
func (f *ConfigLoadFunc) PushReturn(r0 error)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*ConfigLoadFunc) SetDefaultHook ¶
func (f *ConfigLoadFunc) SetDefaultHook(hook func(interface{}, ...config.TagModifier) error)
SetDefaultHook sets function that is called when the Load method of the parent MockConfig instance is invoked and the hook queue is empty.
func (*ConfigLoadFunc) SetDefaultReturn ¶
func (f *ConfigLoadFunc) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type ConfigLoadFuncCall ¶
type ConfigLoadFuncCall struct { // Arg0 is the value of the 1st argument passed to this method // invocation. Arg0 interface{} // Arg1 is a slice containing the values of the variadic arguments // passed to this method invocation. Arg1 []config.TagModifier // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
ConfigLoadFuncCall is an object that describes an invocation of method Load on an instance of MockConfig.
func (ConfigLoadFuncCall) Args ¶
func (c ConfigLoadFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation. The variadic slice argument is flattened in this array such that one positional argument and three variadic arguments would result in a slice of four, not two.
func (ConfigLoadFuncCall) Results ¶
func (c ConfigLoadFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type ConfigMustLoadFunc ¶
type ConfigMustLoadFunc struct {
// contains filtered or unexported fields
}
ConfigMustLoadFunc describes the behavior when the MustLoad method of the parent MockConfig instance is invoked.
func (*ConfigMustLoadFunc) History ¶
func (f *ConfigMustLoadFunc) History() []ConfigMustLoadFuncCall
History returns a sequence of ConfigMustLoadFuncCall objects describing the invocations of this function.
func (*ConfigMustLoadFunc) PushHook ¶
func (f *ConfigMustLoadFunc) PushHook(hook func(interface{}, ...config.TagModifier))
PushHook adds a function to the end of hook queue. Each invocation of the MustLoad method of the parent MockConfig instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*ConfigMustLoadFunc) PushReturn ¶
func (f *ConfigMustLoadFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*ConfigMustLoadFunc) SetDefaultHook ¶
func (f *ConfigMustLoadFunc) SetDefaultHook(hook func(interface{}, ...config.TagModifier))
SetDefaultHook sets function that is called when the MustLoad method of the parent MockConfig instance is invoked and the hook queue is empty.
func (*ConfigMustLoadFunc) SetDefaultReturn ¶
func (f *ConfigMustLoadFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type ConfigMustLoadFuncCall ¶
type ConfigMustLoadFuncCall struct { // Arg0 is the value of the 1st argument passed to this method // invocation. Arg0 interface{} // Arg1 is a slice containing the values of the variadic arguments // passed to this method invocation. Arg1 []config.TagModifier }
ConfigMustLoadFuncCall is an object that describes an invocation of method MustLoad on an instance of MockConfig.
func (ConfigMustLoadFuncCall) Args ¶
func (c ConfigMustLoadFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation. The variadic slice argument is flattened in this array such that one positional argument and three variadic arguments would result in a slice of four, not two.
func (ConfigMustLoadFuncCall) Results ¶
func (c ConfigMustLoadFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerPrintfFunc ¶
type LoggerPrintfFunc struct {
// contains filtered or unexported fields
}
LoggerPrintfFunc describes the behavior when the Printf method of the parent MockLogger instance is invoked.
func (*LoggerPrintfFunc) History ¶
func (f *LoggerPrintfFunc) History() []LoggerPrintfFuncCall
History returns a sequence of LoggerPrintfFuncCall objects describing the invocations of this function.
func (*LoggerPrintfFunc) PushHook ¶
func (f *LoggerPrintfFunc) PushHook(hook func(string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the Printf method of the parent MockLogger instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*LoggerPrintfFunc) PushReturn ¶
func (f *LoggerPrintfFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerPrintfFunc) SetDefaultHook ¶
func (f *LoggerPrintfFunc) SetDefaultHook(hook func(string, ...interface{}))
SetDefaultHook sets function that is called when the Printf method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerPrintfFunc) SetDefaultReturn ¶
func (f *LoggerPrintfFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerPrintfFuncCall ¶
type LoggerPrintfFuncCall struct { // Arg0 is the value of the 1st argument passed to this method // invocation. Arg0 string // Arg1 is a slice containing the values of the variadic arguments // passed to this method invocation. Arg1 []interface{} }
LoggerPrintfFuncCall is an object that describes an invocation of method Printf on an instance of MockLogger.
func (LoggerPrintfFuncCall) Args ¶
func (c LoggerPrintfFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation. The variadic slice argument is flattened in this array such that one positional argument and three variadic arguments would result in a slice of four, not two.
func (LoggerPrintfFuncCall) Results ¶
func (c LoggerPrintfFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type MockConfig ¶
type MockConfig struct { // AssetsFunc is an instance of a mock function object controlling the // behavior of the method Assets. AssetsFunc *ConfigAssetsFunc // DumpFunc is an instance of a mock function object controlling the // behavior of the method Dump. DumpFunc *ConfigDumpFunc // InitFunc is an instance of a mock function object controlling the // behavior of the method Init. InitFunc *ConfigInitFunc // LoadFunc is an instance of a mock function object controlling the // behavior of the method Load. LoadFunc *ConfigLoadFunc // MustLoadFunc is an instance of a mock function object controlling the // behavior of the method MustLoad. MustLoadFunc *ConfigMustLoadFunc }
MockConfig is a mock implementation of the Config interface (from the package github.com/go-nacelle/config) used for unit testing.
func NewMockConfig ¶
func NewMockConfig() *MockConfig
NewMockConfig creates a new mock of the Config interface. All methods return zero values for all results, unless overwritten.
func NewMockConfigFrom ¶
func NewMockConfigFrom(i config.Config) *MockConfig
NewMockConfigFrom creates a new mock of the MockConfig interface. All methods delegate to the given implementation, unless overwritten.
func (*MockConfig) Assets ¶
func (m *MockConfig) Assets() []string
Assets delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockConfig) Dump ¶
func (m *MockConfig) Dump() map[string]string
Dump delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockConfig) Init ¶ added in v1.2.0
func (m *MockConfig) Init() error
Init delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockConfig) Load ¶
func (m *MockConfig) Load(v0 interface{}, v1 ...config.TagModifier) error
Load delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockConfig) MustLoad ¶
func (m *MockConfig) MustLoad(v0 interface{}, v1 ...config.TagModifier)
MustLoad delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
type MockLogger ¶
type MockLogger struct { // PrintfFunc is an instance of a mock function object controlling the // behavior of the method Printf. PrintfFunc *LoggerPrintfFunc }
MockLogger is a mock implementation of the Logger interface (from the package github.com/go-nacelle/config) used for unit testing.
func NewMockLogger ¶
func NewMockLogger() *MockLogger
NewMockLogger creates a new mock of the Logger interface. All methods return zero values for all results, unless overwritten.
func NewMockLoggerFrom ¶
func NewMockLoggerFrom(i config.Logger) *MockLogger
NewMockLoggerFrom creates a new mock of the MockLogger interface. All methods delegate to the given implementation, unless overwritten.
func (*MockLogger) Printf ¶
func (m *MockLogger) Printf(v0 string, v1 ...interface{})
Printf delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
type MockSourcer ¶
type MockSourcer struct { // AssetsFunc is an instance of a mock function object controlling the // behavior of the method Assets. AssetsFunc *SourcerAssetsFunc // DumpFunc is an instance of a mock function object controlling the // behavior of the method Dump. DumpFunc *SourcerDumpFunc // GetFunc is an instance of a mock function object controlling the // behavior of the method Get. GetFunc *SourcerGetFunc // InitFunc is an instance of a mock function object controlling the // behavior of the method Init. InitFunc *SourcerInitFunc // TagsFunc is an instance of a mock function object controlling the // behavior of the method Tags. TagsFunc *SourcerTagsFunc }
MockSourcer is a mock implementation of the Sourcer interface (from the package github.com/go-nacelle/config) used for unit testing.
func NewMockSourcer ¶
func NewMockSourcer() *MockSourcer
NewMockSourcer creates a new mock of the Sourcer interface. All methods return zero values for all results, unless overwritten.
func NewMockSourcerFrom ¶
func NewMockSourcerFrom(i config.Sourcer) *MockSourcer
NewMockSourcerFrom creates a new mock of the MockSourcer interface. All methods delegate to the given implementation, unless overwritten.
func (*MockSourcer) Assets ¶
func (m *MockSourcer) Assets() []string
Assets delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockSourcer) Dump ¶
func (m *MockSourcer) Dump() map[string]string
Dump delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockSourcer) Get ¶
func (m *MockSourcer) Get(v0 []string) (string, config.SourcerFlag, error)
Get delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockSourcer) Init ¶ added in v1.2.0
func (m *MockSourcer) Init() error
Init delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockSourcer) Tags ¶
func (m *MockSourcer) Tags() []string
Tags delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
type MockTagModifier ¶
type MockTagModifier struct { // AlterFieldTagFunc is an instance of a mock function object // controlling the behavior of the method AlterFieldTag. AlterFieldTagFunc *TagModifierAlterFieldTagFunc }
MockTagModifier is a mock implementation of the TagModifier interface (from the package github.com/go-nacelle/config) used for unit testing.
func NewMockTagModifier ¶
func NewMockTagModifier() *MockTagModifier
NewMockTagModifier creates a new mock of the TagModifier interface. All methods return zero values for all results, unless overwritten.
func NewMockTagModifierFrom ¶
func NewMockTagModifierFrom(i config.TagModifier) *MockTagModifier
NewMockTagModifierFrom creates a new mock of the MockTagModifier interface. All methods delegate to the given implementation, unless overwritten.
func (*MockTagModifier) AlterFieldTag ¶
func (m *MockTagModifier) AlterFieldTag(v0 reflect.StructField, v1 *structtag.Tags) error
AlterFieldTag delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
type SourcerAssetsFunc ¶
type SourcerAssetsFunc struct {
// contains filtered or unexported fields
}
SourcerAssetsFunc describes the behavior when the Assets method of the parent MockSourcer instance is invoked.
func (*SourcerAssetsFunc) History ¶
func (f *SourcerAssetsFunc) History() []SourcerAssetsFuncCall
History returns a sequence of SourcerAssetsFuncCall objects describing the invocations of this function.
func (*SourcerAssetsFunc) PushHook ¶
func (f *SourcerAssetsFunc) PushHook(hook func() []string)
PushHook adds a function to the end of hook queue. Each invocation of the Assets method of the parent MockSourcer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*SourcerAssetsFunc) PushReturn ¶
func (f *SourcerAssetsFunc) PushReturn(r0 []string)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*SourcerAssetsFunc) SetDefaultHook ¶
func (f *SourcerAssetsFunc) SetDefaultHook(hook func() []string)
SetDefaultHook sets function that is called when the Assets method of the parent MockSourcer instance is invoked and the hook queue is empty.
func (*SourcerAssetsFunc) SetDefaultReturn ¶
func (f *SourcerAssetsFunc) SetDefaultReturn(r0 []string)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type SourcerAssetsFuncCall ¶
type SourcerAssetsFuncCall struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 []string }
SourcerAssetsFuncCall is an object that describes an invocation of method Assets on an instance of MockSourcer.
func (SourcerAssetsFuncCall) Args ¶
func (c SourcerAssetsFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (SourcerAssetsFuncCall) Results ¶
func (c SourcerAssetsFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type SourcerDumpFunc ¶
type SourcerDumpFunc struct {
// contains filtered or unexported fields
}
SourcerDumpFunc describes the behavior when the Dump method of the parent MockSourcer instance is invoked.
func (*SourcerDumpFunc) History ¶
func (f *SourcerDumpFunc) History() []SourcerDumpFuncCall
History returns a sequence of SourcerDumpFuncCall objects describing the invocations of this function.
func (*SourcerDumpFunc) PushHook ¶
func (f *SourcerDumpFunc) PushHook(hook func() map[string]string)
PushHook adds a function to the end of hook queue. Each invocation of the Dump method of the parent MockSourcer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*SourcerDumpFunc) PushReturn ¶
func (f *SourcerDumpFunc) PushReturn(r0 map[string]string)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*SourcerDumpFunc) SetDefaultHook ¶
func (f *SourcerDumpFunc) SetDefaultHook(hook func() map[string]string)
SetDefaultHook sets function that is called when the Dump method of the parent MockSourcer instance is invoked and the hook queue is empty.
func (*SourcerDumpFunc) SetDefaultReturn ¶
func (f *SourcerDumpFunc) SetDefaultReturn(r0 map[string]string)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type SourcerDumpFuncCall ¶
type SourcerDumpFuncCall struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 map[string]string }
SourcerDumpFuncCall is an object that describes an invocation of method Dump on an instance of MockSourcer.
func (SourcerDumpFuncCall) Args ¶
func (c SourcerDumpFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (SourcerDumpFuncCall) Results ¶
func (c SourcerDumpFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type SourcerGetFunc ¶
type SourcerGetFunc struct {
// contains filtered or unexported fields
}
SourcerGetFunc describes the behavior when the Get method of the parent MockSourcer instance is invoked.
func (*SourcerGetFunc) History ¶
func (f *SourcerGetFunc) History() []SourcerGetFuncCall
History returns a sequence of SourcerGetFuncCall objects describing the invocations of this function.
func (*SourcerGetFunc) PushHook ¶
func (f *SourcerGetFunc) PushHook(hook func([]string) (string, config.SourcerFlag, error))
PushHook adds a function to the end of hook queue. Each invocation of the Get method of the parent MockSourcer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*SourcerGetFunc) PushReturn ¶
func (f *SourcerGetFunc) PushReturn(r0 string, r1 config.SourcerFlag, r2 error)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*SourcerGetFunc) SetDefaultHook ¶
func (f *SourcerGetFunc) SetDefaultHook(hook func([]string) (string, config.SourcerFlag, error))
SetDefaultHook sets function that is called when the Get method of the parent MockSourcer instance is invoked and the hook queue is empty.
func (*SourcerGetFunc) SetDefaultReturn ¶
func (f *SourcerGetFunc) SetDefaultReturn(r0 string, r1 config.SourcerFlag, r2 error)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type SourcerGetFuncCall ¶
type SourcerGetFuncCall struct { // Arg0 is the value of the 1st argument passed to this method // invocation. Arg0 []string // Result0 is the value of the 1st result returned from this method // invocation. Result0 string // Result1 is the value of the 2nd result returned from this method // invocation. Result1 config.SourcerFlag // Result2 is the value of the 3rd result returned from this method // invocation. Result2 error }
SourcerGetFuncCall is an object that describes an invocation of method Get on an instance of MockSourcer.
func (SourcerGetFuncCall) Args ¶
func (c SourcerGetFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (SourcerGetFuncCall) Results ¶
func (c SourcerGetFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type SourcerInitFunc ¶ added in v1.2.0
type SourcerInitFunc struct {
// contains filtered or unexported fields
}
SourcerInitFunc describes the behavior when the Init method of the parent MockSourcer instance is invoked.
func (*SourcerInitFunc) History ¶ added in v1.2.0
func (f *SourcerInitFunc) History() []SourcerInitFuncCall
History returns a sequence of SourcerInitFuncCall objects describing the invocations of this function.
func (*SourcerInitFunc) PushHook ¶ added in v1.2.0
func (f *SourcerInitFunc) PushHook(hook func() error)
PushHook adds a function to the end of hook queue. Each invocation of the Init method of the parent MockSourcer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*SourcerInitFunc) PushReturn ¶ added in v1.2.0
func (f *SourcerInitFunc) PushReturn(r0 error)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*SourcerInitFunc) SetDefaultHook ¶ added in v1.2.0
func (f *SourcerInitFunc) SetDefaultHook(hook func() error)
SetDefaultHook sets function that is called when the Init method of the parent MockSourcer instance is invoked and the hook queue is empty.
func (*SourcerInitFunc) SetDefaultReturn ¶ added in v1.2.0
func (f *SourcerInitFunc) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type SourcerInitFuncCall ¶ added in v1.2.0
type SourcerInitFuncCall struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
SourcerInitFuncCall is an object that describes an invocation of method Init on an instance of MockSourcer.
func (SourcerInitFuncCall) Args ¶ added in v1.2.0
func (c SourcerInitFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (SourcerInitFuncCall) Results ¶ added in v1.2.0
func (c SourcerInitFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type SourcerTagsFunc ¶
type SourcerTagsFunc struct {
// contains filtered or unexported fields
}
SourcerTagsFunc describes the behavior when the Tags method of the parent MockSourcer instance is invoked.
func (*SourcerTagsFunc) History ¶
func (f *SourcerTagsFunc) History() []SourcerTagsFuncCall
History returns a sequence of SourcerTagsFuncCall objects describing the invocations of this function.
func (*SourcerTagsFunc) PushHook ¶
func (f *SourcerTagsFunc) PushHook(hook func() []string)
PushHook adds a function to the end of hook queue. Each invocation of the Tags method of the parent MockSourcer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*SourcerTagsFunc) PushReturn ¶
func (f *SourcerTagsFunc) PushReturn(r0 []string)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*SourcerTagsFunc) SetDefaultHook ¶
func (f *SourcerTagsFunc) SetDefaultHook(hook func() []string)
SetDefaultHook sets function that is called when the Tags method of the parent MockSourcer instance is invoked and the hook queue is empty.
func (*SourcerTagsFunc) SetDefaultReturn ¶
func (f *SourcerTagsFunc) SetDefaultReturn(r0 []string)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type SourcerTagsFuncCall ¶
type SourcerTagsFuncCall struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 []string }
SourcerTagsFuncCall is an object that describes an invocation of method Tags on an instance of MockSourcer.
func (SourcerTagsFuncCall) Args ¶
func (c SourcerTagsFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (SourcerTagsFuncCall) Results ¶
func (c SourcerTagsFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type TagModifierAlterFieldTagFunc ¶
type TagModifierAlterFieldTagFunc struct {
// contains filtered or unexported fields
}
TagModifierAlterFieldTagFunc describes the behavior when the AlterFieldTag method of the parent MockTagModifier instance is invoked.
func (*TagModifierAlterFieldTagFunc) History ¶
func (f *TagModifierAlterFieldTagFunc) History() []TagModifierAlterFieldTagFuncCall
History returns a sequence of TagModifierAlterFieldTagFuncCall objects describing the invocations of this function.
func (*TagModifierAlterFieldTagFunc) PushHook ¶
func (f *TagModifierAlterFieldTagFunc) PushHook(hook func(reflect.StructField, *structtag.Tags) error)
PushHook adds a function to the end of hook queue. Each invocation of the AlterFieldTag method of the parent MockTagModifier instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*TagModifierAlterFieldTagFunc) PushReturn ¶
func (f *TagModifierAlterFieldTagFunc) PushReturn(r0 error)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*TagModifierAlterFieldTagFunc) SetDefaultHook ¶
func (f *TagModifierAlterFieldTagFunc) SetDefaultHook(hook func(reflect.StructField, *structtag.Tags) error)
SetDefaultHook sets function that is called when the AlterFieldTag method of the parent MockTagModifier instance is invoked and the hook queue is empty.
func (*TagModifierAlterFieldTagFunc) SetDefaultReturn ¶
func (f *TagModifierAlterFieldTagFunc) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type TagModifierAlterFieldTagFuncCall ¶
type TagModifierAlterFieldTagFuncCall struct { // Arg0 is the value of the 1st argument passed to this method // invocation. Arg0 reflect.StructField // Arg1 is the value of the 2nd argument passed to this method // invocation. Arg1 *structtag.Tags // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
TagModifierAlterFieldTagFuncCall is an object that describes an invocation of method AlterFieldTag on an instance of MockTagModifier.
func (TagModifierAlterFieldTagFuncCall) Args ¶
func (c TagModifierAlterFieldTagFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (TagModifierAlterFieldTagFuncCall) Results ¶
func (c TagModifierAlterFieldTagFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.