validation

package
v1.14.7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	mock.Mock
}

Data is an autogenerated mock type for the Data type

func NewData

func NewData(t interface {
	mock.TestingT
	Cleanup(func())
}) *Data

NewData creates a new instance of Data. 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 (*Data) EXPECT

func (_m *Data) EXPECT() *Data_Expecter

func (*Data) Get

func (_m *Data) Get(key string) (interface{}, bool)

Get provides a mock function with given fields: key

func (*Data) Set

func (_m *Data) Set(key string, val interface{}) error

Set provides a mock function with given fields: key, val

type Data_Expecter

type Data_Expecter struct {
	// contains filtered or unexported fields
}

func (*Data_Expecter) Get

func (_e *Data_Expecter) Get(key interface{}) *Data_Get_Call

Get is a helper method to define mock.On call

  • key string

func (*Data_Expecter) Set

func (_e *Data_Expecter) Set(key interface{}, val interface{}) *Data_Set_Call

Set is a helper method to define mock.On call

  • key string
  • val interface{}

type Data_Get_Call

type Data_Get_Call struct {
	*mock.Call
}

Data_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*Data_Get_Call) Return

func (_c *Data_Get_Call) Return(val interface{}, exist bool) *Data_Get_Call

func (*Data_Get_Call) Run

func (_c *Data_Get_Call) Run(run func(key string)) *Data_Get_Call

func (*Data_Get_Call) RunAndReturn

func (_c *Data_Get_Call) RunAndReturn(run func(string) (interface{}, bool)) *Data_Get_Call

type Data_Set_Call

type Data_Set_Call struct {
	*mock.Call
}

Data_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'

func (*Data_Set_Call) Return

func (_c *Data_Set_Call) Return(_a0 error) *Data_Set_Call

func (*Data_Set_Call) Run

func (_c *Data_Set_Call) Run(run func(key string, val interface{})) *Data_Set_Call

func (*Data_Set_Call) RunAndReturn

func (_c *Data_Set_Call) RunAndReturn(run func(string, interface{}) error) *Data_Set_Call

type Errors

type Errors struct {
	mock.Mock
}

Errors is an autogenerated mock type for the Errors type

func NewErrors

func NewErrors(t interface {
	mock.TestingT
	Cleanup(func())
}) *Errors

NewErrors creates a new instance of Errors. 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 (*Errors) All

func (_m *Errors) All() map[string]map[string]string

All provides a mock function with given fields:

func (*Errors) EXPECT

func (_m *Errors) EXPECT() *Errors_Expecter

func (*Errors) Get

func (_m *Errors) Get(key string) map[string]string

Get provides a mock function with given fields: key

func (*Errors) Has

func (_m *Errors) Has(key string) bool

Has provides a mock function with given fields: key

func (*Errors) One

func (_m *Errors) One(key ...string) string

One provides a mock function with given fields: key

type Errors_All_Call

type Errors_All_Call struct {
	*mock.Call
}

Errors_All_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'All'

func (*Errors_All_Call) Return

func (_c *Errors_All_Call) Return(_a0 map[string]map[string]string) *Errors_All_Call

func (*Errors_All_Call) Run

func (_c *Errors_All_Call) Run(run func()) *Errors_All_Call

func (*Errors_All_Call) RunAndReturn

func (_c *Errors_All_Call) RunAndReturn(run func() map[string]map[string]string) *Errors_All_Call

type Errors_Expecter

type Errors_Expecter struct {
	// contains filtered or unexported fields
}

func (*Errors_Expecter) All

func (_e *Errors_Expecter) All() *Errors_All_Call

All is a helper method to define mock.On call

func (*Errors_Expecter) Get

func (_e *Errors_Expecter) Get(key interface{}) *Errors_Get_Call

Get is a helper method to define mock.On call

  • key string

func (*Errors_Expecter) Has

func (_e *Errors_Expecter) Has(key interface{}) *Errors_Has_Call

Has is a helper method to define mock.On call

  • key string

func (*Errors_Expecter) One

func (_e *Errors_Expecter) One(key ...interface{}) *Errors_One_Call

One is a helper method to define mock.On call

  • key ...string

type Errors_Get_Call

type Errors_Get_Call struct {
	*mock.Call
}

Errors_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*Errors_Get_Call) Return

func (_c *Errors_Get_Call) Return(_a0 map[string]string) *Errors_Get_Call

func (*Errors_Get_Call) Run

func (_c *Errors_Get_Call) Run(run func(key string)) *Errors_Get_Call

func (*Errors_Get_Call) RunAndReturn

func (_c *Errors_Get_Call) RunAndReturn(run func(string) map[string]string) *Errors_Get_Call

type Errors_Has_Call

type Errors_Has_Call struct {
	*mock.Call
}

Errors_Has_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Has'

func (*Errors_Has_Call) Return

func (_c *Errors_Has_Call) Return(_a0 bool) *Errors_Has_Call

func (*Errors_Has_Call) Run

func (_c *Errors_Has_Call) Run(run func(key string)) *Errors_Has_Call

func (*Errors_Has_Call) RunAndReturn

