validator

package
v0.0.0-...-99221f3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CanalIncrValidator

type CanalIncrValidator[T migrator.Entity] struct {
	// contains filtered or unexported fields
}

func NewCanalIncrValidator

func NewCanalIncrValidator[T migrator.Entity](
	base *gorm.DB,
	target *gorm.DB,
	direction string,
	l logger.LoggerV1,
	producer events2.Producer,
) *CanalIncrValidator[T]

func (*CanalIncrValidator[T]) Validate

func (v *CanalIncrValidator[T]) Validate(ctx context.Context, id int64) error

Validate 一次校验一条

type Validator

type Validator[T migrator.Entity] struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator[T migrator.Entity](
	base *gorm.DB,
	target *gorm.DB,
	direction string,
	l logger.LoggerV1,
	producer events2.Producer,
) *Validator[T]

func (*Validator[T]) SleepInterval

func (v *Validator[T]) SleepInterval(i time.Duration) *Validator[T]

func (*Validator[T]) Utime

func (v *Validator[T]) Utime(utime int64) *Validator[T]

func (*Validator[T]) Validate

func (v *Validator[T]) Validate(ctx context.Context) error

Validate 执行校验。 分成两步: 1. from => to

Jump to

Keyboard shortcuts

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