Documentation
¶
Index ¶
- Variables
- func DefaultQuery(ctx echo.Context, key string, defaultValue string) string
- func FilterCatalogByAppStoreID(catalog map[string]*service.ComposeApp, appStoreIDs []string) map[string]*service.ComposeApp
- func FilterCatalogByArchitecture(catalog map[string]*service.ComposeApp, arch string) map[string]*service.ComposeApp
- func FilterCatalogByAuthorType(catalog map[string]*service.ComposeApp, authorType codegen.StoreAppAuthorType) map[string]*service.ComposeApp
- func FilterCatalogByCategory(catalog map[string]*service.ComposeApp, category string) map[string]*service.ComposeApp
- func NewAppManagement() codegen.ServerInterface
- func PropertiesFromQueryParams(httpCtx echo.Context) map[string]string
- func WebAppGridItemAdapterContainer(container *model.MyAppList) (*codegen.WebAppGridItem, error)
- func WebAppGridItemAdapterV1(app *model.MyAppList) (*codegen.WebAppGridItem, error)
- func WebAppGridItemAdapterV2(composeAppWithStoreInfo *codegen.ComposeAppWithStoreInfo) (*codegen.WebAppGridItem, error)
- func YAMLfromRequest(ctx echo.Context) ([]byte, error)
- type AppManagement
- func (a *AppManagement) AppStoreList(ctx echo.Context) error
- func (a *AppManagement) ApplyComposeAppEnv(ctx echo.Context, id codegen.ComposeAppID, ...) error
- func (a *AppManagement) ApplyComposeAppSettings(ctx echo.Context, id codegen.ComposeAppID, ...) error
- func (a *AppManagement) BackupComposeApp(ctx echo.Context, id codegen.ComposeAppID) error
- func (a *AppManagement) BackupDestinations(ctx echo.Context) error
- func (a *AppManagement) BackupRuns(ctx echo.Context) error
- func (a *AppManagement) BackupSchedules(ctx echo.Context) error
- func (a *AppManagement) CategoryList(ctx echo.Context) error
- func (a *AppManagement) CheckBackupDestination(ctx echo.Context, name codegen.BackupDestinationName) error
- func (a *AppManagement) CheckComposeAppHealthByID(ctx echo.Context, id codegen.ComposeAppID) error
- func (a *AppManagement) CheckContainerHealthByID(ctx echo.Context, id codegen.ContainerID) error
- func (a *AppManagement) CheckImageUpdates(ctx echo.Context) error
- func (a *AppManagement) ComposeApp(ctx echo.Context, id codegen.StoreAppIDString) error
- func (a *AppManagement) ComposeAppContainerStats(ctx echo.Context, id codegen.ComposeAppID) error
- func (a *AppManagement) ComposeAppContainers(ctx echo.Context, id codegen.ComposeAppID) error
- func (a *AppManagement) ComposeAppEnv(ctx echo.Context, id codegen.ComposeAppID) error
- func (a *AppManagement) ComposeAppLogs(ctx echo.Context, id codegen.ComposeAppID, params codegen.ComposeAppLogsParams) error
- func (a *AppManagement) ComposeAppMainStableTag(ctx echo.Context, id codegen.StoreAppIDString) error
- func (a *AppManagement) ComposeAppServiceStableTag(ctx echo.Context, id codegen.StoreAppIDString, serviceName string) error
- func (a *AppManagement) ComposeAppStoreInfo(ctx echo.Context, id codegen.StoreAppIDString) error
- func (a *AppManagement) ComposeAppStoreInfoList(ctx echo.Context, params codegen.ComposeAppStoreInfoListParams) error
- func (a *AppManagement) ContainerDetail(ctx echo.Context, id codegen.ContainerID) error
- func (a *AppManagement) Convert(ctx echo.Context, params codegen.ConvertParams) error
- func (a *AppManagement) DanglingImages(ctx echo.Context) error
- func (a *AppManagement) DeleteBackupDestination(ctx echo.Context, name codegen.BackupDestinationName) error
- func (a *AppManagement) DeleteContainer(ctx echo.Context, id codegen.ContainerID) error
- func (a *AppManagement) DeleteGlobalSetting(ctx echo.Context, key codegen.GlobalSettingKey) error
- func (a *AppManagement) GetAppGrid(ctx echo.Context) error
- func (a *AppManagement) GetGlobalSetting(ctx echo.Context, key codegen.GlobalSettingKey) error
- func (a *AppManagement) GetGlobalSettings(ctx echo.Context) error
- func (a *AppManagement) Info(ctx echo.Context) error
- func (a *AppManagement) InstallComposeApp(ctx echo.Context, params codegen.InstallComposeAppParams) error
- func (a *AppManagement) IsNewComposeUncontrolled(newComposeApp *service.ComposeApp) (bool, error)
- func (a *AppManagement) MyComposeApp(ctx echo.Context, id codegen.ComposeAppID) error
- func (a *AppManagement) MyComposeAppList(ctx echo.Context) error
- func (a *AppManagement) PruneDanglingImages(ctx echo.Context) error
- func (a *AppManagement) PullImages(ctx echo.Context, params codegen.PullImagesParams) error
- func (a *AppManagement) RecreateContainerByID(ctx echo.Context, id codegen.ContainerID, ...) error
- func (a *AppManagement) RegisterAppStore(ctx echo.Context, params codegen.RegisterAppStoreParams) error
- func (a *AppManagement) RegisterAppStoreSync(ctx echo.Context, params codegen.RegisterAppStoreSyncParams) error
- func (a *AppManagement) SetBackupDestination(ctx echo.Context, name codegen.BackupDestinationName) error
- func (a *AppManagement) SetBackupSchedules(ctx echo.Context) error
- func (a *AppManagement) SetComposeAppContainerStatus(ctx echo.Context, id codegen.ComposeAppID, ...) error
- func (a *AppManagement) SetComposeAppStatus(ctx echo.Context, id codegen.ComposeAppID) error
- func (a *AppManagement) UninstallComposeApp(ctx echo.Context, id codegen.ComposeAppID, ...) error
- func (a *AppManagement) UnregisterAppStore(ctx echo.Context, id codegen.AppStoreID) error
- func (a *AppManagement) UpdateComposeApp(ctx echo.Context, id codegen.ComposeAppID, ...) error
- func (a *AppManagement) UpdateGlobalSetting(ctx echo.Context, key codegen.GlobalSettingKey) error
- func (a *AppManagement) UpgradableAppList(ctx echo.Context) error
Constants ¶
This section is empty.
Variables ¶
var ErrComposeAppIDNotProvided = errors.New("compose AppID (compose project name) is not provided")
Functions ¶
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 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)
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) 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) 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) 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) 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) 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) 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) DeleteGlobalSetting ¶
func (a *AppManagement) DeleteGlobalSetting(ctx echo.Context, key codegen.GlobalSettingKey) error
func (*AppManagement) GetAppGrid ¶
func (a *AppManagement) GetAppGrid(ctx echo.Context) 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) 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) 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) 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) UpdateGlobalSetting ¶
func (a *AppManagement) UpdateGlobalSetting(ctx echo.Context, key codegen.GlobalSettingKey) error
func (*AppManagement) UpgradableAppList ¶
func (a *AppManagement) UpgradableAppList(ctx echo.Context) error