state

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package state is the committed sync baseline (gitops/state/sync-state.json) — the last-synced snapshot that makes the 3-way (git ↔ baseline ↔ ABM) diff possible.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ABMID           string `json:"abm_id"`
	Hash            string `json:"hash"`
	UpdatedDateTime string `json:"updatedDateTime"`
}

Entry is the last-synced state of one config.

type State

type State struct {
	Configs map[string]Entry `json:"configs"`
}

State maps config name → last-synced Entry.

func Load

func Load(path string) (*State, error)

Load reads the committed baseline from path; a missing file yields an empty State.

func (*State) Save

func (s *State) Save(path string) error

Save writes the baseline to path (creating parent dirs), pretty-printed.

Jump to

Keyboard shortcuts

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