duration

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: GPL-3.0 Imports: 6 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

func ParseDuration

func ParseDuration(str string) (time.Duration, error)

ParseDuration parse a ISO8601 into time.Duration Modified from : https://stackoverflow.com/questions/28125963/golang-parse-time-duration

func ParseInt64

func ParseInt64(value string) int64

Types

type MaskEngine

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

MaskEngine is to mask a value thanks to a duration

func NewMask

func NewMask(text string) (MaskEngine, error)

NewMask create a MaskEngine with a ISO8601 duration string

func (MaskEngine) Mask

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

Mask masks a time value with a duration

Jump to

Keyboard shortcuts

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