func (_c *Errors_Has_Call) RunAndReturn(run func(string) bool) *Errors_Has_Call

type Errors_One_Call

type Errors_One_Call struct {
	*mock.Call
}

Errors_One_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'One'

func (*Errors_One_Call) Return

func (_c *Errors_One_Call) Return(_a0 string) *Errors_One_Call

func (*Errors_One_Call) Run

func (_c *Errors_One_Call) Run(run func(key ...string)) *Errors_One_Call

func (*Errors_One_Call) RunAndReturn

func (_c *Errors_One_Call) RunAndReturn(run func(...string) string) *Errors_One_Call

type Option

type Option struct {
	mock.Mock
}

Option is an autogenerated mock type for the Option type

func NewOption

func NewOption(t interface {
	mock.TestingT
	Cleanup(func())
}) *Option

NewOption creates a new instance of Option. 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 (*Option) EXPECT

func (_m *Option) EXPECT() *Option_Expecter

func (*Option) Execute

func (_m *Option) Execute(_a0 map[string]interface{})

Execute provides a mock function with given fields: _a0

type Option_Execute_Call

type Option_Execute_Call struct {
	*mock.Call
}

Option_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'

func (*Option_Execute_Call) Return

func (*Option_Execute_Call) Run

func (_c *Option_Execute_Call) Run(run func(_a0 map[string]interface{})) *Option_Execute_Call

func (*Option_Execute_Call) RunAndReturn

func (_c *Option_Execute_Call) RunAndReturn(run func(map[string]interface{})) *Option_Execute_Call

type Option_Expecter

type Option_Expecter struct {
	// contains filtered or unexported fields
}

func (*Option_Expecter) Execute

func (_e *Option_Expecter) Execute(_a0 interface{}) *Option_Execute_Call

Execute is a helper method to define mock.On call

  • _a0 map[string]interface{}

type Rule

type Rule struct {
	mock.Mock
}

Rule is an autogenerated mock type for the Rule type

func NewRule

func NewRule(t interface {
	mock.TestingT
	Cleanup(func())
}) *Rule

NewRule creates a new instance of Rule. 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 (*Rule) EXPECT

func (_m *Rule) EXPECT() *Rule_Expecter

func (*Rule) Message

func (_m *Rule) Message() string

Message provides a mock function with given fields:

func (*Rule) Passes

func (_m *Rule) Passes(data validation.Data, val interface{}, options ...interface{}) bool

Passes provides a mock function with given fields: data, val, options

func (*Rule) Signature

func (_m *Rule) Signature() string

Signature provides a mock function with given fields:

type Rule_Expecter

type Rule_Expecter struct {
	// contains filtered or unexported fields
}

func (*Rule_Expecter) Message

func (_e *Rule_Expecter) Message() *Rule_Message_Call

Message is a helper method to define mock.On call

func (*Rule_Expecter) Passes

func (_e *Rule_Expecter) Passes(data interface{}, val interface{}, options ...interface{}) *Rule_Passes_Call

Passes is a helper method to define mock.On call

  • data validation.Data
  • val interface{}
  • options ...interface{}

func (*Rule_Expecter) Signature

func (_e *Rule_Expecter) Signature() *Rule_Signature_Call

Signature is a helper method to define mock.On call

type Rule_Message_Call

type Rule_Message_Call struct {
	*mock.Call
}

Rule_Message_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Message'

func (*Rule_Message_Call) Return

func (_c *Rule_Message_Call) Return(_a0 string) *Rule_Message_Call

func (*Rule_Message_Call) Run

func (_c *Rule_Message_Call) Run(run func()) *Rule_Message_Call

func (*Rule_Message_Call) RunAndReturn

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

type Rule_Passes_Call

type Rule_Passes_Call struct {
	*mock.Call
}

Rule_Passes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Passes'

func (*Rule_Passes_Call) Return

func (_c *Rule_Passes_Call) Return(_a0 bool) *Rule_Passes_Call

func (*Rule_Passes_Call) Run

func (_c *Rule_Passes_Call) Run(run func(data validation.Data, val interface{}, options ...interface{})) *Rule_Passes_Call

func (*Rule_Passes_Call) RunAndReturn

func (_c *Rule_Passes_Call) RunAndReturn(run func(validation.Data, interface{}, ...interface{}) bool) *Rule_Passes_Call

type Rule_Signature_Call

type Rule_Signature_Call struct {
	*mock.Call
}

Rule_Signature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Signature'

func (*Rule_Signature_Call) Return

func (*Rule_Signature_Call) Run

func (_c *Rule_Signature_Call) Run(run func()) *Rule_Signature_Call

func (*Rule_Signature_Call) RunAndReturn

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

type Validation

type Validation struct {
	mock.Mock
}

Validation is an autogenerated mock type for the Validation type

func NewValidation

func NewValidation(t interface {
	mock.TestingT
	Cleanup(func())
}) *Validation

NewValidation creates a new instance of Validation. 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 (*Validation) AddRules

func (_m *Validation) AddRules(_a0 []validation.Rule) error

