utils

package
v0.0.0-...-9cb16bd Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FewDaysLater

func FewDaysLater(day int) int64

FewDaysLater aims to calculate time for given day later

func FewDurationLater

func FewDurationLater(duration time.Duration) int64

FewDurationLater calculates a time for given duration

func FewDurationLaterTime

func FewDurationLaterTime(duration time.Duration) time.Time

FewDurationLater calculates a time for given duration

func IsExpired

func IsExpired(expirationTime time.Time) bool

IsExpired check if given time is already expired or not

func SixHoursLater

func SixHoursLater() int64

SixHoursLater aims to calculate time for 6 hours later

func TwentyFourHoursLater

func TwentyFourHoursLater() int64

TwentyFourHoursLater aims to calculate time for 24 hours later

Types

type RealTimer

type RealTimer struct{}

func (RealTimer) Now

func (t RealTimer) Now() time.Time

type RealUUID

type RealUUID struct{}

func (RealUUID) NewUUID

func (r RealUUID) NewUUID() string

type Timer

type Timer interface {
	Now() time.Time
}

type UUID

type UUID interface {
	NewUUID() string
}

Directories

Path Synopsis
Package mockutils is a generated GoMock package.
Package mockutils is a generated GoMock package.

Jump to

Keyboard shortcuts

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