Documentation
¶
Overview ¶
Package defaultbranch owns fleet policy inspection and durable mutation operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasFindings ¶
func ValidDigest ¶
Types ¶
type Archive ¶
type Archive struct {
RepositoryID int64 `json:"repository_id"`
OriginalArchived bool `json:"original_archived"`
InitialDefault string `json:"initial_default"`
DesiredDefault string `json:"desired_default"`
InitialHead string `json:"initial_head"`
FinalHead string `json:"final_head,omitempty"`
Phase string `json:"phase"`
UnarchiveAccepted bool `json:"unarchive_accepted,omitempty"`
RestoreAccepted bool `json:"restore_accepted,omitempty"`
RecoveryRequired bool `json:"recovery_required,omitempty"`
RestoreError string `json:"restore_error,omitempty"`
RecoveredFrom string `json:"recovered_from,omitempty"`
RecoveredSHA256 string `json:"recovered_sha256,omitempty"`
}
type Dependencies ¶
type Dependencies struct {
Persist func(Report) error
AuthUser func() (string, error)
MemberOrgs func() ([]string, error)
ListRemote func(string) ([]discover.Repo, error)
Read func(ctx context.Context, endpoint string) ([]byte, error)
Execute func(ctx context.Context, args ...string) githubobserver.CommandResponse
RenameWait func(ctx context.Context, duration time.Duration) error
RenameNow func() time.Time
ConfigPath func() string
Git func(ctx context.Context, dir string, args ...string) (string, error)
IsAncestor func(ctx context.Context, dir, ancestor, descendant string) (bool, error)
AtomicRenameRefs func(ctx context.Context, dir, source, destination, expected string) error
AttachHead func(ctx context.Context, dir, destination string) error
RefExists func(ctx context.Context, dir, ref string) (bool, error)
}
Dependencies are immutable bindings copied into one policy service.
type PagesSource ¶
type RepoMetadata ¶
type Repository ¶
type Repository struct {
Repository string `json:"repository"`
RepositoryID int64 `json:"repository_id,omitempty"`
ObservedDefault string `json:"observed_default,omitempty"`
VerifiedDefault string `json:"verified_default,omitempty"`
Desired string `json:"desired"`
OldHead string `json:"old_head,omitempty"`
NewHead string `json:"new_head,omitempty"`
Disposition string `json:"disposition"`
Error string `json:"error,omitempty"`
Archived bool `json:"archived,omitempty"`
Fork bool `json:"fork,omitempty"`
TargetExists bool `json:"target_exists,omitempty"`
RenameAccepted bool `json:"rename_accepted,omitempty"`
RecoveredFrom string `json:"recovered_from,omitempty"`
RecoveredSHA256 string `json:"recovered_sha256,omitempty"`
Archive *Archive `json:"archive_transition,omitempty"`
PagesBefore *PagesSource `json:"pages_before,omitempty"`
PagesAfter *PagesSource `json:"pages_after,omitempty"`
PagesPhase string `json:"pages_phase,omitempty"`
PagesAccepted bool `json:"pages_mutation_accepted,omitempty"`
WorkflowFiles []Workflow `json:"workflow_files,omitempty"`
WorkflowPhase string `json:"workflow_phase,omitempty"`
WorkflowCommit string `json:"workflow_commit_oid,omitempty"`
Impacts []string `json:"impacts,omitempty"`
Actions []string `json:"actions,omitempty"`
CanonicalClones []Canonical `json:"canonical_clones,omitempty"`
}
type Workflow ¶
type Workflow struct {
Path string `json:"path"`
BlobBefore string `json:"blob_before"`
SHA256Before string `json:"sha256_before"`
SHA256After string `json:"sha256_after"`
// contains filtered or unexported fields
}
defaultBranchWorkflow records a byte-preserving proposed replacement. The contents themselves never enter a report: the before/after SHA-256 values bind the report to the exact bytes that were read and verified.
Click to show internal directories.
Click to hide internal directories.