AddRules provides a mock function with given fields: _a0

func (*Validation) EXPECT

func (_m *Validation) EXPECT() *Validation_Expecter

func (*Validation) Make

func (_m *Validation) Make(data interface{}, rules map[string]string, options ...validation.Option) (validation.Validator, error)

Make provides a mock function with given fields: data, rules, options

func (*Validation) Rules

func (_m *Validation) Rules() []validation.Rule

Rules provides a mock function with given fields:

type Validation_AddRules_Call

type Validation_AddRules_Call struct {
	*mock.Call
}

Validation_AddRules_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddRules'

func (*Validation_AddRules_Call) Return

func (*Validation_AddRules_Call) Run

func (*Validation_AddRules_Call) RunAndReturn

type Validation_Expecter

type Validation_Expecter struct {
	// contains filtered or unexported fields
}

func (*Validation_Expecter) AddRules

func (_e *Validation_Expecter) AddRules(_a0 interface{}) *Validation_AddRules_Call

AddRules is a helper method to define mock.On call

  • _a0 []validation.Rule

func (*Validation_Expecter) Make

func (_e *Validation_Expecter) Make(data interface{}, rules interface{}, options ...interface{}) *Validation_Make_Call

Make is a helper method to define mock.On call

  • data interface{}
  • rules map[string]string
  • options ...validation.Option

func (*Validation_Expecter) Rules

Rules is a helper method to define mock.On call

type Validation_Make_Call

type Validation_Make_Call struct {
	*mock.Call
}

Validation_Make_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Make'

func (*Validation_Make_Call) Return

func (*Validation_Make_Call) Run

func (_c *Validation_Make_Call) Run(run func(data interface{}, rules map[string]string, options ...validation.Option)) *Validation_Make_Call

func (*Validation_Make_Call) RunAndReturn

func (_c *Validation_Make_Call) RunAndReturn(run func(interface{}, map[string]string, ...validation.Option) (validation.Validator, error)) *Validation_Make_Call

type Validation_Rules_Call

type Validation_Rules_Call struct {
	*mock.Call
}

Validation_Rules_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Rules'

func (*Validation_Rules_Call) Return

func (*Validation_Rules_Call) Run

func (_c *Validation_Rules_Call) Run(run func()) *Validation_Rules_Call

func (*Validation_Rules_Call) RunAndReturn

func (_c *Validation_Rules_Call) RunAndReturn(run func() []validation.Rule) *Validation_Rules_Call

type Validator

type Validator struct {
	mock.Mock
}

Validator is an autogenerated mock type for the Validator type

func NewValidator

func NewValidator(t interface {
	mock.TestingT
	Cleanup(func())
}) *Validator

NewValidator creates a new instance of Validator. 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 (*Validator) Bind

func (_m *Validator) Bind(ptr interface{}) error

Bind provides a mock function with given fields: ptr

func (*Validator) EXPECT

func (_m *Validator) EXPECT() *Validator_Expecter

func (*Validator) Errors

func (_m *Validator) Errors() validation.Errors

Errors provides a mock function with given fields:

func (*Validator) Fails

func (_m *Validator) Fails() bool

Fails provides a mock function with given fields:

type Validator_Bind_Call

type Validator_Bind_Call struct {
	*mock.Call
}

Validator_Bind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bind'

func (*Validator_Bind_Call) Return

func (*Validator_Bind_Call) Run

func (_c *Validator_Bind_Call) Run(run func(ptr interface{})) *Validator_Bind_Call

func (*Validator_Bind_Call) RunAndReturn

func (_c *Validator_Bind_Call) RunAndReturn(run func(interface{}) error) *Validator_Bind_Call

type Validator_Errors_Call

type Validator_Errors_Call struct {
	*mock.Call
}

Validator_Errors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Errors'

func (*Validator_Errors_Call) Return

func (*Validator_Errors_Call) Run

func (_c *Validator_Errors_Call) Run(run func()) *Validator_Errors_Call

func (*Validator_Errors_Call) RunAndReturn

func (_c *Validator_Errors_Call) RunAndReturn(run func() validation.Errors) *Validator_Errors_Call

type Validator_Expecter

type Validator_Expecter struct {
	// contains filtered or unexported fields
}

func (*Validator_Expecter) Bind

func (_e *Validator_Expecter) Bind(ptr interface{}) *Validator_Bind_Call

Bind is a helper method to define mock.On call

  • ptr interface{}

func (*Validator_Expecter) Errors

Errors is a helper method to define mock.On call

func (*Validator_Expecter) Fails

Fails is a helper method to define mock.On call

type Validator_Fails_Call

type Validator_Fails_Call struct {
	*mock.Call
}

Validator_Fails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fails'

func (*Validator_Fails_Call) Return

func (*Validator_Fails_Call) Run

func (_c *Validator_Fails_Call) Run(run func()) *Validator_Fails_Call

func (*Validator_Fails_Call) RunAndReturn

func (_c *Validator_Fails_Call) RunAndReturn(run func() bool) *Validator_Fails_Call

Jump to

Keyboard shortcuts

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