Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct {
Kind ChangeKind
Key string
OldValue string
NewValue string
Classification string // human-readable tags, e.g. "masked", "protected", "file"
SkipReason string
// contains filtered or unexported fields
}
Change describes a single diff entry.
type ChangeKind ¶
type ChangeKind string
ChangeKind identifies the type of diff change.
const ( ChangeCreate ChangeKind = "create" ChangeUpdate ChangeKind = "update" ChangeDelete ChangeKind = "delete" ChangeUnchanged ChangeKind = "unchanged" ChangeSkipped ChangeKind = "skipped" )
type DiffResult ¶
type DiffResult struct {
Changes []Change
}
DiffResult holds the complete set of changes between local and remote.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine orchestrates diff and apply operations.
func NewEngine ¶
func NewEngine(client gitlabClient, cl *classifier.Classifier, opts Options, projectID string) *Engine
NewEngine creates a new Engine.
func (*Engine) Apply ¶
func (e *Engine) Apply(ctx context.Context, diff DiffResult) SyncReport
Apply executes all changes in diff using a worker pool. It is equivalent to ApplyWithCallback with a nil callback.
func (*Engine) ApplyWithCallback ¶
func (e *Engine) ApplyWithCallback(ctx context.Context, diff DiffResult, cb func(Result)) SyncReport
ApplyWithCallback executes all changes concurrently. For each completed result (success or error), cb is called synchronously from the collecting goroutine.
Click to show internal directories.
Click to hide internal directories.