Documentation
¶
Index ¶
- Constants
- func BuildDefaultUploadPRBody(baseBranch string, subdirectory string) string
- func BuildDefaultUploadPRTitle(project string, fileCount int) string
- func BuildGitUploadBranchName(project string) string
- func BuildGitUploadTargetPath(subdirectory string, fileName string) string
- func BuildLFSPointerContent(checksum string, size int64) string
- func DefaultStorageChainValidationMode(probeMode string, bucketMode string) string
- func DeleteAuthzResource(ctx context.Context, authorizationHeader, resourcePath string) error
- func GitPathExistsInRef(repo *gogit.Repository, hash plumbing.Hash, path string) (bool, error)
- func NewProjectBucketInventoryCacheFromEnv() projectBucketInventoryCache
- func NewStorageChainAuditResponseCacheFromEnv() storageChainAuditResponseCache
- func NewStorageExactProjectJoinCacheFromEnv() storageExactProjectJoinCache
- func NormalizeGitUploadFileName(value string) (string, error)
- func NormalizeGitUploadSubdirectory(value string) string
- func NormalizeStorageChainBucketInventoryMode(raw string) (string, bool)
- func NormalizeStorageChainProbeMode(raw string) (string, bool)
- func NormalizeStorageChainValidationMode(raw string) (string, bool)
- func OpenRepository(path string) (*gogit.Repository, error)
- func OrganizationConfigurationState(appInstalled bool, configuredProjects int, totalProjects int) string
- func PersistRepoAnalyticsIndex(ctx context.Context, mirrorPath string, repo *gogit.Repository, ref string, ...) error
- func ProgramProjectResourcePath(organization, project string) string
- func RepoAnalyticsIndexPath(mirrorPath string) string
- func RepositoryIsEmpty(repo *gogit.Repository) bool
- func ResolveGitReference(repo *gogit.Repository, requestedRef string, defaultBranch string) (string, plumbing.Hash, error)
- func SyncRepositoryMirror(ctx context.Context, remoteURL string, mirrorPath string, ...) error
- type CalyprProjectInitializeResponse
- type CalyprProjectReadiness
- type CalyprProjectSetupRequest
- type CalyprProjectSetupResponse
- type CalyprProjectStorageIntent
- type CalyprProjectStorageRequest
- type CalyprProjectStorageResponse
- type CalyprReadinessCheck
- type Error
- type ErrorKind
- type GitAuditEvidence
- type GitHubInstallationRepository
- type GitHubRepositoryMetadata
- type GitLFSPointerInfo
- type GitManifestResponseOptions
- type GitOnlySyfonRegistrationRequest
- type GitOnlySyfonRegistrationResponse
- type GitOnlySyfonRegistrationResult
- type GitOrganizationConnectResponse
- type GitOrganizationProjectStatus
- type GitOrganizationStatusResponse
- type GitOrganizationsStatusResponse
- type GitProjectDiffAuditRequest
- type GitProjectDiffAuditResponse
- type GitProjectDiffFinding
- type GitProjectDiffSummary
- type GitProjectFileResponse
- type GitProjectManifestResponse
- type GitProjectRefreshResponse
- type GitProjectRefsResponse
- type GitProjectStatusResponse
- type GitProjectTreeResponse
- type GitRef
- type GitRepoAnalyticsChild
- type GitRepoAnalyticsDirectory
- type GitRepoAnalyticsIndexSidecar
- type GitRepositoryIdentity
- type GitRepositoryInstallationStatus
- type GitService
- func (service *GitService) CreateGitHubUploadPullRequest(ctx context.Context, authorizationHeader string, organization string, ...) (string, string, error)
- func (service *GitService) EnsureDataDir() error
- func (service *GitService) FetchRepositoryMetadata(ctx context.Context, accessToken string, identity GitRepositoryIdentity) (*GitHubRepositoryMetadata, error)
- func (service *GitService) GetGitHubFileMetadata(ctx context.Context, authorizationHeader string, organization string, ...) (*github.RepositoryContent, []byte, error)
- func (service *GitService) Init(db *sqlx.DB) error
- func (service *GitService) ListInstallationRepositories(ctx context.Context, authorizationHeader string, organization string, ...) ([]GitHubInstallationRepository, error)
- func (service *GitService) MirrorPathForIdentity(identity GitRepositoryIdentity) string
- func (service *GitService) RefreshProject(ctx context.Context, projectID string, identity GitRepositoryIdentity, ...) (*GitProjectRefreshResponse, *geckodb.GitProjectState, error)
- func (service *GitService) RequestInstallationToken(ctx context.Context, authorizationHeader string, organization string, ...) (string, error)
- func (service *GitService) RequestInstallationURL(ctx context.Context, authorizationHeader string, owner string, ...) (string, error)
- func (service *GitService) RequestOrganizationInstallationStatus(ctx context.Context, authorizationHeader string, organization string, ...) (GitRepositoryInstallationStatus, error)
- func (service *GitService) ResolveTargetAndRepositoryIDs(ctx context.Context, identity GitRepositoryIdentity) (int64, int64, error)
- func (service *GitService) StatusFromState(projectID string, organization string, project string, ...) GitProjectStatusResponse
- type GitServiceConfig
- type GitStorageChainAuditRequest
- type GitStorageChainAuditResponse
- type GitStorageChainAuditSummary
- type GitStorageChainFinding
- type GitStorageChainIssueGroup
- type GitStorageChildResponseItem
- type GitStorageChildrenResponse
- type GitStorageCleanupAccessMethod
- type GitStorageCleanupAccessProbe
- type GitStorageCleanupApplyAction
- type GitStorageCleanupApplyFinding
- type GitStorageCleanupApplyRequest
- type GitStorageCleanupApplyResponse
- type GitStorageCleanupAuditRequest
- type GitStorageCleanupAuditResponse
- type GitStorageCleanupAuditSummary
- type GitStorageCleanupFinding
- type GitStorageCleanupPurgeResult
- type GitStorageCleanupRecordAudit
- type GitStorageFolderResponse
- type GitStorageSummaryResponse
- type GitTreeEntry
- type GitTreeResponseOptions
- type GitUploadSessionAttachFilesRequest
- type GitUploadSessionCreateRequest
- type GitUploadSessionFileAttachment
- type GitUploadSessionFileManifest
- type GitUploadSessionFileStatus
- type GitUploadSessionFinalizeRequest
- type GitUploadSessionResponse
- type HTTPStatusError
- type ProjectIntegrationCheck
- type ProjectIntegrationStatus
- type ReconcileService
- func (service *ReconcileService) BuildOrganizationStatus(ctx context.Context, organization string, projectIDs []string, ...) (GitOrganizationStatusResponse, error)
- func (service *ReconcileService) BuildOrganizationsStatus(ctx context.Context, authorizationHeader string, projectIDs []string, ...) (GitOrganizationsStatusResponse, error)
- func (service *ReconcileService) BuildSingleOrganizationStatus(ctx context.Context, authorizationHeader string, organization string, ...) (GitOrganizationStatusResponse, error)
- func (service *ReconcileService) ReconcileOrganization(ctx context.Context, organization string, authorizationHeader string, ...) error
- func (service *ReconcileService) ReconcileOrganizations(ctx context.Context, authorizationHeader string, projectIDs []string) error
- type RepoInventoryFile
- type SetupService
- func (service *SetupService) CleanupProjectStorage(ctx context.Context, authorizationHeader, organization, project string) error
- func (service *SetupService) InitializeProject(ctx context.Context, authorizationHeader, organization, project string, ...) (*CalyprProjectInitializeResponse, error)
- func (service *SetupService) PopulateStorage(ctx context.Context, authorizationHeader, organization, project string, ...) (*CalyprProjectStorageResponse, error)
- func (service *SetupService) PopulateStorageIntent(ctx context.Context, authorizationHeader string, ...) error
- func (service *SetupService) StorageCheck(ctx context.Context, authorizationHeader, organization, project string) (ProjectIntegrationCheck, error)
- type StorageAnalyticsService
- func (service *StorageAnalyticsService) ApplyStorageCleanup(ctx context.Context, authorizationHeader string, organization string, ...) (*GitStorageCleanupApplyResponse, error)
- func (service *StorageAnalyticsService) BuildProjectDiffAudit(ctx context.Context, authorizationHeader string, organization string, ...) (*GitProjectDiffAuditResponse, error)
- func (service *StorageAnalyticsService) BuildStorageChainAuditWithOptions(ctx context.Context, authorizationHeader string, organization string, ...) (*GitStorageChainAuditResponse, error)
- func (service *StorageAnalyticsService) BuildStorageChildren(ctx context.Context, authorizationHeader string, organization string, ...) (*GitStorageChildrenResponse, error)
- func (service *StorageAnalyticsService) BuildStorageCleanupAudit(ctx context.Context, authorizationHeader string, organization string, ...) (*GitStorageCleanupAuditResponse, *cleanupAuditModel, error)
- func (service *StorageAnalyticsService) BuildStorageFolder(ctx context.Context, authorizationHeader string, organization string, ...) (*GitStorageFolderResponse, error)
- func (service *StorageAnalyticsService) BuildStorageSummary(ctx context.Context, authorizationHeader string, organization string, ...) (*GitStorageSummaryResponse, error)
- func (service *StorageAnalyticsService) EnableStorageChainAuditResponseCacheFromEnv()
- func (service *StorageAnalyticsService) RegisterGitOnlySyfonRecords(ctx context.Context, authorizationHeader string, organization string, ...) (*GitOnlySyfonRegistrationResponse, error)
- type StorageBucket
- type StorageChainAuditOptions
- type StorageChainAuditStageTiming
- type StorageChainAuditTimings
- func (timings *StorageChainAuditTimings) Record(stage string, duration time.Duration)
- func (timings *StorageChainAuditTimings) RecordMemory(stage string, fields ...any)
- func (timings *StorageChainAuditTimings) Snapshot() []StorageChainAuditStageTiming
- func (timings *StorageChainAuditTimings) StageStart(stage string)
- type StorageConfig
- type StorageFolderTimings
Constants ¶
const ( StorageChainProbeModeFull = "full" StorageChainProbeModeInventoryOnly = "inventory_only" StorageChainBucketModeItems = "items" StorageChainBucketModeValidate = "validate" StorageChainValidationModeList = "list" StorageChainValidationModeMetadata = "metadata" StorageChainValidationModeInventory = "inventory" )
const ( GitSyncNeverSynced = "never_synced" GitSyncReady = "ready" GitSyncUpdating = "updating" GitSyncError = "error" GitInstallationNotConnected = "not_connected" GitInstallationConnected = "connected" GitWorkflowStageAwaitingGitHubConnect = "awaiting_github_connect" GitWorkflowStageGitHubConnected = "github_connected" )
const ( GitUploadSessionPending = "pending_upload" GitUploadSessionReady = "ready_for_pr" GitUploadSessionFinalized = "finalized" GitUploadFilePending = "pending_upload" GitUploadFileUploaded = "uploaded" GitUploadFileCollision = "collision" )
const StorageFolderSummaryModeExact = "exact"
const StorageFolderSummarySourceExactJoin = "exact_join"
const StorageFolderSummarySourceGitIndex = "git_index"
Variables ¶
This section is empty.
Functions ¶
func BuildLFSPointerContent ¶
func DeleteAuthzResource ¶
func GitPathExistsInRef ¶
func NewProjectBucketInventoryCacheFromEnv ¶
func NewProjectBucketInventoryCacheFromEnv() projectBucketInventoryCache
func NewStorageChainAuditResponseCacheFromEnv ¶
func NewStorageChainAuditResponseCacheFromEnv() storageChainAuditResponseCache
func NewStorageExactProjectJoinCacheFromEnv ¶
func NewStorageExactProjectJoinCacheFromEnv() storageExactProjectJoinCache
func OpenRepository ¶
func OpenRepository(path string) (*gogit.Repository, error)
func RepoAnalyticsIndexPath ¶
func RepositoryIsEmpty ¶
func RepositoryIsEmpty(repo *gogit.Repository) bool
func ResolveGitReference ¶
Types ¶
type CalyprProjectReadiness ¶
type CalyprProjectReadiness struct {
Git CalyprReadinessCheck `json:"git"`
Syfon CalyprReadinessCheck `json:"syfon"`
Config CalyprReadinessCheck `json:"config"`
}
type CalyprProjectSetupRequest ¶
type CalyprProjectSetupRequest struct {
Config appconfig.ProjectConfig `json:"config"`
Storage *CalyprProjectStorageIntent `json:"storage,omitempty"`
}
type CalyprProjectSetupResponse ¶
type CalyprProjectSetupResponse struct {
ProjectID string `json:"project_id"`
ResourcePath string `json:"resource_path"`
Configured bool `json:"configured"`
Readiness CalyprProjectReadiness `json:"readiness"`
}
type CalyprProjectStorageIntent ¶
type CalyprProjectStorageIntent struct {
Bucket string `json:"bucket"`
Provider string `json:"provider"`
Endpoint string `json:"endpoint"`
Region string `json:"region"`
AccessKey string `json:"access_key"`
SecretKey string `json:"secret_key"`
Organization string `json:"organization"`
ProjectID string `json:"project_id"`
Path string `json:"path,omitempty"`
PathPrefix string `json:"path_prefix,omitempty"`
OrganizationSubPath string `json:"organization_sub_path,omitempty"`
ProjectSubPath string `json:"project_sub_path,omitempty"`
}
type CalyprProjectStorageRequest ¶
type CalyprProjectStorageRequest struct {
Storage *CalyprProjectStorageIntent `json:"storage"`
}
type CalyprProjectStorageResponse ¶
type CalyprProjectStorageResponse struct {
Success bool `json:"success"`
ProjectID string `json:"project_id"`
ResourcePath string `json:"resource_path"`
Storage ProjectIntegrationCheck `json:"storage"`
}
type CalyprReadinessCheck ¶
type GitAuditEvidence ¶
type GitAuditEvidence = storageaudit.Evidence
type GitHubInstallationRepository ¶
type GitHubInstallationRepository = domain.GitHubInstallationRepository
GitHubInstallationRepository is an alias for domain.GitHubInstallationRepository.
type GitHubRepositoryMetadata ¶
type GitHubRepositoryMetadata = domain.GitHubRepositoryMetadata
GitHubRepositoryMetadata is an alias for domain.GitHubRepositoryMetadata.
type GitLFSPointerInfo ¶
type GitLFSPointerInfo struct {
Version string `json:"version"`
OID string `json:"oid"`
Size int64 `json:"size"`
}
func ParseGitLFSPointer ¶
func ParseGitLFSPointer(content []byte) *GitLFSPointerInfo
type GitOnlySyfonRegistrationRequest ¶
type GitOnlySyfonRegistrationRequest = storageaudit.GitOnlySyfonRegistrationRequest
type GitOnlySyfonRegistrationResponse ¶
type GitOnlySyfonRegistrationResponse = storageaudit.GitOnlySyfonRegistrationResponse
type GitOnlySyfonRegistrationResult ¶
type GitOnlySyfonRegistrationResult = storageaudit.GitOnlySyfonRegistrationResult
type GitOrganizationConnectResponse ¶
type GitOrganizationConnectResponse struct {
Mode string `json:"mode"`
RedirectURL string `json:"redirect_url,omitempty"`
InstallationID *int64 `json:"installation_id,omitempty"`
Repositories []GitHubInstallationRepository `json:"repositories,omitempty"`
}
type GitOrganizationProjectStatus ¶
type GitOrganizationProjectStatus struct {
ProjectID string `json:"project_id"`
Project string `json:"project"`
ResourcePath string `json:"resource_path"`
Repository GitRepositoryIdentity `json:"repository"`
WorkflowStage string `json:"workflow_stage,omitempty"`
Configured bool `json:"configured"`
Readiness *CalyprProjectReadiness `json:"readiness,omitempty"`
Integrations ProjectIntegrationStatus `json:"integrations"`
Accessible bool `json:"accessible"`
CanManageSettings bool `json:"can_manage_settings"`
RequestAccess bool `json:"request_access"`
RequestAccessResourcePath string `json:"request_access_resource_path,omitempty"`
Installation GitRepositoryInstallationStatus `json:"installation"`
}
type GitOrganizationStatusResponse ¶
type GitOrganizationStatusResponse struct {
Organization string `json:"organization"`
Connected bool `json:"connected"`
AppInstalled bool `json:"app_installed"`
CanAccessSettings bool `json:"can_access_settings"`
CanCreateProjects bool `json:"can_create_projects"`
CanManagePeople bool `json:"can_manage_people"`
CanDeleteOrg bool `json:"can_delete_org"`
InstallationID *int64 `json:"installation_id,omitempty"`
HTMLURL string `json:"html_url,omitempty"`
RepositorySelection string `json:"repository_selection,omitempty"`
ConfigurationState string `json:"configuration_state"`
ConnectedProjects int `json:"connected_projects"`
ConfiguredProjects int `json:"configured_projects"`
TotalProjects int `json:"total_projects"`
Projects []GitOrganizationProjectStatus `json:"projects"`
}
type GitOrganizationsStatusResponse ¶
type GitOrganizationsStatusResponse struct {
Connected bool `json:"connected"`
AppInstalled bool `json:"app_installed"`
ConnectedOrganizations int `json:"connected_organizations"`
InstalledOrganizations int `json:"installed_organizations"`
TotalOrganizations int `json:"total_organizations"`
ConnectedProjects int `json:"connected_projects"`
ConfiguredProjects int `json:"configured_projects"`
TotalProjects int `json:"total_projects"`
ConfigurationState string `json:"configuration_state"`
Organizations []GitOrganizationStatusResponse `json:"organizations"`
}
type GitProjectDiffAuditRequest ¶
type GitProjectDiffAuditRequest = storageaudit.ProjectDiffAuditRequest
type GitProjectDiffAuditResponse ¶
type GitProjectDiffAuditResponse = storageaudit.ProjectDiffAuditResponse
type GitProjectDiffFinding ¶
type GitProjectDiffFinding = storageaudit.ProjectDiffFinding
type GitProjectDiffSummary ¶
type GitProjectDiffSummary = storageaudit.ProjectDiffSummary
type GitProjectFileResponse ¶
type GitProjectFileResponse struct {
ProjectID string `json:"project_id"`
Ref string `json:"ref"`
Path string `json:"path"`
Name string `json:"name"`
Hash string `json:"hash"`
Size int64 `json:"size"`
HTMLURL string `json:"html_url,omitempty"`
DownloadURL string `json:"download_url,omitempty"`
LFSPointer *GitLFSPointerInfo `json:"lfs_pointer,omitempty"`
}
func BuildGitHubFileResponse ¶
func BuildGitHubFileResponse(projectID string, ref string, path string, metadata *github.RepositoryContent, contentBytes []byte) *GitProjectFileResponse
type GitProjectManifestResponse ¶
type GitProjectManifestResponse struct {
ProjectID string `json:"project_id"`
Ref string `json:"ref"`
Path string `json:"path"`
EntryCount int `json:"entry_count"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor,omitempty"`
Entries []GitTreeEntry `json:"entries"`
}
func BuildGitManifestResponse ¶
func BuildGitManifestResponse(projectID string, ref string, path string, repo *gogit.Repository, hash plumbing.Hash, options GitManifestResponseOptions) (*GitProjectManifestResponse, error)
type GitProjectRefsResponse ¶
type GitProjectRefsResponse struct {
ProjectID string `json:"project_id"`
DefaultBranch string `json:"default_branch,omitempty"`
Refs []GitRef `json:"refs"`
}
func BuildGitRefsResponse ¶
func BuildGitRefsResponse(projectID string, defaultBranch string, repo *gogit.Repository) (*GitProjectRefsResponse, error)
type GitProjectStatusResponse ¶
type GitProjectStatusResponse struct {
ProjectID string `json:"project_id"`
Organization string `json:"organization"`
Project string `json:"project"`
ResourcePath string `json:"resource_path"`
Accessible bool `json:"accessible"`
RequestAccess bool `json:"request_access"`
RequestAccessResourcePath string `json:"request_access_resource_path,omitempty"`
Config appconfig.ProjectConfig `json:"config"`
Repository GitRepositoryIdentity `json:"repository"`
WorkflowStage string `json:"workflow_stage,omitempty"`
InstallationState string `json:"installation_state"`
InstallationID *int64 `json:"installation_id,omitempty"`
InstallationTarget string `json:"installation_target,omitempty"`
InstallationTargetType string `json:"installation_target_type,omitempty"`
OrganizationAppInstalled bool `json:"organization_app_installed"`
OrganizationHTMLURL string `json:"organization_html_url,omitempty"`
OrganizationRepositorySelection string `json:"organization_repository_selection,omitempty"`
SyncState string `json:"sync_state"`
DefaultBranch string `json:"default_branch,omitempty"`
LastRefreshedAt *time.Time `json:"last_refreshed_at,omitempty"`
LastError string `json:"last_error,omitempty"`
MirrorReady bool `json:"mirror_ready"`
}
type GitProjectTreeResponse ¶
type GitProjectTreeResponse struct {
ProjectID string `json:"project_id"`
Ref string `json:"ref"`
Path string `json:"path"`
EntryCount int `json:"entry_count"`
Truncated bool `json:"truncated,omitempty"`
Entries []GitTreeEntry `json:"entries"`
}
func BuildGitTreeResponse ¶
func BuildGitTreeResponse(projectID string, ref string, path string, repo *gogit.Repository, hash plumbing.Hash, options GitTreeResponseOptions) (*GitProjectTreeResponse, error)
type GitRepoAnalyticsChild ¶
type GitRepoAnalyticsDirectory ¶
type GitRepoAnalyticsDirectory struct {
Path string `json:"path"`
DirectChildCount int `json:"direct_child_count"`
FileCount int `json:"file_count"`
TotalBytes int64 `json:"total_bytes"`
Children []GitRepoAnalyticsChild `json:"children"`
}
type GitRepoAnalyticsIndexSidecar ¶
type GitRepoAnalyticsIndexSidecar struct {
SchemaVersion int `json:"schema_version"`
CommitHash string `json:"commit_hash"`
RefName string `json:"ref_name"`
GeneratedAt time.Time `json:"generated_at"`
Files []RepoInventoryFile `json:"files"`
Directories []GitRepoAnalyticsDirectory `json:"directories"`
}
type GitRepositoryIdentity ¶
type GitRepositoryIdentity = domain.GitRepositoryIdentity
GitRepositoryIdentity is an alias for domain.GitRepositoryIdentity.
func ParseRepositoryIdentity ¶
func ParseRepositoryIdentity(raw string) (GitRepositoryIdentity, error)
type GitRepositoryInstallationStatus ¶
type GitRepositoryInstallationStatus = domain.GitRepositoryInstallationStatus
GitRepositoryInstallationStatus is an alias for domain.GitRepositoryInstallationStatus.
type GitService ¶
type GitService struct {
// contains filtered or unexported fields
}
func NewGitService ¶
func NewGitService(config GitServiceConfig) *GitService
func (*GitService) CreateGitHubUploadPullRequest ¶
func (service *GitService) CreateGitHubUploadPullRequest( ctx context.Context, authorizationHeader string, organization string, project string, identity GitRepositoryIdentity, baseBranch string, branchName string, title string, body string, files []geckodb.GitUploadSessionFile, ) (string, string, error)
func (*GitService) EnsureDataDir ¶
func (service *GitService) EnsureDataDir() error
func (*GitService) FetchRepositoryMetadata ¶
func (service *GitService) FetchRepositoryMetadata(ctx context.Context, accessToken string, identity GitRepositoryIdentity) (*GitHubRepositoryMetadata, error)
func (*GitService) GetGitHubFileMetadata ¶
func (service *GitService) GetGitHubFileMetadata(ctx context.Context, authorizationHeader string, organization string, project string, identity GitRepositoryIdentity, ref string, path string) (*github.RepositoryContent, []byte, error)
func (*GitService) ListInstallationRepositories ¶
func (service *GitService) ListInstallationRepositories(ctx context.Context, authorizationHeader string, organization string, owner string, installationID int64) ([]GitHubInstallationRepository, error)
func (*GitService) MirrorPathForIdentity ¶
func (service *GitService) MirrorPathForIdentity(identity GitRepositoryIdentity) string
func (*GitService) RefreshProject ¶
func (service *GitService) RefreshProject(ctx context.Context, projectID string, identity GitRepositoryIdentity, state *geckodb.GitProjectState, accessToken string) (*GitProjectRefreshResponse, *geckodb.GitProjectState, error)
func (*GitService) RequestInstallationToken ¶
func (service *GitService) RequestInstallationToken(ctx context.Context, authorizationHeader string, organization string, project string, identity GitRepositoryIdentity, access string) (string, error)
func (*GitService) RequestInstallationURL ¶
func (*GitService) RequestOrganizationInstallationStatus ¶
func (service *GitService) RequestOrganizationInstallationStatus(ctx context.Context, authorizationHeader string, organization string, owner string) (GitRepositoryInstallationStatus, error)
func (*GitService) ResolveTargetAndRepositoryIDs ¶
func (service *GitService) ResolveTargetAndRepositoryIDs(ctx context.Context, identity GitRepositoryIdentity) (int64, int64, error)
func (*GitService) StatusFromState ¶
func (service *GitService) StatusFromState(projectID string, organization string, project string, cfg appconfig.ProjectConfig, identity GitRepositoryIdentity, state *geckodb.GitProjectState, orgState *geckodb.GitOrganizationState) GitProjectStatusResponse
type GitServiceConfig ¶
type GitStorageChainAuditRequest ¶
type GitStorageChainAuditRequest = storageaudit.ChainAuditRequest
type GitStorageChainAuditResponse ¶
type GitStorageChainAuditResponse = storageaudit.ChainAuditResponse
type GitStorageChainAuditSummary ¶
type GitStorageChainAuditSummary = storageaudit.ChainSummary
type GitStorageChainFinding ¶
type GitStorageChainFinding = storageaudit.ChainFinding
type GitStorageChainIssueGroup ¶
type GitStorageChainIssueGroup = storageaudit.ChainIssueGroup
type GitStorageChildResponseItem ¶
type GitStorageChildResponseItem struct {
Name string `json:"name"`
Path string `json:"path"`
Type string `json:"type"`
FileCount int `json:"file_count"`
RecordCount int `json:"record_count"`
TotalBytes int64 `json:"total_bytes"`
DownloadCount int64 `json:"download_count"`
LastDownloadTime string `json:"last_download_time,omitempty"`
LatestUpdateTime string `json:"latest_update_time,omitempty"`
}
type GitStorageChildrenResponse ¶
type GitStorageChildrenResponse struct {
Items []GitStorageChildResponseItem `json:"items"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor,omitempty"`
}
type GitStorageCleanupAccessMethod ¶
type GitStorageCleanupAccessMethod = storageaudit.CleanupAccessMethod
type GitStorageCleanupAccessProbe ¶
type GitStorageCleanupAccessProbe = storageaudit.CleanupAccessProbe
type GitStorageCleanupApplyAction ¶
type GitStorageCleanupApplyAction = storageaudit.CleanupApplyAction
type GitStorageCleanupApplyFinding ¶
type GitStorageCleanupApplyFinding = storageaudit.CleanupApplyFinding
type GitStorageCleanupApplyRequest ¶
type GitStorageCleanupApplyRequest = storageaudit.CleanupApplyRequest
type GitStorageCleanupApplyResponse ¶
type GitStorageCleanupApplyResponse = storageaudit.CleanupApplyResponse
type GitStorageCleanupAuditRequest ¶
type GitStorageCleanupAuditRequest = storageaudit.CleanupAuditRequest
type GitStorageCleanupAuditResponse ¶
type GitStorageCleanupAuditResponse = storageaudit.CleanupAuditResponse
type GitStorageCleanupAuditSummary ¶
type GitStorageCleanupAuditSummary = storageaudit.CleanupAuditSummary
type GitStorageCleanupFinding ¶
type GitStorageCleanupFinding = storageaudit.CleanupFinding
type GitStorageCleanupPurgeResult ¶
type GitStorageCleanupPurgeResult = storageaudit.CleanupPurgeResult
type GitStorageCleanupRecordAudit ¶
type GitStorageCleanupRecordAudit = storageaudit.CleanupRecordAudit
type GitStorageFolderResponse ¶
type GitStorageFolderResponse struct {
Summary GitStorageSummaryResponse `json:"summary"`
Children GitStorageChildrenResponse `json:"children"`
}
type GitStorageSummaryResponse ¶
type GitStorageSummaryResponse struct {
Path string `json:"path"`
Source string `json:"source,omitempty"`
FileCount int `json:"file_count"`
RecordCount int `json:"record_count"`
DirectChildCount int `json:"direct_child_count"`
TotalBytes int64 `json:"total_bytes"`
DownloadCount int64 `json:"download_count"`
LastDownloadTime string `json:"last_download_time,omitempty"`
LatestUpdateTime string `json:"latest_update_time,omitempty"`
DuplicatePathCount int `json:"duplicate_path_count"`
}
type GitTreeEntry ¶
type GitTreeResponseOptions ¶
type GitUploadSessionAttachFilesRequest ¶
type GitUploadSessionAttachFilesRequest struct {
Files []GitUploadSessionFileAttachment `json:"files"`
}
type GitUploadSessionCreateRequest ¶
type GitUploadSessionCreateRequest struct {
BaseBranch string `json:"base_branch"`
TargetSubdir string `json:"target_subdirectory"`
Files []GitUploadSessionFileManifest `json:"files"`
}
type GitUploadSessionFileStatus ¶
type GitUploadSessionFileStatus struct {
FileName string `json:"file_name"`
TargetPath string `json:"target_path"`
Size int64 `json:"size"`
Checksum string `json:"checksum,omitempty"`
DRSObjectID string `json:"drs_object_id,omitempty"`
Status string `json:"status"`
Error string `json:"error,omitempty"`
Collision bool `json:"collision"`
}
type GitUploadSessionResponse ¶
type GitUploadSessionResponse struct {
SessionID string `json:"session_id"`
ProjectID string `json:"project_id"`
BaseBranch string `json:"base_branch"`
TargetSubdir string `json:"target_subdirectory,omitempty"`
BranchName string `json:"branch_name"`
PRTitle string `json:"pr_title"`
PRBody string `json:"pr_body"`
Status string `json:"status"`
PullRequestURL string `json:"pull_request_url,omitempty"`
CommitSHA string `json:"commit_sha,omitempty"`
Files []GitUploadSessionFileStatus `json:"files"`
HasConflicts bool `json:"has_conflicts"`
}
func BuildGitUploadSessionResponse ¶
func BuildGitUploadSessionResponse(session geckodb.GitUploadSession, files []geckodb.GitUploadSessionFile) GitUploadSessionResponse
type HTTPStatusError ¶
type HTTPStatusError = domain.HTTPStatusError
HTTPStatusError is an alias for domain.HTTPStatusError.
type ProjectIntegrationCheck ¶
type ProjectIntegrationStatus ¶
type ProjectIntegrationStatus struct {
GitHub ProjectIntegrationCheck `json:"github"`
Storage ProjectIntegrationCheck `json:"storage"`
}
type ReconcileService ¶
type ReconcileService struct {
// contains filtered or unexported fields
}
func NewReconcileService ¶
func NewReconcileService(db *sqlx.DB, storage *syfon.Manager, gitService *GitService) *ReconcileService
func (*ReconcileService) BuildOrganizationStatus ¶
func (service *ReconcileService) BuildOrganizationStatus(ctx context.Context, organization string, projectIDs []string, projectStates map[string]geckodb.GitProjectState, organizationStates map[string]geckodb.GitOrganizationState, allowedResources []string, buckets map[string]StorageBucket, bucketsErr error) (GitOrganizationStatusResponse, error)
func (*ReconcileService) BuildOrganizationsStatus ¶
func (service *ReconcileService) BuildOrganizationsStatus(ctx context.Context, authorizationHeader string, projectIDs []string, allowedResources []string) (GitOrganizationsStatusResponse, error)
func (*ReconcileService) BuildSingleOrganizationStatus ¶
func (service *ReconcileService) BuildSingleOrganizationStatus(ctx context.Context, authorizationHeader string, organization string, projectIDs []string, allowedResources []string) (GitOrganizationStatusResponse, error)
func (*ReconcileService) ReconcileOrganization ¶
func (*ReconcileService) ReconcileOrganizations ¶
type RepoInventoryFile ¶
type SetupService ¶
type SetupService struct {
// contains filtered or unexported fields
}
func NewSetupService ¶
func NewSetupService(db *sqlx.DB, gitService *GitService, storage *syfon.Manager, accessChecks *servermw.FenceUserAccessHandler) *SetupService
func (*SetupService) CleanupProjectStorage ¶
func (service *SetupService) CleanupProjectStorage(ctx context.Context, authorizationHeader, organization, project string) error
func (*SetupService) InitializeProject ¶
func (service *SetupService) InitializeProject(ctx context.Context, authorizationHeader, organization, project string, request CalyprProjectSetupRequest) (*CalyprProjectInitializeResponse, error)
func (*SetupService) PopulateStorage ¶
func (service *SetupService) PopulateStorage(ctx context.Context, authorizationHeader, organization, project string, request CalyprProjectStorageRequest) (*CalyprProjectStorageResponse, error)
func (*SetupService) PopulateStorageIntent ¶
func (service *SetupService) PopulateStorageIntent(ctx context.Context, authorizationHeader string, intent *CalyprProjectStorageIntent) error
func (*SetupService) StorageCheck ¶
func (service *SetupService) StorageCheck(ctx context.Context, authorizationHeader, organization, project string) (ProjectIntegrationCheck, error)
type StorageAnalyticsService ¶
type StorageAnalyticsService struct {
// contains filtered or unexported fields
}
func NewStorageAnalyticsService ¶
func NewStorageAnalyticsService(storage storageAnalyticsBackend) *StorageAnalyticsService
func (*StorageAnalyticsService) ApplyStorageCleanup ¶
func (service *StorageAnalyticsService) ApplyStorageCleanup(ctx context.Context, authorizationHeader string, organization string, project string, selectedRepoPaths []string, selectedActions []GitStorageCleanupApplyAction, selectedFindings []GitStorageCleanupApplyFinding, deleteRepoOrphans bool, deleteStaleDuplicates bool, deleteBucketOnlyObjects bool, repairBrokenBucketMappings bool, dryRun bool) (*GitStorageCleanupApplyResponse, error)
func (*StorageAnalyticsService) BuildProjectDiffAudit ¶
func (service *StorageAnalyticsService) BuildProjectDiffAudit(ctx context.Context, authorizationHeader string, organization string, project string, ref string, gitSubpath string, mirrorPath string, repo *gogit.Repository, hash plumbing.Hash) (*GitProjectDiffAuditResponse, error)
func (*StorageAnalyticsService) BuildStorageChainAuditWithOptions ¶
func (service *StorageAnalyticsService) BuildStorageChainAuditWithOptions(ctx context.Context, authorizationHeader string, organization string, project string, ref string, gitSubpath string, mirrorPath string, repo *gogit.Repository, hash plumbing.Hash, options StorageChainAuditOptions) (*GitStorageChainAuditResponse, error)
func (*StorageAnalyticsService) BuildStorageChildren ¶
func (service *StorageAnalyticsService) BuildStorageChildren(ctx context.Context, authorizationHeader string, organization string, project string, ref string, gitSubpath string, mirrorPath string, repo *gogit.Repository, hash plumbing.Hash, limit int, sortBy string, sortOrder string, cursor string) (*GitStorageChildrenResponse, error)
func (*StorageAnalyticsService) BuildStorageCleanupAudit ¶
func (service *StorageAnalyticsService) BuildStorageCleanupAudit(ctx context.Context, authorizationHeader string, organization string, project string, ref string, gitSubpath string, selectedRepoPaths []string, mirrorPath string, repo *gogit.Repository, hash plumbing.Hash, checkStorage bool) (*GitStorageCleanupAuditResponse, *cleanupAuditModel, error)
func (*StorageAnalyticsService) BuildStorageFolder ¶
func (service *StorageAnalyticsService) BuildStorageFolder(ctx context.Context, authorizationHeader string, organization string, project string, ref string, gitSubpath string, mirrorPath string, repo *gogit.Repository, hash plumbing.Hash, limit int, sortBy string, sortOrder string, cursor string, summaryMode string, forceRefresh bool, timings *StorageFolderTimings) (*GitStorageFolderResponse, error)
func (*StorageAnalyticsService) BuildStorageSummary ¶
func (service *StorageAnalyticsService) BuildStorageSummary(ctx context.Context, authorizationHeader string, organization string, project string, ref string, gitSubpath string, mirrorPath string, repo *gogit.Repository, hash plumbing.Hash) (*GitStorageSummaryResponse, error)
func (*StorageAnalyticsService) EnableStorageChainAuditResponseCacheFromEnv ¶
func (service *StorageAnalyticsService) EnableStorageChainAuditResponseCacheFromEnv()
func (*StorageAnalyticsService) RegisterGitOnlySyfonRecords ¶
func (service *StorageAnalyticsService) RegisterGitOnlySyfonRecords(ctx context.Context, authorizationHeader string, organization string, project string, ref string, mirrorPath string, repo *gogit.Repository, hash plumbing.Hash, request GitOnlySyfonRegistrationRequest) (*GitOnlySyfonRegistrationResponse, error)
RegisterGitOnlySyfonRecords restores only missing Syfon records. It always re-reads the Git LFS pointer, confirms the current scoped bucket object, and rejects size drift before sending a DRS registration request to Syfon.
type StorageBucket ¶
type StorageBucket = domain.StorageBucket
StorageBucket is an alias for domain.StorageBucket.
type StorageChainAuditTimings ¶
type StorageChainAuditTimings struct {
Logf func(format string, args ...any)
DebugPrefix string
// contains filtered or unexported fields
}
func (*StorageChainAuditTimings) Record ¶
func (timings *StorageChainAuditTimings) Record(stage string, duration time.Duration)
func (*StorageChainAuditTimings) RecordMemory ¶
func (timings *StorageChainAuditTimings) RecordMemory(stage string, fields ...any)
func (*StorageChainAuditTimings) Snapshot ¶
func (timings *StorageChainAuditTimings) Snapshot() []StorageChainAuditStageTiming
func (*StorageChainAuditTimings) StageStart ¶
func (timings *StorageChainAuditTimings) StageStart(stage string)
type StorageConfig ¶
type StorageConfig = domain.StorageConfig
StorageConfig is an alias for domain.StorageConfig.
Source Files
¶
- errors.go
- github_logging.go
- reconcile.go
- repository.go
- response.go
- service.go
- setup.go
- storage_analytics.go
- storage_analytics_pipeline.go
- storage_analytics_timing.go
- storage_audit_evidence.go
- storage_audit_registration.go
- storage_audit_revalidation.go
- storage_chain_audit_cache.go
- storage_children.go
- storage_index.go
- tree_enrichment.go
- types.go
- upload.go