types

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MicroInSecond = 1000000
	MilliInSecond = 1000
)

Variables

View Source
var (
	ErrEmptyValue = errors.New("empty value")
)
View Source
var TimePrecisions = map[string]TimePrecision{
	"second":      TIME_PRECISION_SECOND,
	"millisecond": TIME_PRECISION_MILLISECOND,
	"microsecond": TIME_PRECISION_MICROSECOND,
}

Functions

This section is empty.

Types

type Time

type Time struct {
	Precision TimePrecision
	Format    string
}

func NewTime

func NewTime() *Time

func (*Time) GetValue

func (t *Time) GetValue(data interface{}) (time.Time, error)

func (*Time) Parse

func (t *Time) Parse(data interface{}) error

type TimePrecision added in v0.0.20

type TimePrecision int32
const (
	TIME_PRECISION_SECOND      TimePrecision = 0
	TIME_PRECISION_MILLISECOND TimePrecision = 1
	TIME_PRECISION_MICROSECOND TimePrecision = 2
)

Jump to

Keyboard shortcuts

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