Documentation ¶
Index ¶
- type Loader
- type Loader_Expecter
- type Loader_Load_Call
- type Translator
- func (_m *Translator) Choice(key string, number int, options ...translation.Option) string
- func (_m *Translator) CurrentLocale() string
- func (_m *Translator) EXPECT() *Translator_Expecter
- func (_m *Translator) Get(key string, options ...translation.Option) string
- func (_m *Translator) GetFallback() string
- func (_m *Translator) Has(key string, options ...translation.Option) bool
- func (_m *Translator) SetFallback(locale string) context.Context
- func (_m *Translator) SetLocale(locale string) context.Context
- type Translator_Choice_Call
- func (_c *Translator_Choice_Call) Return(_a0 string) *Translator_Choice_Call
- func (_c *Translator_Choice_Call) Run(run func(key string, number int, options ...translation.Option)) *Translator_Choice_Call
- func (_c *Translator_Choice_Call) RunAndReturn(run func(string, int, ...translation.Option) string) *Translator_Choice_Call
- type Translator_CurrentLocale_Call
- type Translator_Expecter
- func (_e *Translator_Expecter) Choice(key interface{}, number interface{}, options ...interface{}) *Translator_Choice_Call
- func (_e *Translator_Expecter) CurrentLocale() *Translator_CurrentLocale_Call
- func (_e *Translator_Expecter) Get(key interface{}, options ...interface{}) *Translator_Get_Call
- func (_e *Translator_Expecter) GetFallback() *Translator_GetFallback_Call
- func (_e *Translator_Expecter) Has(key interface{}, options ...interface{}) *Translator_Has_Call
- func (_e *Translator_Expecter) SetFallback(locale interface{}) *Translator_SetFallback_Call
- func (_e *Translator_Expecter) SetLocale(locale interface{}) *Translator_SetLocale_Call
- type Translator_GetFallback_Call
- type Translator_Get_Call
- type Translator_Has_Call
- type Translator_SetFallback_Call
- func (_c *Translator_SetFallback_Call) Return(_a0 context.Context) *Translator_SetFallback_Call
- func (_c *Translator_SetFallback_Call) Run(run func(locale string)) *Translator_SetFallback_Call
- func (_c *Translator_SetFallback_Call) RunAndReturn(run func(string) context.Context) *Translator_SetFallback_Call
- type Translator_SetLocale_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
Loader is an autogenerated mock type for the Loader type
func NewLoader ¶
NewLoader creates a new instance of Loader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Loader) EXPECT ¶
func (_m *Loader) EXPECT() *Loader_Expecter
type Loader_Expecter ¶
type Loader_Expecter struct {
// contains filtered or unexported fields
}
func (*Loader_Expecter) Load ¶
func (_e *Loader_Expecter) Load(locale interface{}, group interface{}) *Loader_Load_Call
Load is a helper method to define mock.On call
- locale string
- group string
type Loader_Load_Call ¶
Loader_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load'
func (*Loader_Load_Call) Return ¶
func (_c *Loader_Load_Call) Return(_a0 map[string]interface{}, _a1 error) *Loader_Load_Call
func (*Loader_Load_Call) Run ¶
func (_c *Loader_Load_Call) Run(run func(locale string, group string)) *Loader_Load_Call
func (*Loader_Load_Call) RunAndReturn ¶
func (_c *Loader_Load_Call) RunAndReturn(run func(string, string) (map[string]interface{}, error)) *Loader_Load_Call
type Translator ¶
Translator is an autogenerated mock type for the Translator type
func NewTranslator ¶
func NewTranslator(t interface { mock.TestingT Cleanup(func()) }) *Translator
NewTranslator creates a new instance of Translator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Translator) Choice ¶
func (_m *Translator) Choice(key string, number int, options ...translation.Option) string
Choice provides a mock function with given fields: key, number, options
func (*Translator) CurrentLocale ¶
func (_m *Translator) CurrentLocale() string
CurrentLocale provides a mock function with given fields:
func (*Translator) EXPECT ¶
func (_m *Translator) EXPECT() *Translator_Expecter
func (*Translator) Get ¶
func (_m *Translator) Get(key string, options ...translation.Option) string
Get provides a mock function with given fields: key, options
func (*Translator) GetFallback ¶
func (_m *Translator) GetFallback() string
GetFallback provides a mock function with given fields:
func (*Translator) Has ¶
func (_m *Translator) Has(key string, options ...translation.Option) bool
Has provides a mock function with given fields: key, options
func (*Translator) SetFallback ¶
func (_m *Translator) SetFallback(locale string) context.Context
SetFallback provides a mock function with given fields: locale
type Translator_Choice_Call ¶
Translator_Choice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Choice'
func (*Translator_Choice_Call) Return ¶
func (_c *Translator_Choice_Call) Return(_a0 string) *Translator_Choice_Call
func (*Translator_Choice_Call) Run ¶
func (_c *Translator_Choice_Call) Run(run func(key string, number int, options ...translation.Option)) *Translator_Choice_Call
func (*Translator_Choice_Call) RunAndReturn ¶
func (_c *Translator_Choice_Call) RunAndReturn(run func(string, int, ...translation.Option) string) *Translator_Choice_Call
type Translator_CurrentLocale_Call ¶
Translator_CurrentLocale_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CurrentLocale'
func (*Translator_CurrentLocale_Call) Return ¶
func (_c *Translator_CurrentLocale_Call) Return(_a0 string) *Translator_CurrentLocale_Call
func (*Translator_CurrentLocale_Call) Run ¶
func (_c *Translator_CurrentLocale_Call) Run(run func()) *Translator_CurrentLocale_Call
func (*Translator_CurrentLocale_Call) RunAndReturn ¶
func (_c *Translator_CurrentLocale_Call) RunAndReturn(run func() string) *Translator_CurrentLocale_Call
type Translator_Expecter ¶
type Translator_Expecter struct {
// contains filtered or unexported fields
}
func (*Translator_Expecter) Choice ¶
func (_e *Translator_Expecter) Choice(key interface{}, number interface{}, options ...interface{}) *Translator_Choice_Call
Choice is a helper method to define mock.On call
- key string
- number int
- options ...translation.Option
func (*Translator_Expecter) CurrentLocale ¶
func (_e *Translator_Expecter) CurrentLocale() *Translator_CurrentLocale_Call
CurrentLocale is a helper method to define mock.On call
func (*Translator_Expecter) Get ¶
func (_e *Translator_Expecter) Get(key interface{}, options ...interface{}) *Translator_Get_Call
Get is a helper method to define mock.On call
- key string
- options ...translation.Option
func (*Translator_Expecter) GetFallback ¶
func (_e *Translator_Expecter) GetFallback() *Translator_GetFallback_Call
GetFallback is a helper method to define mock.On call
func (*Translator_Expecter) Has ¶
func (_e *Translator_Expecter) Has(key interface{}, options ...interface{}) *Translator_Has_Call
Has is a helper method to define mock.On call
- key string
- options ...translation.Option
func (*Translator_Expecter) SetFallback ¶
func (_e *Translator_Expecter) SetFallback(locale interface{}) *Translator_SetFallback_Call
SetFallback is a helper method to define mock.On call
- locale string
func (*Translator_Expecter) SetLocale ¶
func (_e *Translator_Expecter) SetLocale(locale interface{}) *Translator_SetLocale_Call
SetLocale is a helper method to define mock.On call
- locale string
type Translator_GetFallback_Call ¶
Translator_GetFallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFallback'
func (*Translator_GetFallback_Call) Return ¶
func (_c *Translator_GetFallback_Call) Return(_a0 string) *Translator_GetFallback_Call
func (*Translator_GetFallback_Call) Run ¶
func (_c *Translator_GetFallback_Call) Run(run func()) *Translator_GetFallback_Call
func (*Translator_GetFallback_Call) RunAndReturn ¶
func (_c *Translator_GetFallback_Call) RunAndReturn(run func() string) *Translator_GetFallback_Call
type Translator_Get_Call ¶
Translator_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*Translator_Get_Call) Return ¶
func (_c *Translator_Get_Call) Return(_a0 string) *Translator_Get_Call
func (*Translator_Get_Call) Run ¶
func (_c *Translator_Get_Call) Run(run func(key string, options ...translation.Option)) *Translator_Get_Call
func (*Translator_Get_Call) RunAndReturn ¶
func (_c *Translator_Get_Call) RunAndReturn(run func(string, ...translation.Option) string) *Translator_Get_Call
type Translator_Has_Call ¶
Translator_Has_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Has'
func (*Translator_Has_Call) Return ¶
func (_c *Translator_Has_Call) Return(_a0 bool) *Translator_Has_Call
func (*Translator_Has_Call) Run ¶
func (_c *Translator_Has_Call) Run(run func(key string, options ...translation.Option)) *Translator_Has_Call
func (*Translator_Has_Call) RunAndReturn ¶
func (_c *Translator_Has_Call) RunAndReturn(run func(string, ...translation.Option) bool) *Translator_Has_Call
type Translator_SetFallback_Call ¶
Translator_SetFallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFallback'
func (*Translator_SetFallback_Call) Return ¶
func (_c *Translator_SetFallback_Call) Return(_a0 context.Context) *Translator_SetFallback_Call
func (*Translator_SetFallback_Call) Run ¶
func (_c *Translator_SetFallback_Call) Run(run func(locale string)) *Translator_SetFallback_Call
func (*Translator_SetFallback_Call) RunAndReturn ¶
func (_c *Translator_SetFallback_Call) RunAndReturn(run func(string) context.Context) *Translator_SetFallback_Call
type Translator_SetLocale_Call ¶
Translator_SetLocale_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLocale'
func (*Translator_SetLocale_Call) Return ¶
func (_c *Translator_SetLocale_Call) Return(_a0 context.Context) *Translator_SetLocale_Call
func (*Translator_SetLocale_Call) Run ¶
func (_c *Translator_SetLocale_Call) Run(run func(locale string)) *Translator_SetLocale_Call
func (*Translator_SetLocale_Call) RunAndReturn ¶
func (_c *Translator_SetLocale_Call) RunAndReturn(run func(string) context.Context) *Translator_SetLocale_Call