randdate

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(conf model.Masking, seed int64, caches map[string]model.Cache) (model.MaskEngine, bool, error)

Create a mask from a configuration

Types

type MaskEngine

type MaskEngine struct {
	DateMin time.Time
	DateMax time.Time
	// contains filtered or unexported fields
}

MaskEngine is a struct to mask the date

func NewMask

func NewMask(min, max time.Time, seed int64) MaskEngine

NewMask return a MaskEngine from 2 dates

func (MaskEngine) Mask

func (dateRange MaskEngine) Mask(e model.Entry, context ...model.Dictionary) (model.Entry, error)

Mask choose a mask date randomly

Jump to

Keyboard shortcuts

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