gitops

package
v3.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: BSD-3-Clause Imports: 52 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGitOpsSyncs

func RegisterGitOpsSyncs(api huma.API, syncService *GitOpsSyncService)

Types

type BackupHistoryInput

type BackupHistoryInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SyncID        string `path:"syncId" doc:"Sync ID"`
	Limit         int    `query:"limit" default:"20" doc:"Maximum number of revisions"`
}

type BackupPreviewInput

type BackupPreviewInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SyncID        string `path:"syncId" doc:"Sync ID"`
}

type BackupRevisionInput

type BackupRevisionInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SyncID        string `path:"syncId" doc:"Sync ID"`
	Commit        string `path:"commit" doc:"Commit hash"`
}

type BrowseSyncFilesInput

type BrowseSyncFilesInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SyncID        string `path:"syncId" doc:"Sync ID"`
	Path          string `query:"path" doc:"Path to browse (optional)"`
}

type CreateGitOpsSyncInput

type CreateGitOpsSyncInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	types.Create[types.GitOpsSync]
}

type DeleteGitOpsSyncInput

type DeleteGitOpsSyncInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SyncID        string `path:"syncId" doc:"Sync ID"`
	RemoveStack   bool   `query:"removeStack" doc:"Also remove the swarm stack a swarm_stack sync deployed"`
}

type GetGitOpsSyncInput

type GetGitOpsSyncInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SyncID        string `path:"syncId" doc:"Sync ID"`
}

type GetSyncStatusInput

type GetSyncStatusInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SyncID        string `path:"syncId" doc:"Sync ID"`
}

type GitOpsSyncActionInput

type GitOpsSyncActionInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SyncID        string `path:"syncId" doc:"Sync ID"`
	Action        string `query:"action" required:"true" enum:"sync" doc:"Sync action"`
}

type GitOpsSyncHandler

type GitOpsSyncHandler struct {
	// contains filtered or unexported fields
}

func (*GitOpsSyncHandler) BackupHistory

func (*GitOpsSyncHandler) BackupRevision

func (*GitOpsSyncHandler) BrowseFiles

func (*GitOpsSyncHandler) CreateSync

func (*GitOpsSyncHandler) DeleteSync

func (*GitOpsSyncHandler) GetStatus

func (*GitOpsSyncHandler) GetSync

func (*GitOpsSyncHandler) ImportSyncs

func (*GitOpsSyncHandler) ListSyncs

func (*GitOpsSyncHandler) PerformSync

func (*GitOpsSyncHandler) PreviewBackup

func (*GitOpsSyncHandler) ResolveBackupConflict

func (*GitOpsSyncHandler) UpdateSync

type GitOpsSyncService

type GitOpsSyncService struct {
	// contains filtered or unexported fields
}

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 (*GitOpsSyncService) ImportSyncs

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 (m *Module) RegisterRoutes(api huma.API)

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 SyncDelete struct {
	Actor       types.Actor
	RemoveStack bool
}

type SyncRequest

type SyncRequest struct {
	EnvironmentID string
	SyncID        string
	Actor         types.Actor
	Resolve       string
}

type SyncUpdate

type SyncUpdate struct {
	Submitted map[string]bool
	Actor     types.Actor
	Request   types.GitOpsSync
}

type UpdateGitOpsSyncInput

type UpdateGitOpsSyncInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SyncID        string `path:"syncId" doc:"Sync ID"`
	types.Update[types.GitOpsSync]
}

Directories

Path Synopsis
children

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL