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 ¶
HasChanges returns true if the plan contains any changes.
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.
Click to show internal directories.
Click to hide internal directories.