history

package
v0.0.0-...-bd515f7 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImageURLBase    = "https://fruktkartan-thumbs.s3.eu-north-1.amazonaws.com"
	ImageURLPathFmt = "/%s_1200.jpg"
)

Variables

This section is empty.

Functions

func CreateImageThumb

func CreateImageThumb(dbImgName string)

func ImageFilePath

func ImageFilePath(dbImgName string) string

Types

type Entry

type Entry struct {
	ChangeID int
	ChangeAt types.NullTime
	ChangeOp string

	Key      types.NullStringTrimmed
	Type     types.NullStringTrimmed
	Desc     types.NullStringTrimmed
	Img      types.NullString
	By       types.NullString
	At       types.NullTime
	Lat, Lon sql.NullFloat64

	KeyNew         types.NullStringTrimmed
	TypeNew        types.NullStringTrimmed
	DescNew        types.NullStringTrimmed
	ImgNew         types.NullString
	ByNew          types.NullString
	AtNew          types.NullTime
	LatNew, LonNew sql.NullFloat64

	Address, AddressNew string
	Pos, PosNew         geo.Pos
	DescDiff            string
	UpdateIsEmpty       bool
}

func (Entry) ImgFile

func (e Entry) ImgFile() string

func (Entry) ImgFileNew

func (e Entry) ImgFileNew() string

func (Entry) ImgURL

func (e Entry) ImgURL() string

func (Entry) ImgURLNew

func (e Entry) ImgURLNew() string

type History

type History struct {
	SinceDays int

	Deletes, Inserts, Updates int
	// contains filtered or unexported fields
}

func (*History) Count

func (h *History) Count() int

func (*History) Entries

func (h *History) Entries() []Entry

func (*History) FromDB

func (h *History) FromDB(sinceDays int) error

func (*History) Load

func (h *History) Load(cachefile string) error

TODO: currently unused

func (*History) Net

func (h *History) Net() string

func (*History) Save

func (h *History) Save(cachefile string) error

TODO: currently unused

Jump to

Keyboard shortcuts

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