translation

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader struct {
	mock.Mock
}

Loader is an autogenerated mock type for the Loader type

func NewLoader

func NewLoader(t interface {
	mock.TestingT
	Cleanup(func())
}) *Loader

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

func (*Loader) Load

func (_m *Loader) Load(locale string, group string) (map[string]interface{}, error)

Load provides a mock function with given fields: locale, group

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

type Loader_Load_Call struct {
	*mock.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

type Translator struct {
	mock.Mock
}

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

func (*Translator) SetLocale

func (_m *Translator) SetLocale(locale string) context.Context

SetLocale provides a mock function with given fields: locale

type Translator_Choice_Call

type Translator_Choice_Call struct {
	*mock.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 (*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

type Translator_CurrentLocale_Call

type Translator_CurrentLocale_Call struct {
	*mock.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 (*Translator_CurrentLocale_Call) Run

func (*Translator_CurrentLocale_Call) RunAndReturn

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

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

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

type Translator_GetFallback_Call struct {
	*mock.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 (*Translator_GetFallback_Call) Run

func (*Translator_GetFallback_Call) RunAndReturn

func (_c *Translator_GetFallback_Call) RunAndReturn(run func() string) *Translator_GetFallback_Call

type Translator_Get_Call

type Translator_Get_Call struct {
	*mock.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 (*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

type Translator_Has_Call struct {
	*mock.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

type Translator_SetFallback_Call struct {
	*mock.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 (*Translator_SetFallback_Call) Run

func (*Translator_SetFallback_Call) RunAndReturn

type Translator_SetLocale_Call

type Translator_SetLocale_Call struct {
	*mock.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 (*Translator_SetLocale_Call) Run

func (_c *Translator_SetLocale_Call) Run(run func(locale string)) *Translator_SetLocale_Call

func (*Translator_SetLocale_Call) RunAndReturn

Jump to

Keyboard shortcuts

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