Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶ added in v0.2.4
Handler applies a single planned change against GitHub.
Implementations should be idempotent where possible; the planner already filters out no-op changes, but partial failures mid-apply are possible.
type HandlerFunc ¶ added in v0.2.4
HandlerFunc adapts an ordinary function to the Handler interface.
type HandlerRegistry ¶ added in v0.2.4
type HandlerRegistry struct {
// contains filtered or unexported fields
}
HandlerRegistry resolves change kinds (scope:action) to handlers and orders them.
func NewHandlerRegistry ¶ added in v0.2.4
func NewHandlerRegistry() *HandlerRegistry
NewHandlerRegistry returns an empty registry.
func (*HandlerRegistry) Lookup ¶ added in v0.2.4
func (r *HandlerRegistry) Lookup(scope, action string) (Handler, bool)
Lookup returns the Handler registered for scope:action, if any.
func (*HandlerRegistry) Precedence ¶ added in v0.2.4
func (r *HandlerRegistry) Precedence(scope, action string) int
Precedence returns the ordering weight for scope:action. Unregistered keys sort last so unknown change kinds don't silently jump the queue.
func (*HandlerRegistry) Register ¶ added in v0.2.4
func (r *HandlerRegistry) Register(scope, action string, precedence int, h Handler)
Register binds a Handler to scope:action with the given precedence. Lower precedence runs first. Duplicate registrations panic so misconfigured registries fail fast at startup rather than during an apply.
type State ¶
type State struct {
Org string
ManagedRepos map[string]bool
// Cached API results to avoid duplicate calls
ActualTeams []*github.Team
ActualRepos []*github.Repository
// Current state from GitHub
CurrentTeams int
CurrentTeamMembers int
CurrentRepos int
CurrentRepoPerms int
CurrentCustomRoles int
// Desired state from config
DesiredTeams int
DesiredTeamMembers int
DesiredRepos int
DesiredRepoPerms int
DesiredCustomRoles int
}