datatypes

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Number data type
	Number = "NUMBER"
	// Datetime data type
	Datetime = "DATETIME"
)

Variables

View Source
var ErrEmptyVersion = errors.New("version cannot be empty")
View Source
var ErrInvalidMetadata = errors.New("invalid metadata when parsing semver")
View Source
var ErrInvalidPrerelease = errors.New("invalid prerelease when parsing semver")
View Source
var ErrUnableToConvertSemver = errors.New("unable to convert to semver, incorrect format")

Functions

func TsFromJava

func TsFromJava(ts int64) int64

TsFromJava converts a java timestamp to standard unix format

func ZeroSecondsTS

func ZeroSecondsTS(ts int64) int64

ZeroSecondsTS Takes a timestamp in milliseconds as a parameter and returns another timestamp in seconds with the same date & time but zero seconds.

func ZeroTimeTS

func ZeroTimeTS(ts int64) int64

ZeroTimeTS Takes a timestamp in milliseconds as a parameter and returns another timestamp in seconds with the same date and zero time.

Types

type Semver

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

func BuildSemver

func BuildSemver(version string) (*Semver, error)

BuildSemver builds a semver object from a version string

func (*Semver) Compare

func (s *Semver) Compare(toCompare Semver) int

Compare compares two semver versions

func (*Semver) Version

func (s *Semver) Version() string

Version returns the version string

type UnsupportedMatcherError

type UnsupportedMatcherError struct {
	Message string
}

UnsupportedMatcherError represents a flag set validaton error

func (UnsupportedMatcherError) Error

func (f UnsupportedMatcherError) Error() string

Error implements golang error interface

Jump to

Keyboard shortcuts

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