history

package
v0.0.0-...-58c2bd7 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type History

type History[T any] struct {
	Latest  *HistoryItem[T]  `json:"latest"`
	History []HistoryItem[T] `json:"history"`
}

func (*History[T]) AddOrUpdateLatestItem

func (h *History[T]) AddOrUpdateLatestItem(data T)

func (*History[T]) GetLatest

func (h *History[T]) GetLatest() *T

func (*History[T]) Initialized

func (h *History[T]) Initialized() bool

func (*History[T]) Merge

func (h *History[T]) Merge(h2 History[T])

type HistoryItem

type HistoryItem[T any] struct {
	Data       T           `json:"data"`
	StartDate  time.Time   `json:"start_date"`
	EndDate    time.Time   `json:"end_date"`
	KnownDates []time.Time `json:"known_dates"`
}

Jump to

Keyboard shortcuts

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