configstore

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package configstore reads and writes the `config` table, a two-column key/value store the importers use as a bookmark.

It is deliberately the same table, with the same keys, that the TypeScript services already use — an importer rewritten in Go must resume where the one it replaces stopped, not start again from 2007.

Index

Constants

View Source
const (
	KeySDEBuild          = "sde:buildNumber"
	KeyPricesLastDate    = "everef:prices:last_date"
	KeySovereigntyDate   = "everef:sovereignty:last_date"
	KeyKillmailsLastDate = "everef:killmails:last_date"
	KeyWarsLastYear      = "everef:wars:last_year"
	KeyWarsLastDaily     = "everef:wars:last_daily"

	// KeyR2Z2Sequence is the zKillboard R2Z2 feed cursor. Spelled exactly as
	// the TypeScript listener spells it, so the Go one resumes from where that
	// process stopped instead of bootstrapping at the head of the feed and
	// leaving every killmail in between unfetched.
	KeyR2Z2Sequence = "r2z2:last_sequence"
)

Keys currently in use. Listing them here rather than beside each importer makes an accidental collision visible, and the table is shared with the TypeScript services so the names are not ours alone to change.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, pool *pgxpool.Pool, key string) (string, error)

Get returns a value, or the empty string when the key is unset.

Absent and empty are deliberately not distinguished: every caller treats an unset bookmark as "nothing imported yet", and an empty string means the same.

func Set

func Set(ctx context.Context, pool *pgxpool.Pool, key, value string) error

Set stores a value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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