clock

package
v0.0.0-...-d44804a Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock interface {
	Now() time.Time
}

Allow for time mocking

type Mock

type Mock struct {
	T time.Time
}

A mock clock with a fixed time

func (*Mock) Now

func (dc *Mock) Now() time.Time

type Real

type Real struct{}

Real system clock

func (*Real) Now

func (dc *Real) Now() time.Time

type ServiceWindow

type ServiceWindow struct {
	StartDate    time.Time
	EndDate      time.Time
	FallbackWeek time.Time
	Location     *time.Location
}

type ServiceWindowCache

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

func NewServiceWindowCache

func NewServiceWindowCache(db sqlx.Ext) *ServiceWindowCache

func (*ServiceWindowCache) Get

Jump to

Keyboard shortcuts

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