zpaimport

package
v1.238.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: BSD-3-Clause Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package zpaimport holds the pure decision logic of the ZPA import: diffing a fresh import against the previous DB state into a SyncLogEntry plus human-readable report lines, classifying a ZPA exam for the automatic to-plan pre-selection, and computing the new to-plan / not-to-plan sets. All functions are I/O-free over graph/model types; the ZPA client fetches, DB writes, reporter output and condition marking stay in the plexams package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffChanges

func DiffChanges[T any](old, neu []T,
	id func(T) int, name func(T) string, fields func(T) map[string]string) (*model.SyncLogEntry, []string)

DiffChanges compares a fresh ZPA import (neu) against the previous DB state (old), keyed by id, and returns a partial SyncLogEntry (Added/Changed/Removed/Entries) that the caller completes (operation/label/…) together with the human-readable report lines, in order, for the caller to emit. New entries, per-field changes on existing entries and dropped entries are reported.

func ExamShouldBePlanned

func ExamShouldBePlanned(e *model.ZPAExam) bool

ExamShouldBePlanned classifies a ZPA exam for the automatic pre-selection: written and practical exams ("schriftliche/praktische Prüfung") are planned centrally, all other types (Modularbeit, Präsentation, mündliche Prüfung, Schein, extern, …) are not.

func Preselect

func Preselect(all, toPlan, notToPlan []*model.ZPAExam) (newToPlan, newNotToPlan []*model.ZPAExam, toPlanAdded, notToPlanAdded int)

Preselect computes the new to-plan / not-to-plan sets for all exams that have no decision yet (written/practical → to plan, rest → not to plan) while keeping every existing decision in toPlan/notToPlan. It returns the extended sets and how many were newly added to each. When nothing was undecided both added counts are 0 and the returned sets equal the inputs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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