v2

package
v0.4.64 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrComposeAppIDNotProvided = errors.New("compose AppID (compose project name) is not provided")

Functions

func DefaultQuery

func DefaultQuery(ctx echo.Context, key string, defaultValue string) string

func FilterCatalogByAppStoreID

func FilterCatalogByAppStoreID(catalog map[string]*service.ComposeApp, appStoreIDs []string) map[string]*service.ComposeApp

func FilterCatalogByArchitecture

func FilterCatalogByArchitecture(catalog map[string]*service.ComposeApp, arch string) map[string]*service.ComposeApp

func FilterCatalogByAuthorType

func FilterCatalogByAuthorType(catalog map[string]*service.ComposeApp, authorType codegen.StoreAppAuthorType) map[string]*service.ComposeApp

func FilterCatalogByCategory

func FilterCatalogByCategory(catalog map[string]*service.ComposeApp, category string) map[string]*service.ComposeApp

func NewAppManagement

func NewAppManagement() codegen.ServerInterface

func PropertiesFromQueryParams

func PropertiesFromQueryParams(httpCtx echo.Context) map[string]string

func WebAppGridItemAdapterContainer

func WebAppGridItemAdapterContainer(container *model.MyAppList) (*codegen.WebAppGridItem, error)

func WebAppGridItemAdapterV1

func WebAppGridItemAdapterV1(app *model.MyAppList) (*codegen.WebAppGridItem, error)

func WebAppGridItemAdapterV2

func WebAppGridItemAdapterV2(composeAppWithStoreInfo *codegen.ComposeAppWithStoreInfo) (*codegen.WebAppGridItem, error)

func YAMLfromRequest

func YAMLfromRequest(ctx echo.Context) ([]byte, error)

Types

type AppManagement

type AppManagement struct{}

func (*AppManagement) AppStoreList

func (a *AppManagement) AppStoreList(ctx echo.Context) error

func (*AppManagement) ApplyComposeAppEnv

func (a *AppManagement) ApplyComposeAppEnv(ctx echo.Context, id codegen.ComposeAppID, params codegen.ApplyComposeAppEnvParams) error

func (*AppManagement) ApplyComposeAppSettings

func (a *AppManagement) ApplyComposeAppSettings(ctx echo.Context, id codegen.ComposeAppID, params codegen.ApplyComposeAppSettingsParams) error

func (*AppManagement) BackupComposeApp added in v0.4.37

func (a *AppManagement) BackupComposeApp(ctx echo.Context, id codegen.ComposeAppID) error

BackupComposeApp starts a backup and returns.

A copy takes as long as it takes, so nothing waits for it here. What the caller gets back is that it started, and where it is going; the rest arrives on the message bus, like every other long operation in this service.

func (*AppManagement) BackupDestinationRuns added in v0.4.43

func (a *AppManagement) BackupDestinationRuns(ctx echo.Context, name codegen.BackupDestinationName) error

BackupDestinationRuns is what a destination holds: the apps it has backups of, their runs newest first, and whether this box runs each app now.

func (*AppManagement) BackupDestinations added in v0.4.37

func (a *AppManagement) BackupDestinations(ctx echo.Context) error

BackupDestinations lists the destinations, by name.

Names only. What a destination needs to be reached is rclone's to keep, and a secret that is never read back out through an API is a secret that cannot leak through one.

func (*AppManagement) BackupRuns added in v0.4.37

func (a *AppManagement) BackupRuns(ctx echo.Context) error

BackupRuns is what happened, newest first, failures included.

func (*AppManagement) BackupSchedules added in v0.4.37

func (a *AppManagement) BackupSchedules(ctx echo.Context) error

BackupSchedules lists the standing arrangements.

func (*AppManagement) BackupSystem added in v0.4.45

func (a *AppManagement) BackupSystem(ctx echo.Context) error

BackupSystem backs the box itself up, in the background.

func (*AppManagement) CategoryList

func (a *AppManagement) CategoryList(ctx echo.Context) error

func (*AppManagement) CheckBackupDestination added in v0.4.37

func (a *AppManagement) CheckBackupDestination(ctx echo.Context, name codegen.BackupDestinationName) error

CheckBackupDestination asks a destination whether it is reachable.

func (*AppManagement) CheckComposeAppHealthByID

func (a *AppManagement) CheckComposeAppHealthByID(ctx echo.Context, id codegen.ComposeAppID) error

func (*AppManagement) CheckContainerHealthByID

func (a *AppManagement) CheckContainerHealthByID(ctx echo.Context, id codegen.ContainerID) error

func (*AppManagement) CheckGitApp added in v0.4.57

func (a *AppManagement) CheckGitApp(ctx echo.Context, app codegen.GitAppName) error

func (*AppManagement) CheckImageUpdates

func (a *AppManagement) CheckImageUpdates(ctx echo.Context) error

