diff

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string

ActionType represents the type of change needed.

const (
	ActionAdd    ActionType = "add"
	ActionUpdate ActionType = "update"
	ActionDelete ActionType = "delete"
)

type ContainerChange

type ContainerChange struct {
	ContainerID   string
	Action        ActionType
	OldPermission string // empty for add
	NewPermission string // empty for delete
}

ContainerChange represents a change to a container permission.

type Plan

type Plan struct {
	AccountID string
	Changes   []UserChange
	Mode      config.Mode
}

Plan represents the full set of changes to apply.

func Compute

func Compute(desired, actual state.AccountState, mode config.Mode) Plan

Compute calculates the diff between desired and actual states.

func (Plan) HasChanges

func (p Plan) HasChanges() bool

HasChanges returns true if the plan contains any changes.

func (Plan) Summary

func (p Plan) Summary() (adds, updates, deletes int)

Summary returns counts of add/update/delete operations.

type UserChange

type UserChange struct {
	Email            string
	Action           ActionType
	OldAccountAccess string // empty for add
	NewAccountAccess string // empty for delete
	ContainerChanges []ContainerChange
}

UserChange represents a change to a user's permissions.

Jump to

Keyboard shortcuts

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