diff

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 4 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     `json:"container_id"`
	Action        ActionType `json:"action"`
	OldPermission string     `json:"old_permission,omitempty"`
	NewPermission string     `json:"new_permission,omitempty"`
}

ContainerChange represents a change to a container permission.

type Plan

type Plan struct {
	AccountID string       `json:"account_id"`
	Changes   []UserChange `json:"changes"`
	Mode      config.Mode  `json:"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            `json:"email"`
	Action           ActionType        `json:"action"`
	OldAccountAccess string            `json:"old_account_access,omitempty"`
	NewAccountAccess string            `json:"new_account_access,omitempty"`
	ContainerChanges []ContainerChange `json:"container_changes,omitempty"`
}

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