func (*AppManagement) ComposeApp

func (a *AppManagement) ComposeApp(ctx echo.Context, id codegen.StoreAppIDString) error

func (*AppManagement) ComposeAppContainerStats added in v0.4.37

func (a *AppManagement) ComposeAppContainerStats(ctx echo.Context, id codegen.ComposeAppID) error

ComposeAppContainerStats reports what an app's running containers are using.

Only running ones: a stopped container uses nothing, and the daemon has no sample to give for it. The caller matches these back to the rows it already has by container id, so a container missing from this answer keeps whatever the row already said rather than being redrawn as idle.

func (*AppManagement) ComposeAppContainers

func (a *AppManagement) ComposeAppContainers(ctx echo.Context, id codegen.ComposeAppID) error

func (*AppManagement) ComposeAppEnv

func (a *AppManagement) ComposeAppEnv(ctx echo.Context, id codegen.ComposeAppID) error

func (*AppManagement) ComposeAppLogs

func (a *AppManagement) ComposeAppLogs(ctx echo.Context, id codegen.ComposeAppID, params codegen.ComposeAppLogsParams) error

func (*AppManagement) ComposeAppMainStableTag

func (a *AppManagement) ComposeAppMainStableTag(ctx echo.Context, id codegen.StoreAppIDString) error

func (*AppManagement) ComposeAppServiceStableTag

func (a *AppManagement) ComposeAppServiceStableTag(ctx echo.Context, id codegen.StoreAppIDString, serviceName string) error

func (*AppManagement) ComposeAppStoreInfo

func (a *AppManagement) ComposeAppStoreInfo(ctx echo.Context, id codegen.StoreAppIDString) error

func (*AppManagement) ComposeAppStoreInfoList

func (a *AppManagement) ComposeAppStoreInfoList(ctx echo.Context, params codegen.ComposeAppStoreInfoListParams) error

func (*AppManagement) ComposeAppUpdatePlan added in v0.4.52

func (a *AppManagement) ComposeAppUpdatePlan(ctx echo.Context, params codegen.ComposeAppUpdatePlanParams) error

func (*AppManagement) ComposeAppUpdateRun added in v0.4.52

func (a *AppManagement) ComposeAppUpdateRun(ctx echo.Context) error

func (*AppManagement) ContainerDetail added in v0.4.38

func (a *AppManagement) ContainerDetail(ctx echo.Context, id codegen.ContainerID) error

ContainerDetail describes one container.

func (*AppManagement) Convert

func (a *AppManagement) Convert(ctx echo.Context, params codegen.ConvertParams) error

func (*AppManagement) CreateGitApp added in v0.4.57

func (a *AppManagement) CreateGitApp(ctx echo.Context) error

func (*AppManagement) DanglingImages

func (a *AppManagement) DanglingImages(ctx echo.Context) error

func (*AppManagement) DeleteBackupDestination added in v0.4.37

func (a *AppManagement) DeleteBackupDestination(ctx echo.Context, name codegen.BackupDestinationName) error

DeleteBackupDestination forgets one. What was copied there stays there.

func (*AppManagement) DeleteBackupRun added in v0.4.44

DeleteBackupRun removes one backup from a destination. The run log keeps its record: that a backup was taken and later deleted is history worth keeping.

func (*AppManagement) DeleteContainer added in v0.4.38

func (a *AppManagement) DeleteContainer(ctx echo.Context, id codegen.ContainerID) error

DeleteContainer removes a container and, if asked and if allowed, some of its named volumes.

func (*AppManagement) DeleteGitApp added in v0.4.57

func (a *AppManagement) DeleteGitApp(ctx echo.Context, app codegen.GitAppName) error

func (*AppManagement) DeleteGlobalSetting

func (a *AppManagement) DeleteGlobalSetting(ctx echo.Context, key codegen.GlobalSettingKey) error

func (*AppManagement) DeployGitApp added in v0.4.57

func (a *AppManagement) DeployGitApp(ctx echo.Context, app codegen.GitAppName) error

func (*AppManagement) GetAppGrid

func (a *AppManagement) GetAppGrid(ctx echo.Context) error

func (*AppManagement) GetGitApp added in v0.4.57

func (a *AppManagement) GetGitApp(ctx echo.Context, app codegen.GitAppName) error

func (*AppManagement) GetGitAppTags added in v0.4.62

func (a *AppManagement) GetGitAppTags(ctx echo.Context, app codegen.GitAppName) error

func (*AppManagement) GetGlobalSetting

func (a *AppManagement) GetGlobalSetting(ctx echo.Context, key codegen.GlobalSettingKey) error

func (*AppManagement) GetGlobalSettings

func (a *AppManagement) GetGlobalSettings(ctx echo.Context) error

func (*AppManagement) Info

func (a *AppManagement) Info(ctx echo.Context) error

func (*AppManagement) InstallComposeApp

