Documentation
¶
Index ¶
- func RegisterGitOpsSyncs(api huma.API, syncService *GitOpsSyncService)
- type BackupHistoryInput
- type BackupPreviewInput
- type BackupRevisionInput
- type BrowseSyncFilesInput
- type CreateGitOpsSyncInput
- type DeleteGitOpsSyncInput
- type GetGitOpsSyncInput
- type GetSyncStatusInput
- type GitOpsSyncActionInput
- type GitOpsSyncHandler
- func (h *GitOpsSyncHandler) BackupHistory(ctx context.Context, input *BackupHistoryInput) (*handlerutil.Out[types.GitOpsBackupHistoryResponse], error)
- func (h *GitOpsSyncHandler) BackupRevision(ctx context.Context, input *BackupRevisionInput) (*handlerutil.Out[types.GitOpsBackupRevision], error)
- func (h *GitOpsSyncHandler) BrowseFiles(ctx context.Context, input *BrowseSyncFilesInput) (*handlerutil.Out[types.GitOpsBrowseResponse], error)
- func (h *GitOpsSyncHandler) CreateSync(ctx context.Context, input *CreateGitOpsSyncInput) (*handlerutil.Out[types.GitOpsSync], error)
- func (h *GitOpsSyncHandler) DeleteSync(ctx context.Context, input *DeleteGitOpsSyncInput) (*handlerutil.Out[types.MessageResponse], error)
- func (h *GitOpsSyncHandler) GetStatus(ctx context.Context, input *GetSyncStatusInput) (*handlerutil.Out[types.GitOpsSyncStatus], error)
- func (h *GitOpsSyncHandler) GetSync(ctx context.Context, input *GetGitOpsSyncInput) (*handlerutil.Out[types.GitOpsSync], error)
- func (h *GitOpsSyncHandler) ImportSyncs(ctx context.Context, input *ImportGitOpsSyncsInput) (*handlerutil.Out[types.ImportGitOpsSyncResponse], error)
- func (h *GitOpsSyncHandler) ListSyncs(ctx context.Context, input *ListGitOpsSyncsInput) (*ListGitOpsSyncsOutput, error)
- func (h *GitOpsSyncHandler) PerformSync(ctx context.Context, input *GitOpsSyncActionInput) (*handlerutil.Out[types.GitOpsSyncResult], error)
- func (h *GitOpsSyncHandler) PreviewBackup(ctx context.Context, input *BackupPreviewInput) (*handlerutil.Out[types.GitOpsBackupPreview], error)
- func (h *GitOpsSyncHandler) ResolveBackupConflict(ctx context.Context, input *ResolveBackupConflictInput) (*handlerutil.Out[types.GitOpsSyncResult], error)
- func (h *GitOpsSyncHandler) UpdateSync(ctx context.Context, input *UpdateGitOpsSyncInput) (*handlerutil.Out[types.GitOpsSync], error)
- type GitOpsSyncService
- func (s *GitOpsSyncService) AggregateSyncs(ctx context.Context, params pagination.QueryParams) (types.PaginatedWithCounts[types.GitOpsSync, types.GitOpsSyncCounts], error)
- func (s *GitOpsSyncService) BrowseFiles(ctx context.Context, environmentID, id, localPath string) (*types.GitOpsBrowseResponse, error)
- func (s *GitOpsSyncService) CleanupLeakedCloneDirsOnStartup(ctx context.Context) error
- func (s *GitOpsSyncService) CleanupLeakedScratchDirsOnStartup(ctx context.Context) error
- func (s *GitOpsSyncService) CleanupOrphanedSyncsOnStartup(ctx context.Context) error
- func (s *GitOpsSyncService) CreateSync(ctx context.Context, environmentID string, change SyncUpdate) (*projectpkg.GitOpsSync, error)
- func (s *GitOpsSyncService) DeleteSync(ctx context.Context, environmentID, id string, opts SyncDelete) (deleteErr error)
- func (s *GitOpsSyncService) GetBackupHistory(ctx context.Context, environmentID, id string, limit int) (*types.GitOpsBackupHistoryResponse, error)
- func (s *GitOpsSyncService) GetBackupRevision(ctx context.Context, environmentID, id, commit string) (*types.GitOpsBackupRevision, error)
- func (s *GitOpsSyncService) GetSyncByID(ctx context.Context, environmentID, id string) (*projectpkg.GitOpsSync, error)
- func (s *GitOpsSyncService) GetSyncStatus(ctx context.Context, environmentID, id string) (*types.GitOpsSyncStatus, error)
- func (s *GitOpsSyncService) GetSyncsPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]types.GitOpsSync, pagination.Response, types.GitOpsSyncCounts, error)
- func (s *GitOpsSyncService) ImportSyncs(ctx context.Context, environmentID string, req []types.ImportGitOpsSyncRequest, ...) (*types.ImportGitOpsSyncResponse, error)
- func (s *GitOpsSyncService) PerformSync(ctx context.Context, req SyncRequest) (syncResult *types.GitOpsSyncResult, syncErr error)
- func (s *GitOpsSyncService) PreviewBackup(ctx context.Context, environmentID, id string) (*types.GitOpsBackupPreview, error)
- func (s *GitOpsSyncService) ReconcileDirectorySyncProjectsOnStartup(ctx context.Context) error
- func (s *GitOpsSyncService) ReconcileInterruptedBackupsOnStartup(ctx context.Context, protectedIDs ...string) error
- func (s *GitOpsSyncService) RegisterAutoSyncJobsOnStartup(ctx context.Context)
- func (s *GitOpsSyncService) RegisterWorkflows(engine *flow.Engine) error
- func (s *GitOpsSyncService) ResolveBackupConflict(ctx context.Context, environmentID, id string, ...) (*types.GitOpsSyncResult, error)
- func (s *GitOpsSyncService) SubscribeProjectFileChanges()
- func (s *GitOpsSyncService) UpdateSync(ctx context.Context, environmentID, id string, change SyncUpdate) (*projectpkg.GitOpsSync, error)
- type GitOpsSyncServiceParams
- type ImportGitOpsSyncsInput
- type ListGitOpsSyncsInput
- type ListGitOpsSyncsOutput
- type Module
- type ResolveBackupConflictInput
- type SyncDelete
- type SyncRequest
- type SyncUpdate
- type UpdateGitOpsSyncInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGitOpsSyncs ¶
func RegisterGitOpsSyncs(api huma.API, syncService *GitOpsSyncService)
Types ¶
type BackupHistoryInput ¶
type BackupPreviewInput ¶
type BackupRevisionInput ¶
type BrowseSyncFilesInput ¶
type CreateGitOpsSyncInput ¶
type CreateGitOpsSyncInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
types.Create[types.GitOpsSync]
}
type DeleteGitOpsSyncInput ¶
type GetGitOpsSyncInput ¶
type GetSyncStatusInput ¶
type GitOpsSyncActionInput ¶
type GitOpsSyncHandler ¶
type GitOpsSyncHandler struct {
// contains filtered or unexported fields
}
func (*GitOpsSyncHandler) BackupHistory ¶
func (h *GitOpsSyncHandler) BackupHistory(ctx context.Context, input *BackupHistoryInput) (*handlerutil.Out[types.GitOpsBackupHistoryResponse], error)
func (*GitOpsSyncHandler) BackupRevision ¶
func (h *GitOpsSyncHandler) BackupRevision(ctx context.Context, input *BackupRevisionInput) (*handlerutil.Out[types.GitOpsBackupRevision], error)
func (*GitOpsSyncHandler) BrowseFiles ¶
func (h *GitOpsSyncHandler) BrowseFiles(ctx context.Context, input *BrowseSyncFilesInput) (*handlerutil.Out[types.GitOpsBrowseResponse], error)
func (*GitOpsSyncHandler) CreateSync ¶
func (h *GitOpsSyncHandler) CreateSync(ctx context.Context, input *CreateGitOpsSyncInput) (*handlerutil.Out[types.GitOpsSync], error)
func (*GitOpsSyncHandler) DeleteSync ¶
func (h *GitOpsSyncHandler) DeleteSync(ctx context.Context, input *DeleteGitOpsSyncInput) (*handlerutil.Out[types.MessageResponse], error)
func (*GitOpsSyncHandler) GetStatus ¶
func (h *GitOpsSyncHandler) GetStatus(ctx context.Context, input *GetSyncStatusInput) (*handlerutil.Out[types.GitOpsSyncStatus], error)
func (*GitOpsSyncHandler) GetSync ¶
func (h *GitOpsSyncHandler) GetSync(ctx context.Context, input *GetGitOpsSyncInput) (*handlerutil.Out[types.GitOpsSync], error)
func (*GitOpsSyncHandler) ImportSyncs ¶
func (h *GitOpsSyncHandler) ImportSyncs(ctx context.Context, input *ImportGitOpsSyncsInput) (*handlerutil.Out[types.ImportGitOpsSyncResponse], error)
func (*GitOpsSyncHandler) ListSyncs ¶
func (h *GitOpsSyncHandler) ListSyncs(ctx context.Context, input *ListGitOpsSyncsInput) (*ListGitOpsSyncsOutput, error)
func (*GitOpsSyncHandler) PerformSync ¶
func (h *GitOpsSyncHandler) PerformSync(ctx context.Context, input *GitOpsSyncActionInput) (*handlerutil.Out[types.GitOpsSyncResult], error)
func (*GitOpsSyncHandler) PreviewBackup ¶
func (h *GitOpsSyncHandler) PreviewBackup(ctx context.Context, input *BackupPreviewInput) (*handlerutil.Out[types.GitOpsBackupPreview], error)
func (*GitOpsSyncHandler) ResolveBackupConflict ¶
func (h *GitOpsSyncHandler) ResolveBackupConflict(ctx context.Context, input *ResolveBackupConflictInput) (*handlerutil.Out[types.GitOpsSyncResult], error)
func (*GitOpsSyncHandler) UpdateSync ¶
func (h *GitOpsSyncHandler) UpdateSync(ctx context.Context, input *UpdateGitOpsSyncInput) (*handlerutil.Out[types.GitOpsSync], error)
type GitOpsSyncService ¶
type GitOpsSyncService struct {
// contains filtered or unexported fields
}
func NewGitOpsSyncService ¶
func NewGitOpsSyncService(p GitOpsSyncServiceParams) *GitOpsSyncService
func (*GitOpsSyncService) AggregateSyncs ¶
func (s *GitOpsSyncService) AggregateSyncs(ctx context.Context, params pagination.QueryParams) (types.PaginatedWithCounts[types.GitOpsSync, types.GitOpsSyncCounts], error)
func (*GitOpsSyncService) BrowseFiles ¶
func (s *GitOpsSyncService) BrowseFiles(ctx context.Context, environmentID, id, localPath string) (*types.GitOpsBrowseResponse, error)
func (*GitOpsSyncService) CleanupLeakedCloneDirsOnStartup ¶
func (s *GitOpsSyncService) CleanupLeakedCloneDirsOnStartup(ctx context.Context) error
func (*GitOpsSyncService) CleanupLeakedScratchDirsOnStartup ¶
func (s *GitOpsSyncService) CleanupLeakedScratchDirsOnStartup(ctx context.Context) error
func (*GitOpsSyncService) CleanupOrphanedSyncsOnStartup ¶
func (s *GitOpsSyncService) CleanupOrphanedSyncsOnStartup(ctx context.Context) error
func (*GitOpsSyncService) CreateSync ¶
func (s *GitOpsSyncService) CreateSync(ctx context.Context, environmentID string, change SyncUpdate) (*projectpkg.GitOpsSync, error)
func (*GitOpsSyncService) DeleteSync ¶
func (s *GitOpsSyncService) DeleteSync(ctx context.Context, environmentID, id string, opts SyncDelete) (deleteErr error)
func (*GitOpsSyncService) GetBackupHistory ¶
func (s *GitOpsSyncService) GetBackupHistory(ctx context.Context, environmentID, id string, limit int) (*types.GitOpsBackupHistoryResponse, error)
func (*GitOpsSyncService) GetBackupRevision ¶
func (s *GitOpsSyncService) GetBackupRevision(ctx context.Context, environmentID, id, commit string) (*types.GitOpsBackupRevision, error)
func (*GitOpsSyncService) GetSyncByID ¶
func (s *GitOpsSyncService) GetSyncByID(ctx context.Context, environmentID, id string) (*projectpkg.GitOpsSync, error)
func (*GitOpsSyncService) GetSyncStatus ¶
func (s *GitOpsSyncService) GetSyncStatus(ctx context.Context, environmentID, id string) (*types.GitOpsSyncStatus, error)
func (*GitOpsSyncService) GetSyncsPaginated ¶
func (s *GitOpsSyncService) GetSyncsPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]types.GitOpsSync, pagination.Response, types.GitOpsSyncCounts, error)
func (*GitOpsSyncService) ImportSyncs ¶
func (s *GitOpsSyncService) ImportSyncs(ctx context.Context, environmentID string, req []types.ImportGitOpsSyncRequest, actor types.Actor) (*types.ImportGitOpsSyncResponse, error)
func (*GitOpsSyncService) PerformSync ¶
func (s *GitOpsSyncService) PerformSync(ctx context.Context, req SyncRequest) (syncResult *types.GitOpsSyncResult, syncErr error)
func (*GitOpsSyncService) PreviewBackup ¶
func (s *GitOpsSyncService) PreviewBackup(ctx context.Context, environmentID, id string) (*types.GitOpsBackupPreview, error)
func (*GitOpsSyncService) ReconcileDirectorySyncProjectsOnStartup ¶
func (s *GitOpsSyncService) ReconcileDirectorySyncProjectsOnStartup(ctx context.Context) error
func (*GitOpsSyncService) ReconcileInterruptedBackupsOnStartup ¶
func (s *GitOpsSyncService) ReconcileInterruptedBackupsOnStartup(ctx context.Context, protectedIDs ...string) error
func (*GitOpsSyncService) RegisterAutoSyncJobsOnStartup ¶
func (s *GitOpsSyncService) RegisterAutoSyncJobsOnStartup(ctx context.Context)
func (*GitOpsSyncService) RegisterWorkflows ¶
func (s *GitOpsSyncService) RegisterWorkflows(engine *flow.Engine) error
func (*GitOpsSyncService) ResolveBackupConflict ¶
func (s *GitOpsSyncService) ResolveBackupConflict(ctx context.Context, environmentID, id string, req types.GitOpsResolveBackupConflictRequest, actor types.Actor) (*types.GitOpsSyncResult, error)
func (*GitOpsSyncService) SubscribeProjectFileChanges ¶
func (s *GitOpsSyncService) SubscribeProjectFileChanges()
func (*GitOpsSyncService) UpdateSync ¶
func (s *GitOpsSyncService) UpdateSync(ctx context.Context, environmentID, id string, change SyncUpdate) (*projectpkg.GitOpsSync, error)
type GitOpsSyncServiceParams ¶
type GitOpsSyncServiceParams struct {
fx.In
DB *database.DB
RepoService *gitrepo.GitRepositoryService
DockerService *docker.DockerClientService
ProjectService *projectpkg.ProjectService
SwarmService *swarm.SwarmService
EventService *event.EventService
SettingsService *settings.SettingsService
Ctx context.Context
Scheduler types.DynamicScheduler
Admission *runs.Admission
}
type ImportGitOpsSyncsInput ¶
type ImportGitOpsSyncsInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
Body []types.ImportGitOpsSyncRequest
}
type ListGitOpsSyncsInput ¶
type ListGitOpsSyncsInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
Search string `query:"search" doc:"Search query"`
Sort string `query:"sort" doc:"Column to sort by"`
Order string `query:"order" default:"asc" doc:"Sort direction"`
Mode string `query:"mode" doc:"Filter by direction (deploy, backup, or bidirectional)"`
ProjectID string `query:"projectId" doc:"Filter by linked project ID"`
RepositoryID string `query:"repositoryId" doc:"Filter by repository ID"`
AutoSync string `query:"autoSync" doc:"Filter by automatic sync (true or false)"`
Start int `query:"start" default:"0" doc:"Start index"`
Limit int `query:"limit" default:"20" doc:"Items per page"`
}
type ListGitOpsSyncsOutput ¶
type ListGitOpsSyncsOutput struct {
Body types.PaginatedWithCounts[types.GitOpsSync, types.GitOpsSyncCounts]
}
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func New ¶
func New(service *GitOpsSyncService) *Module
func (*Module) RegisterRoutes ¶
func (*Module) Service ¶
func (m *Module) Service() *GitOpsSyncService
type ResolveBackupConflictInput ¶
type ResolveBackupConflictInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
SyncID string `path:"syncId" doc:"Sync ID"`
Body types.GitOpsResolveBackupConflictRequest
}
type SyncDelete ¶
type SyncRequest ¶
type SyncUpdate ¶
type UpdateGitOpsSyncInput ¶
Click to show internal directories.
Click to hide internal directories.