func (a *AppManagement) InstallComposeApp(ctx echo.Context, params codegen.InstallComposeAppParams) error

func (*AppManagement) IsNewComposeUncontrolled

func (a *AppManagement) IsNewComposeUncontrolled(newComposeApp *service.ComposeApp) (bool, error)

func (*AppManagement) MyComposeApp

func (a *AppManagement) MyComposeApp(ctx echo.Context, id codegen.ComposeAppID) error

func (*AppManagement) MyComposeAppList

func (a *AppManagement) MyComposeAppList(ctx echo.Context) error

func (*AppManagement) PruneDanglingImages

func (a *AppManagement) PruneDanglingImages(ctx echo.Context) error

Synchronous, unlike the recreate and pull endpoints that hand work to a goroutine and report progress over the message bus. Those have no answer to give back; this one's whole point is the number of bytes freed, and dangling-only bounds the work to what the GET just measured -- a handful of layers on this kind of box. The request's context carries the cancellation, so navigating away stops it.

func (*AppManagement) PullImages

func (a *AppManagement) PullImages(ctx echo.Context, params codegen.PullImagesParams) error

func (*AppManagement) ReceiveGitWebhook added in v0.4.61

func (a *AppManagement) ReceiveGitWebhook(ctx echo.Context, app codegen.GitAppName) error

ReceiveGitWebhook is a forge's delivery. It carries no token: route/v2.go lets this method and path through, and the service checks the signature instead.

func (*AppManagement) RecreateContainerByID

func (a *AppManagement) RecreateContainerByID(ctx echo.Context, id codegen.ContainerID, params codegen.RecreateContainerByIDParams) error

func (*AppManagement) RegisterAppStore

func (a *AppManagement) RegisterAppStore(ctx echo.Context, params codegen.RegisterAppStoreParams) error

the method should be deprecated but it be used by CasaOS

func (*AppManagement) RegisterAppStoreSync

func (a *AppManagement) RegisterAppStoreSync(ctx echo.Context, params codegen.RegisterAppStoreSyncParams) error

func (*AppManagement) RestoreBackup added in v0.4.41

func (a *AppManagement) RestoreBackup(ctx echo.Context) error

RestoreBackup puts an app back from a backup, in the background.

func (*AppManagement) SetBackupDestination added in v0.4.37

func (a *AppManagement) SetBackupDestination(ctx echo.Context, name codegen.BackupDestinationName) error

SetBackupDestination adds or replaces one.

func (*AppManagement) SetBackupSchedules added in v0.4.37

func (a *AppManagement) SetBackupSchedules(ctx echo.Context) error

SetBackupSchedules replaces the lot.

Every schedule is checked before any is saved. A list saved half-valid is a box where some backups run and some silently never will, and nothing on the screen tells the two apart.

func (*AppManagement) SetComposeAppContainerStatus added in v0.4.37

func (a *AppManagement) SetComposeAppContainerStatus(ctx echo.Context, id codegen.ComposeAppID, containerID codegen.ComposeContainerID) error

SetComposeAppContainerStatus starts, stops or restarts ONE container of a compose app.

The app-level route next to this one acts on every service at once, which is the wrong tool for most of what goes wrong on a multi-service stack: a database that wedged, a sidecar that needs its config re-read. Taking the whole stack down to fix one of its parts is a bigger outage than the fault.

This runs synchronously, unlike the app-level status change. One container is quick, the caller redraws the row as soon as it answers, and an error worth showing arrives as an error rather than as a row that silently never changes.

func (*AppManagement) SetComposeAppStatus

func (a *AppManagement) SetComposeAppStatus(ctx echo.Context, id codegen.ComposeAppID) error

func (*AppManagement) UninstallComposeApp

func (a *AppManagement) UninstallComposeApp(ctx echo.Context, id codegen.ComposeAppID, params codegen.UninstallComposeAppParams) error

func (*AppManagement) UnregisterAppStore

func (a *AppManagement) UnregisterAppStore(ctx echo.Context, id codegen.AppStoreID) error

func (*AppManagement) UpdateComposeApp

func (a *AppManagement) UpdateComposeApp(ctx echo.Context, id codegen.ComposeAppID, params codegen.UpdateComposeAppParams) error

func (*AppManagement) UpdateComposeApps added in v0.4.52

func (a *AppManagement) UpdateComposeApps(ctx echo.Context) error

func (*AppManagement) UpdateGitApp added in v0.4.57

func (a *AppManagement) UpdateGitApp(ctx echo.Context, app codegen.GitAppName) error

func (*AppManagement) UpdateGlobalSetting

func (a *AppManagement) UpdateGlobalSetting(ctx echo.Context, key codegen.GlobalSettingKey) error

func (*AppManagement) UpgradableAppList

func (a *AppManagement) UpgradableAppList(ctx echo.Context) error

Jump to

Keyboard shortcuts

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