Documentation
¶
Overview ¶
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 18:13:22 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-04 20:10:31 * @FilePath: /CasaOS/service/connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2021-12-20 14:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-07-04 16:18:23 * @FilePath: /CasaOS/service/file.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 18:13:22 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-04 20:10:31 * @FilePath: /CasaOS/service/connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2021-09-30 18:18:14 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-02 18:00:57 * @FilePath: /CasaOS/service/rely.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2022-07-12 09:48:56 * @LastEditors: LinkLeong * @LastEditTime: 2022-09-02 22:10:05 * @FilePath: /CasaOS/service/service.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 11:21:14 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-18 11:16:25 * @FilePath: /CasaOS/service/shares.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
Index ¶
- Constants
- Variables
- func CheckFileStatus()
- func CreateSambaUser(username, password string) error
- func DeleteSambaUser(username string) error
- func ExecOpFile()
- func FileOperate(k string)
- func GetCPUThermalZone() string
- func GetDeviceAllIP() []string
- func GetIP(request *http.Request) string
- func GetPeerId(request *http.Request, id string) string
- func IsMounted(path string) bool
- func ListSambaUsers() ([]string, error)
- func NewReader(ctx context.Context, r io.Reader) io.Reader
- func NewWriter(ctx context.Context, w io.Writer) io.Writer
- func OSPlanStopSignals(sigintIgnored bool) []os.Signal
- func RemoveStaleOSPlanDirs() ([]string, error)
- func SendMeg()
- func SetSambaPassword(username, password string) error
- func ValidateSambaUsername(name string) error
- func ValidateSharePath(path string) (string, error)
- func ValidateTimeMachineSupport() error
- type AppOperationsFunc
- type CasaService
- type ConnectionsService
- type DockerUpdateRefusal
- type FileInfo
- type FileUploadService
- type HealthService
- type ModuleRefusal
- type Name
- type NotifyServer
- type OSPlanRefusal
- type OSUpgradeAckRequest
- type OSUpgradeAfterRebootHint
- type OSUpgradeBarrier
- type OSUpgradeBarrierItem
- type OSUpgradeBlock
- type OSUpgradeFailure
- type OSUpgradeFinding
- type OSUpgradeHint
- type OSUpgradeManual
- type OSUpgradeNotReturned
- type OSUpgradeReboot
- type OSUpgradeRefreshRequest
- type OSUpgradeRefusal
- type OSUpgradeRunbook
- type OSUpgradeStartRequest
- type OSUpgradeStatus
- type OtherService
- type PeerService
- type RelyService
- type Repository
- type SharesService
- type StorageService
- type SystemDockerContainers
- type SystemDockerUpdateStatus
- type SystemModuleStatus
- type SystemOSPlanStatus
- type SystemPackageDocker
- type SystemPackageDockerUpdate
- type SystemPackageUpdate
- type SystemPackageUpdateStatus
- type SystemPackageUpdates
- type SystemService
Constants ¶
const ( ModuleBadRequest = "bad_request" ModuleNotRoot = "not_root" ModuleUnsupported = "unsupported" ModuleBusy = "busy" ModulePlanChanged = "plan_changed" ModuleNotInstalled = "not_installed" ModulePlanTimeout = "plan_timeout" ModuleStartFailed = "start_failed" )
The codes that a request about a module is refused with (ModuleRefusal.Code); the plan's own codes (osmodule.Check*, osmodule.Refused*: catalogue, os, arch, recasaos, already_installed, foreign_unit, busy, dpkg_state, disk_short, disk_unknown, apt_missing, apt_failed, apt_removes, apt_downgrades, held_package, package_not_exact) are said as they are.
const ( OSPlanNoPlan = "no_plan" OSPlanNoRunbook = "no_runbook" )
The codes of what the runbook refuses (osplan's failure codes are the others), and of why there is no plan to write it from.
const ( OSUpgradeBadRequest = "bad_request" OSUpgradeBetaOff = "beta_off" OSUpgradeRunOpen = "run_open" OSUpgradeManualRunFound = "manual_run_found" OSUpgradeNoPlan = "no_plan" OSUpgradePlanChanged = "plan_changed" OSUpgradePlanBlocked = "plan_blocked" OSUpgradePlanOlderThanRefresh = "plan_older_than_refresh" OSUpgradeBadSafetyNet = "bad_safety_net" OSUpgradeHostnameMismatch = "hostname_mismatch" OSUpgradeAcksMissing = "acks_missing" OSUpgradeRemovalsMismatch = "removals_mismatch" OSUpgradePausedMismatch = "paused_mismatch" OSUpgradeSourcesChanged = "sources_changed" OSUpgradeReadinessRefuses = "readiness_refuses" OSUpgradeBusy = "busy" OSUpgradeAppsBusy = "apps_busy" OSUpgradeNoRoom = "no_room" OSUpgradeRunbookUnsafe = "runbook_unsafe" OSUpgradeRunbookTooLarge = "runbook_too_large" OSUpgradeStartFailed = "start_failed" )
The codes of what the upgrade refuses (OSUpgradeRefusal.Code). not_root, identity_unsupported and hop_not_planned are the plan's own words, said again.
const ( OSUpgradeAckAcknowledge = "acknowledge" OSUpgradeAckDiscard = "discard" OSUpgradeAckManual = "manual" )
The three things that the owner can say of a run that is not running: close it (acknowledge), drop it (discard: close it, and drop the plan that it was made for, or put a rehearsal back), or take it over (manual: the core stops acting, and the owner finishes the hop by hand from the text of the run).
const ( // OSUpgradeNoRun: there is no upgrade to act on. OSUpgradeRunUnreadable: there is one, and it cannot be read. OSUpgradeNoRun = "no_run" OSUpgradeRunUnreadable = "run_unreadable" // OSUpgradeNotAbortable says why the run cannot be called off (Data["reason"]): point_of_no_return, past_block or not_running. OSUpgradeNotAbortable = "not_abortable" // OSUpgradeNotAwaitingReboot: the machine does not wait for its restart (Data["state"]). OSUpgradeBarrierFailed: what stands before the restart is red // (Data["checks"]). OSUpgradeUnitActive: a unit of the upgrade runs, or systemd does not answer. OSUpgradeDpkgLocked: something else changes the packages. OSUpgradeNotAwaitingReboot = "not_awaiting_reboot" OSUpgradeBarrierFailed = "barrier_failed" OSUpgradeUnitActive = "unit_active" OSUpgradeDpkgLocked = "dpkg_locked" // OSUpgradeRebootFailed: the restart could not be asked of systemd. OSUpgradeRebootFailed = "reboot_failed" // OSUpgradeNotResumable: the run cannot be gone on with from where it is (Data["state"], Data["class"]). OSUpgradeNotResumable = "not_resumable" // OSUpgradeNotTerminal: the run is not in a state that the word of the owner ends or leaves (Data["state"]). OSUpgradeWordRequired and OSUpgradeBadWord are for the typed word // that a machine that is half upgraded needs to be let go of. OSUpgradeNotTerminal = "not_terminal" OSUpgradeWordRequired = "word_required" OSUpgradeBadWord = "bad_word" // OSUpgradeCloseFailed: the run could not be closed (its backup could not be put away, a file could not be removed): it is as it was. OSUpgradeCloseFailed = "close_failed" )
The codes that the buttons refuse with (OSUpgradeRefusal.Code), besides OSUpgradeBusy and OSUpgradeBadRequest.
const ( // DockerRefusalRunning is the update of Docker, or a System packages update, already running. DockerRefusalRunning = "running" // DockerRefusalMaintenance is another update or a package manager busy on the box. DockerRefusalMaintenance = "maintenance" // DockerRefusalApps is an app operation in progress, or AppManagement that cannot say. DockerRefusalApps = "apps" // DockerRefusalChanged is a plan that is not the one the owner confirmed. DockerRefusalChanged = "changed" // DockerRefusalNothing is an engine with nothing to update. DockerRefusalNothing = "nothing" )
The reasons the update does not start for, after the static ones of dockerUpdatePreflight (DockerRefusalOrigin and the others): things that change from one minute to the next.
const ( // DockerRefusalUnsupported is a host that is not Debian-family root with apt-get and // systemd-run. DockerRefusalUnsupported = "unsupported" // DockerRefusalOrigin is an engine that is not docker-ce from Docker's own repository. DockerRefusalOrigin = "origin" // DockerRefusalHeld is docker-ce, or another package of the engine, on hold, when the owner // has not said that the update may go ahead of the hold. The hold is the owner's: the update // goes ahead of it as the terminal command with --allow-change-held-packages does, which drops // the hold of the packages dpkg unpacks, and the unit puts it back and says whether it did // (HOLDS, holds_kept). DockerRefusalHeld = "held" // DockerRefusalDpkg is a package operation that was interrupted and left unfinished (a power // cut in the middle of an install): the simulations take no lock, so they pass, and the first // real apt call refuses, which the run would report as a failed download. DockerRefusalDpkg = "dpkg" // DockerRefusalDaemon is a Docker that does not answer: no docker command, or the daemon // does not tell its version in time. DockerRefusalDaemon = "daemon" // DockerRefusalSwarm is a node that is part of a swarm. DockerRefusalSwarm = "swarm" // DockerRefusalPlan is a transaction that is not an upgrade of the engine's own packages // and the packages they need: it failed, or it removes a package, or upgrades another, or // installs a distribution's Docker package or more than dockerpkg.MaxNewPackages new ones. DockerRefusalPlan = "plan" // DockerRefusalDisk is too little room for the packages. DockerRefusalDisk = "disk" )
The reasons the button is refused for, in the order they are looked at: the first that applies is the one given (unsupported, origin, held, dpkg, daemon, swarm, plan, disk). The page maps these codes to its own words. A hold is not one for the check: it is said, with the plan (SystemPackageDockerUpdate.Held), and the start refuses it until the owner has allowed it.
const OSPlanStopWait = 10 * time.Second
OSPlanStopWait is how long the core's end waits for a plan that is being made to be canceled and to remove its directory.
const OSUpgradeOpen = "os_upgrade_open"
OSUpgradeOpen is the refusal of the owner's page to restart or to switch off the machine while an upgrade of the operating system works on it (Data["state"]): the restart would cut dpkg short and leave the machine half upgraded with nothing to say what is done. The upgrade's own restart is another call (osUpgradePowerAction), and is not refused.
const OSUpgradeSourceUnrecognized = "source_unrecognized"
OSUpgradeSourceUnrecognized is the one code that only a refresh says: the sources of the machine are in a form that the refresh cannot write. A repository that the report cannot tell is the usual one ("run apt-get update first"), and the plan says the same of it in its own words.
Variables ¶
var ( ErrSambaUsernameInvalid = errors.New("a share account name must be 1 to 31 characters, start with a lowercase letter or underscore, and contain only lowercase letters, digits, underscores and hyphens") ErrSambaPasswordEmpty = errors.New("a share account password cannot be empty") ErrSambaUserExists = errors.New("a system account with that name already exists") ErrSambaUserNotManaged = errors.New("that account was not created by CasaOS and will not be removed") )
var ( WebSocketConns []*websocket.Conn SocketRun bool )
var ( )
var ( ErrSystemPackageUpdateRunning = errors.New("system package update is already running") ErrSystemPackageUpdatesUnsupported = errors.New("system package updates are not supported on this host") )
var ( ErrSystemPackageNothingToUpdate = errors.New("there is nothing to update") ErrSystemPackageTouchesDocker = errors.New("this update would also change Docker's packages") ErrSystemPackageListChanged = errors.New("the update is no longer the list that was checked") ErrSystemMaintenanceBusy = errors.New("another update or package operation is running on this box") )
var Cache *cache.Cache
var ErrDockerUpdateBadPlanID = errors.New("the plan id is not the id of a plan")
ErrDockerUpdateBadPlanID is a plan id that is not 64 lower case hex digits.
var ErrTimeMachineUnsupported = errors.New("Time Machine needs Samba's vfs_fruit module (package samba-vfs-modules on Debian and Ubuntu)")
var FileQueue sync.Map
var OSUpgradeActionCodes = []string{ OSUpgradeNoRun, OSUpgradeRunUnreadable, OSUpgradeNotAbortable, OSUpgradeNotAwaitingReboot, OSUpgradeBarrierFailed, OSUpgradeUnitActive, OSUpgradeDpkgLocked, OSUpgradeRebootFailed, OSUpgradeNotResumable, OSUpgradeNotTerminal, OSUpgradeWordRequired, OSUpgradeBadWord, OSUpgradeCloseFailed, OSUpgradeBusy, }
OSUpgradeActionCodes are the codes that the buttons can refuse with, besides the ones that every request can be refused with.
var OSUpgradeRefreshCodes = []string{ OSUpgradeBadRequest, OSUpgradeBetaOff, osplan.CodeNotRoot, osplan.CodeIdentityUnsupported, osplan.CodeHopNotPlanned, OSUpgradeRunOpen, OSUpgradeManualRunFound, OSUpgradeReadinessRefuses, OSUpgradeBusy, OSUpgradeAppsBusy, OSUpgradeNoRoom, OSUpgradeSourceUnrecognized, OSUpgradeRunbookUnsafe, OSUpgradeRunbookTooLarge, OSUpgradeStartFailed, }
OSUpgradeRefreshCodes are the codes that a refresh can be refused with, in the order of its checks, the three of the plan's included.
var OSUpgradeStartCodes = []string{ OSUpgradeBadRequest, OSUpgradeBetaOff, osplan.CodeNotRoot, osplan.CodeIdentityUnsupported, osplan.CodeHopNotPlanned, OSUpgradeRunOpen, OSUpgradeManualRunFound, OSUpgradeNoPlan, OSUpgradePlanChanged, OSUpgradePlanBlocked, OSUpgradePlanOlderThanRefresh, OSUpgradeBadSafetyNet, OSUpgradeHostnameMismatch, OSUpgradeAcksMissing, OSUpgradeRemovalsMismatch, OSUpgradePausedMismatch, OSUpgradeSourcesChanged, OSUpgradeReadinessRefuses, OSUpgradeBusy, OSUpgradeAppsBusy, OSUpgradeNoRoom, OSUpgradeRunbookUnsafe, OSUpgradeRunbookTooLarge, OSUpgradeStartFailed, }
OSUpgradeStartCodes are the codes that a start can be refused with, in the order of its checks, the three of the plan's included.
var OpStrArr []string
Functions ¶
func CreateSambaUser ¶
CreateSambaUser adds a system account that can only be used for file sharing, then registers it with Samba.
The account gets no home directory and no login shell, so it cannot be used to log in to the host. The password is written to the tool's standard input rather than passed as an argument, which keeps it out of the process table.
func DeleteSambaUser ¶
DeleteSambaUser removes an account this code created, from Samba and from the system. It refuses to touch anything that does not look CasaOS-managed.
func ExecOpFile ¶
func ExecOpFile()
func FileOperate ¶
func FileOperate(k string)
func GetCPUThermalZone ¶
func GetCPUThermalZone() string
find thermal_zone of cpu. assertions:
- thermal_zone "type" and "temp" are required fields (https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-thermal)
func GetDeviceAllIP ¶
func GetDeviceAllIP() []string
func ListSambaUsers ¶
ListSambaUsers returns the share accounts this code created.
func NewReader ¶
NewReader wraps an io.Reader to handle context cancellation.
Context state is checked BEFORE every Read.
func OSPlanStopSignals ¶ added in v0.4.73
OSPlanStopSignals are the signals that tell the core to stop and that it listens to, to end the plan that is being made first: SIGTERM, and SIGINT unless it was ignored when the core started (what ignored it, a shell that put the core in the background, meant it to go on), since to listen to a signal is to stop ignoring it.
func RemoveStaleOSPlanDirs ¶ added in v0.4.73
RemoveStaleOSPlanDirs is what the core does when it starts: the sandbox directories that an earlier core left in /var/tmp (it was killed, or the machine went down, while a plan was being made) and that are older than ten minutes are removed.
func SetSambaPassword ¶
SetSambaPassword sets or replaces the Samba password of an existing account.
func ValidateSambaUsername ¶
ValidateSambaUsername reports whether name is safe to pass to the account tooling. Callers must run this before anything else touches the name.
func ValidateSharePath ¶
ValidateSharePath resolves path and reports whether it is a real directory inside one of the permitted roots.
Symlinks are resolved before the check rather than after, so a link planted inside a share cannot be used to reach a target outside it.
func ValidateTimeMachineSupport ¶
func ValidateTimeMachineSupport() error
ValidateTimeMachineSupport checks that smbd can load the module a Time Machine share names.
testparm parses the configuration without loading VFS modules, so a missing one sails through validateSambaConfig and only surfaces as that single share refusing every connection. A host without smbd has nothing to check against, which is not an error, and neither is a build that lays its modules out somewhere unexpected: the guard never turns into a false refusal.
Types ¶
type AppOperationsFunc ¶ added in v0.4.67
AppOperationsFunc says which apps have an operation in progress (an install, an update, a backup, a restore), by name. An error is no answer. main sets it from AppManagement.
type CasaService ¶
func NewCasaService ¶
func NewCasaService() CasaService
type ConnectionsService ¶
type ConnectionsService interface {
GetConnectionsList() (connections []model2.ConnectionsDBModel)
GetConnectionByHost(host string) (connections []model2.ConnectionsDBModel)
GetConnectionByID(id string) (connections model2.ConnectionsDBModel)
CreateConnection(connection *model2.ConnectionsDBModel)
DeleteConnection(id string)
UpdateConnection(connection *model2.ConnectionsDBModel)
MountSmaba(username, host, directory, port, mountPoint, password string) error
UnmountSmaba(mountPoint string) error
}
func NewConnectionsService ¶
func NewConnectionsService(db *gorm.DB) ConnectionsService
type DockerUpdateRefusal ¶ added in v0.4.67
DockerUpdateRefusal is why the update did not start. The page turns the Code into its own words and shows Detail (names the core validated) with them; Reason is English, for a log or a client that does not know the code.
func (*DockerUpdateRefusal) Error ¶ added in v0.4.67
func (r *DockerUpdateRefusal) Error() string
type FileUploadService ¶
type FileUploadService struct {
// contains filtered or unexported fields
}
func NewFileUploadService ¶
func NewFileUploadService() *FileUploadService
type HealthService ¶
type HealthService interface {
Services() (map[bool]*[]string, error)
Ports() ([]int, []int, error)
}
func NewHealthService ¶
func NewHealthService() HealthService
type ModuleRefusal ¶ added in v0.4.75
ModuleRefusal is a request about a module that was refused, with a code that the page puts in words. Detail is English, for whoever reads the raw answer; Data is what makes the code precise. The route says bad_request and start_failed with their own statuses and the others with 409.
func (*ModuleRefusal) Error ¶ added in v0.4.75
func (r *ModuleRefusal) Error() string
type Name ¶
type Name struct {
Model string `json:"model"`
OS string `json:"os"`
Browser string `json:"browser"`
DeviceName string `json:"deviceName"`
DisplayName string `json:"displayName"`
}
func GetNameByDB ¶
func GetNameByDB(m model2.PeerDriveDBModel) Name
type NotifyServer ¶
type NotifyServer interface {
GetLog(id string) model.AppNotify
AddLog(log model.AppNotify)
UpdateLog(log model.AppNotify)
UpdateLogByCustomID(log model.AppNotify)
DelLog(id string)
GetList(c int) (list []model.AppNotify)
MarkRead(id string, state int)
SendFileOperateNotify(nowSend bool)
//SendInstallAppBySocket(app notifyCommon.Application)
SendNotify(name string, message map[string]interface{})
SettingSystemTempData(message map[string]interface{})
GetSystemTempMap() *syncmap.Map
}
func NewNotifyService ¶
func NewNotifyService(db *gorm.DB) NotifyServer
type OSPlanRefusal ¶ added in v0.4.73
OSPlanRefusal is a request that is refused at once, with a code: the POST that would start a job (the codes of osplan that the preflight gives: not_root, hop_not_planned, identity_unsupported, busy, no_room) and the runbook that cannot be given (no_plan, no_runbook). The page says it by Code; Detail is English, for whoever reads the raw answer.
func (*OSPlanRefusal) Error ¶ added in v0.4.73
func (r *OSPlanRefusal) Error() string
type OSUpgradeAckRequest ¶ added in v0.4.74
OSUpgradeAckRequest is the body of the owner's word. Word is the typed one that a machine that is half upgraded needs to be let go of (osrun.AckWord).
type OSUpgradeAfterRebootHint ¶ added in v0.4.74
type OSUpgradeAfterRebootHint struct {
BKPath string `json:"bk_path"`
Log string `json:"log"`
Commands []string `json:"commands"`
// Block8 is the owner's own text of the block that checks the machine after the restart, to run at a console.
Block8 string `json:"block8"`
}
OSUpgradeAfterRebootHint is what the owner keeps for the machine that does not come back.
type OSUpgradeBarrier ¶ added in v0.4.74
type OSUpgradeBarrier struct {
OK bool `json:"ok"`
Checks []OSUpgradeBarrierItem `json:"checks"`
}
OSUpgradeBarrier says whether the machine may be restarted, and which of the checks that stand before it do not pass.
type OSUpgradeBarrierItem ¶ added in v0.4.74
type OSUpgradeBarrierItem struct {
Code string `json:"code"`
OK bool `json:"ok"`
Severity string `json:"severity"`
// Arg says what a check is about when the code alone does not: the word of a warning that block 7 printed.
Arg string `json:"arg,omitempty"`
}
OSUpgradeBarrierItem is one check of the barrier.
type OSUpgradeBlock ¶ added in v0.4.74
type OSUpgradeBlock struct {
Index int `json:"index"`
ID string `json:"id"`
Title string `json:"title,omitempty"`
}
OSUpgradeBlock is a block of a run: its place in the list of the attempt, from 1, its id and its title.
type OSUpgradeFailure ¶ added in v0.4.74
type OSUpgradeFailure struct {
Stage string `json:"stage"`
Class string `json:"class"`
RC int `json:"rc"`
DetailLine string `json:"detail_line,omitempty"`
// Hint is a word for what the owner can do about it, when there is one (osrun.HintOf).
Hint string `json:"hint,omitempty"`
}
OSUpgradeFailure is what stopped a run.
type OSUpgradeFinding ¶ added in v0.4.74
type OSUpgradeFinding struct {
Code string `json:"code"`
Severity string `json:"severity"`
Arg string `json:"arg,omitempty"`
Apps []string `json:"apps,omitempty"`
}
OSUpgradeFinding is something that the judge found after the restart.
type OSUpgradeHint ¶ added in v0.4.74
type OSUpgradeHint struct {
Code string `json:"code"`
QuietSeconds int `json:"quiet_seconds,omitempty"`
Commands []string `json:"commands"`
}
OSUpgradeHint is a word for what the owner can do at the console. Code is "unit_quiet": the unit of the upgrade runs and has printed nothing for QuietSeconds. There is no button for it: stopping a unit that changes the packages is the owner's own act at the console, and with the unit stopped the run says where it stands and is closed, or gone on with, as any run is (with the typed word, when the machine is half upgraded). Code is "unwind_partial": the unit could not put everything back, and the folder that holds the copy of /etc/apt stays where it was; the commands say how to look at it and how to put back what was not.
type OSUpgradeManual ¶ added in v0.4.74
type OSUpgradeManual struct {
BlocksDone []string `json:"blocks_done"`
NextBlock string `json:"next_block,omitempty"`
PNR bool `json:"pnr"`
BKPath string `json:"bk_path"`
}
OSUpgradeManual is where the owner stands if they take the run over: the blocks that ended, the one to run next, whether the point of no return is behind, and the backup folder.
type OSUpgradeNotReturned ¶ added in v0.4.74
type OSUpgradeNotReturned struct {
Container string `json:"container"`
Policy string `json:"policy"`
}
OSUpgradeNotReturned is a container that ran before the upgrade and does not run after it.
type OSUpgradeReboot ¶ added in v0.4.74
type OSUpgradeReboot struct {
RequestedAt time.Time `json:"requested_at"`
Stalled bool `json:"stalled"`
}
OSUpgradeReboot is a restart that was asked for.
type OSUpgradeRefreshRequest ¶ added in v0.4.74
type OSUpgradeRefreshRequest struct {
AcceptReleaseInfoChange bool `json:"accept_releaseinfo_change"`
}
OSUpgradeRefreshRequest is the body of the start of a refresh. AcceptReleaseInfoChange is the owner's word that a repository whose release information changed (its Origin, Label or Codename: apt 2.2.4 takes a new Suite or Version without a word) is to be taken: apt refuses it unless it is told, and the refresh that stopped for it says so (failure.hint, releaseinfo_change).
type OSUpgradeRefusal ¶ added in v0.4.74
OSUpgradeRefusal is a request that was refused, with a code that the page puts in words. Detail is English, for whoever reads the raw answer; Data is what makes the code precise (never the name that the owner typed for the machine, nor the machine's own). The route says bad_request and start_failed with their own statuses and the others with 409.
func (*OSUpgradeRefusal) Error ¶ added in v0.4.74
func (r *OSUpgradeRefusal) Error() string
type OSUpgradeRunbook ¶ added in v0.4.74
type OSUpgradeRunbook struct {
PlanID string `json:"plan_id"`
Hop string `json:"hop"`
Text string `json:"text"`
Blocks []osplan.RunbookBlock `json:"blocks"`
// FromRun says that the text is the one that a run kept, and not the one that the live plan would give now.
FromRun bool `json:"from_run"`
}
OSUpgradeRunbook is the text for the owner who takes a run over (or who looks at where it stands): the owner's own text of the hop of the run that is open, as it was written when the run began, with its blocks. It does not need the plan to be alive: the run kept it.
type OSUpgradeStartRequest ¶ added in v0.4.74
type OSUpgradeStartRequest struct {
PlanID string `json:"plan_id"`
Rehearsal bool `json:"rehearsal"`
SafetyNet string `json:"safety_net"`
Hostname string `json:"hostname"`
AcceptRemovals []string `json:"accept_removals"`
PausedSources []string `json:"paused_sources"`
Acks []string `json:"acks"`
}
OSUpgradeStartRequest is the body of the start of an upgrade, which is checked field by field before anything is done: the plan that the owner read, what they said stands between them and a machine that does not come back, the name of the machine, the removals and the sources put aside that they accepted, and the acknowledgements that the plan asks for.
type OSUpgradeStatus ¶ added in v0.4.74
type OSUpgradeStatus struct {
BetaEnabled bool `json:"beta_enabled"`
State string `json:"state"`
Reason string `json:"reason,omitempty"`
Cause string `json:"cause,omitempty"`
RunID string `json:"run_id,omitempty"`
Kind string `json:"kind,omitempty"`
Hop string `json:"hop"`
PlanID string `json:"plan_id,omitempty"`
Phase string `json:"phase,omitempty"`
Attempt int `json:"attempt"`
// Block is the block that runs, or the one that stopped.
Block *OSUpgradeBlock `json:"block,omitempty"`
PNR bool `json:"pnr"`
Reversible bool `json:"reversible"`
HalfUpgraded bool `json:"half_upgraded"`
// Busy says that backups and automatic updates are kept away, and the owner is asked to leave the machine alone.
Busy bool `json:"busy"`
Since *time.Time `json:"since"`
LastActivityAt *time.Time `json:"last_activity_at"`
// LastRefreshAt is when the old release was last brought up to date (RFC 3339, UTC); absent when there is no such time, or it cannot be read.
LastRefreshAt *time.Time `json:"last_refresh_at,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
// Failure is what stopped a run: the block, the class (the page has a sentence for each), the status, and the line of the unit's output that said it.
Failure *OSUpgradeFailure `json:"failure,omitempty"`
// Hint is what the owner can do at the console about a unit that runs and has printed nothing for a long time.
Hint *OSUpgradeHint `json:"hint,omitempty"`
NotJudged []string `json:"not_judged,omitempty"`
Reboot *OSUpgradeReboot `json:"reboot,omitempty"`
Barrier *OSUpgradeBarrier `json:"barrier,omitempty"`
Findings []OSUpgradeFinding `json:"findings,omitempty"`
NotReturned []OSUpgradeNotReturned `json:"not_returned,omitempty"`
Manual OSUpgradeManual `json:"manual"`
// Actions are the buttons that are valid now: the server's table, which the page shows as it is.
Actions []string `json:"actions"`
// AckWord is the word that the owner types to close a run that left the machine half upgraded; present only when it is needed.
AckWord string `json:"ack_word,omitempty"`
// AfterRebootHint is what the owner needs if the machine does not come back, sent before the restart, since the machine is away when it is needed.
AfterRebootHint *OSUpgradeAfterRebootHint `json:"after_reboot_hint,omitempty"`
BootUnknown bool `json:"boot_unknown"`
IgnoredMarkers int `json:"ignored_markers"`
LogTail []string `json:"log_tail"`
}
OSUpgradeStatus is how an upgrade of the operating system is going, as the page reads it. Every text of it is a code, which the page puts in words: a line of the unit's output is only ever detail, and is never compared. It is the answer of the status route, and of every route that changes a run. The field names are the page's.
type OtherService ¶
type OtherService interface {
Search(key string) ([]model.SearchEngine, error)
AgentSearch(url string) ([]byte, error)
}
func NewOtherService ¶
func NewOtherService() OtherService
type PeerService ¶
type PeerService interface {
GetPeerByUserAgent(ua string) (m model2.PeerDriveDBModel)
GetPeerByID(id string) (m model2.PeerDriveDBModel)
GetPeers() (peers []model2.PeerDriveDBModel)
CreatePeer(m *model2.PeerDriveDBModel)
DeletePeer(id string)
GetPeerByName(name string) (m model2.PeerDriveDBModel)
}
func NewPeerService ¶
func NewPeerService(db *gorm.DB) PeerService
type RelyService ¶
type RelyService interface {
Create(rely model2.RelyDBModel)
Delete(id string)
GetInfo(id string) model2.RelyDBModel
}
func NewRelyService ¶
func NewRelyService(db *gorm.DB) RelyService
type Repository ¶
type Repository interface {
Casa() CasaService
Connections() ConnectionsService
Gateway() external.ManagementService
Health() HealthService
Notify() NotifyServer
Rely() RelyService
System() SystemService
Storage() StorageService
MessageBus() *message_bus.ClientWithResponses
Peer() PeerService
Other() OtherService
}
var (
MyService Repository
)
func NewService ¶
func NewService(db *gorm.DB, RuntimePath string) Repository
type SharesService ¶
type SharesService interface {
}
func NewSharesService ¶
func NewSharesService(db *gorm.DB) SharesService
type StorageService ¶
type StorageService interface {
MountStorage(mountPoint, fs string) error
UnmountStorage(mountPoint string) error
GetStorages() (httper.MountList, error)
CreateConfig(data map[string]string, name string, t string) error
CheckAndMountByName(name string) error
CheckAndMountAll() error
GetConfigByName(name string) (map[string]string, error)
DeleteConfigByName(name string) error
GetConfig() (httper.RemotesResult, error)
}
func NewStorageService ¶
func NewStorageService() StorageService
type SystemDockerContainers ¶ added in v0.4.67
type SystemDockerContainers struct {
// Running is whether the Docker daemon answered. When it did not, there is no list.
Running bool `json:"running"`
// Containers are the containers that run now, never null. Names and images are text the
// owner's apps chose, and are for display only.
Containers []dockerpkg.Container `json:"containers"`
}
SystemDockerContainers is the running containers, as the confirmation of an update of Docker lists them: the update stops every one of them, and only those with a restart policy start again by themselves.
type SystemDockerUpdateStatus ¶ added in v0.4.67
type SystemDockerUpdateStatus struct {
Supported bool `json:"supported"`
// State is idle, running, finalizing, succeeded or failed.
State string `json:"state"`
// Phase is the step a run that is going on is at: preparing, downloading (the apps run),
// installing (Docker restarts), waiting_docker (for the daemon), waiting_containers (for the
// apps). It is "" for a run that has ended and when nothing runs: see dockerpkg.Run.Phase.
Phase string `json:"phase"`
// Outcome is success or restart_pending (State succeeded), failed (State failed), or "".
Outcome string `json:"outcome"`
Error string `json:"error"`
// ErrorCode is guard, download, install, daemon, start or no_result for a run that failed,
// and the code of the refusal for a start that was refused.
ErrorCode string `json:"error_code"`
// RefusalDetail goes with a refusal: the names of the packages or of the apps it is about.
RefusalDetail []string `json:"refusal_detail,omitempty"`
// ExitCode is there for the page's sake and is null: the unit reports in its log.
ExitCode *int `json:"exit_code"`
StartedAt string `json:"started_at"`
CompletedAt string `json:"completed_at"`
// From and To are the engine's versions before and after, from the log: the plan's until the
// unit says better (what it saw installed, which daemon runs), "" when none is known yet.
From string `json:"from"`
To string `json:"to"`
// MajorJump is the plan's own word that the update changes the engine's first number (28 to
// 29), from the PLAN line the core wrote; false for a log that has none. After one the
// packages can be put back and Docker starts, and the containers do not start again by
// themselves: no RollbackCommand is given.
MajorJump bool `json:"major_jump"`
// Held is whether the unit saw packages of the engine on hold when it started, and HeldPackages
// which, sorted; never null. The update went ahead of that hold, as the terminal command with
// --allow-change-held-packages does, and dpkg drops the hold of every package it unpacks: the unit
// puts it back, and HoldsKept is true only when it said, at its end, that every one of them is on hold
// again. It is false for a run that held nothing, for one whose hold could not be put back, and for one
// that did not say (a unit that was lost), which the page tells apart by Held.
Held bool `json:"held"`
HeldPackages []string `json:"held_packages"`
HoldsKept bool `json:"holds_kept"`
// NotReturned are the containers that were running before and were not after.
NotReturned []dockerpkg.NotReturned `json:"not_returned"`
// RollbackCommand is what to type to put the packages back, for a run that failed and was not
// a major jump; "" otherwise. For a run that went ahead of a hold it carries
// --allow-change-held-packages, as the update did, and ends with `; sudo apt-mark hold` and the
// names of the packages that were on hold (HeldPackages): dpkg drops the hold of every package it
// unpacks, and this command unpacks them again.
RollbackCommand string `json:"rollback_command"`
// Log is the end of the unit's log, at most 128 KiB.
Log string `json:"log"`
}
SystemDockerUpdateStatus is how the update of Docker is going, or how it went: the same object comes back from the start and from the status.
type SystemModuleStatus ¶ added in v0.4.75
type SystemModuleStatus struct {
Job modulecmd.Job `json:"job"`
Status modulecmd.StatusResult `json:"status"`
}
SystemModuleStatus is how a module is: the job that the core started for it, if there is one (or the last that was), and what the module assistant says of the module.
type SystemOSPlanStatus ¶ added in v0.4.73
type SystemOSPlanStatus struct {
// Plannable says whether a plan can be made for this box; when it cannot, Reason is why (not_root, identity_unsupported,
// hop_not_planned). Unknown says that it could not be told (a question to the machine that went wrong or took too long): it
// is not a reason, there is none, and the page asks again.
Plannable bool `json:"plannable"`
Reason string `json:"reason,omitempty"`
Unknown bool `json:"unknown,omitempty"`
// State is idle (no plan, or one that expired), running, done or failed; Phase is the phase of a job that runs, or the one a
// job that failed was in.
State string `json:"state"`
Phase string `json:"phase,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
// ExpiresAt is when the plan of a job that is done expires, or expired (Expired, with the state idle).
ExpiresAt *time.Time `json:"expires_at,omitempty"`
Expired bool `json:"expired,omitempty"`
// AlreadyRunning is said by the answer to a request that found a job running, and started none.
AlreadyRunning bool `json:"already_running,omitempty"`
Error *osplan.Failure `json:"error,omitempty"`
// SandboxLeftBehind is the directory of the sandbox that a job that is over could not remove: its whole path, like
// "/var/tmp/casaos-os-plan.481516", and nothing else (nothing of what was in it).
SandboxLeftBehind string `json:"sandbox_left_behind,omitempty"`
// Plan is the plan of a job that is done, without the tree of the sources (the runbook has it).
Plan *osplan.Plan `json:"plan,omitempty"`
}
SystemOSPlanStatus is how the plan of the upgrade is going, or how it went: what GET /v1/sys/os/upgrade/plan says, and the answer to the POST that starts it.
type SystemPackageDocker ¶ added in v0.4.65
type SystemPackageDocker struct {
Installed bool `json:"installed"`
// Origin is where Docker came from: see dockerpkg.Origin.
Origin string `json:"origin,omitempty"`
// Version is the engine's, from its package: 29.8.1.
Version string `json:"version,omitempty"`
// Updates is what apt offers for Docker's packages; none of it is installed by the
// System packages update.
Updates []SystemPackageUpdate `json:"updates"`
// Candidate is a newer engine version that apt knows of and does not offer for an
// update, with Held saying whether packages of the engine are on hold (any of them: they
// move together, and a held sibling keeps docker-ce back as much as its own hold does):
// said, rather than "up to date", of a Docker that is behind and that this update cannot move.
Candidate string `json:"candidate,omitempty"`
Held bool `json:"held,omitempty"`
// RestartsDocker is whether installing those updates restarts the daemon: the engine's
// own packages do, a plugin or the client do not.
RestartsDocker bool `json:"restarts_docker"`
// ManualCommand is what to type to update Docker oneself; empty when this does not
// know a command to stand behind. For a box that has packages of the engine on hold it
// names all of the engine's installed packages and puts the hold back afterwards (see
// dockerpkg.ManualCommandHeld).
ManualCommand string `json:"manual_command,omitempty"`
// Update is whether the page may update the engine itself, and with what; absent when
// there is nothing to update.
Update *SystemPackageDockerUpdate `json:"update,omitempty"`
}
SystemPackageDocker is the Docker line of the System packages check.
type SystemPackageDockerUpdate ¶ added in v0.4.67
type SystemPackageDockerUpdate struct {
// Available is true when the button may be offered: nothing refuses it, and there is
// something to update.
Available bool `json:"available"`
// Refusal is "" or one of the DockerRefusal codes.
Refusal string `json:"refusal"`
// RefusalDetail is the names of the packages that make the plan unacceptable (valid
// package names, or dockerpkg.InvalidName, or dockerpkg.TooManyNew), for DockerRefusalPlan;
// otherwise empty, never null.
RefusalDetail []string `json:"refusal_detail"`
// Held is whether packages of the engine are on hold, and HeldPackages which, sorted; never
// null. The update may be available all the same: it goes ahead of the hold only when the
// owner allows it, and PlanID covers the hold, so that one that is set, removed or moved after
// the owner confirmed is another plan. A refusal that comes before the question of the holds
// (unsupported, origin) says none.
Held bool `json:"held"`
HeldPackages []string `json:"held_packages"`
// From and To are the engine's version before and after, digits and dots: 28.0.4, 29.8.0.
// They are the same when only a package other than docker-ce moves.
From string `json:"from"`
To string `json:"to"`
// MajorJump is a change of the engine's first number: 28 to 29.
MajorJump bool `json:"major_jump"`
// PlanID names the plan, see dockerpkg.Plan.ID: the page sends it back to say which plan
// the owner confirmed.
PlanID string `json:"plan_id"`
// Packages are what the plan installs, upgrades and new packages, with the whole dpkg
// versions, sorted by name; never null. A refusal for a reason that comes before the plan
// has none; neither does one for DockerRefusalPlan.
Packages []SystemPackageUpdate `json:"packages"`
}
SystemPackageDockerUpdate is what the check says of updating the engine from the page. It is there when the engine has something to update.
type SystemPackageUpdate ¶
type SystemPackageUpdate struct {
Name string `json:"name"`
CurrentVersion string `json:"current_version"`
CandidateVersion string `json:"candidate_version"`
// New is only ever set in the plan of the Docker update (docker.update.packages): a package
// that is not installed yet, a dependency of the new engine, whose CurrentVersion is "". It
// is absent from the JSON of an upgrade, and so from every list of updates the check makes.
New bool `json:"new,omitempty"`
}
type SystemPackageUpdateStatus ¶
type SystemPackageUpdateStatus struct {
Supported bool `json:"supported"`
Manager string `json:"manager,omitempty"`
State string `json:"state"`
Log string `json:"log,omitempty"`
Error string `json:"error,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
RebootRequired bool `json:"reboot_required"`
}
type SystemPackageUpdates ¶
type SystemPackageUpdates struct {
Supported bool `json:"supported"`
Manager string `json:"manager,omitempty"`
Reason string `json:"reason,omitempty"`
Updates []SystemPackageUpdate `json:"updates"`
Count int `json:"count"`
CheckedAt *time.Time `json:"checked_at,omitempty"`
RebootRequired bool `json:"reboot_required"`
// Docker is shown on a line of its own: the update never installs it.
Docker *SystemPackageDocker `json:"docker,omitempty"`
}
type SystemService ¶
type SystemService interface {
UpdateSystemVersion(version string) error
// MaintenanceBusy says whether a package update, an update of Docker or a package
// manager is changing the box now.
MaintenanceBusy() bool
GetSystemPackageUpdates() (SystemPackageUpdates, error)
StartSystemPackageUpdate() (SystemPackageUpdateStatus, error)
GetSystemPackageUpdateStatus() SystemPackageUpdateStatus
// GetSystemDockerContainers lists the running containers, which an update of Docker stops.
GetSystemDockerContainers() SystemDockerContainers
// StartDockerUpdate updates the Docker engine to the plan the owner confirmed (its id), going ahead
// of a hold on the engine's packages only if allowHeld, the owner's word (dpkg drops the hold of
// the packages it unpacks: the unit puts it back). A *DockerUpdateRefusal says why it did not
// start; the status comes with the error.
StartDockerUpdate(planID string, allowHeld bool) (SystemDockerUpdateStatus, error)
// DockerUpdateStatus says how the update of Docker is going, or how it went.
DockerUpdateStatus() SystemDockerUpdateStatus
// SetAppOperations tells how to ask which apps have an operation in progress; the update of
// Docker is refused while it cannot be asked.
SetAppOperations(list AppOperationsFunc)
// DockerUpdateRun is DockerUpdateStatus and the nonce of the run it is about ("" with none).
DockerUpdateRun() (SystemDockerUpdateStatus, string)
// DockerUpdateMuted says whether the alerts about the apps' containers are to be kept quiet:
// the update of Docker runs, or ended less than ten minutes ago. It takes no lock and is cheap.
DockerUpdateMuted() bool
// OnDockerUpdateQueued sets what is called when a run of the Docker update has its log: it
// must return at once.
OnDockerUpdateQueued(queued func())
// GetSystemOS is the operating system and how long its security updates last: it only reads.
GetSystemOS() ossupport.Report
// GetSystemOSReadiness is the report of whether the box could be upgraded to the next release of
// its operating system, and why not: it only reads, and takes up to twenty seconds.
GetSystemOSReadiness() osreadiness.Answer
// StartSystemOSPlan starts the job that makes the plan of the upgrade of the operating system: what apt would
// do, in a sandbox, with the machine unchanged. A job that runs is the answer (AlreadyRunning) and none is
// started; an *OSPlanRefusal says why none was.
StartSystemOSPlan() (SystemOSPlanStatus, error)
// GetSystemOSPlan says how the plan is going, or how it went, and whether one can be made: it runs no apt
// and waits for no lock.
GetSystemOSPlan() SystemOSPlanStatus
// GetSystemOSRunbook is the text with which to do the hop by hand, written from the plan that is there; an
// *OSPlanRefusal says why there is none.
GetSystemOSRunbook() (*osplan.Runbook, error)
// StopSystemOSPlan cancels the plan that is being made, and waits (no longer than wait) for it to have
// removed its directory: the core's end.
StopSystemOSPlan(wait time.Duration)
// SetSystemOSUpgradeBeta turns the upgrade of the operating system on or off for what begins something (the flag file); an
// *OSUpgradeRefusal run_open says that it is not turned off while a run is open.
SetSystemOSUpgradeBeta(enabled bool) error
// GetSystemOSUpgradeStatus is how the upgrade is going, for the page that polls it: it runs no apt, takes no lock of a run, and
// answers whatever the state of the machine.
GetSystemOSUpgradeStatus() OSUpgradeStatus
// StartSystemOSUpgrade starts the upgrade (or its rehearsal) for the plan that the owner read; the owner's buttons below act on
// the run that it makes. Each of them answers the status that follows it, and an *OSUpgradeRefusal says why it did not act.
StartSystemOSUpgrade(req OSUpgradeStartRequest) (OSUpgradeStatus, error)
// StartSystemOSUpgradeRefresh brings the release that the machine runs to its last state, before a plan is made: a run of its own kind, with no point of no return.
StartSystemOSUpgradeRefresh(req OSUpgradeRefreshRequest) (OSUpgradeStatus, error)
RebootSystemOSUpgrade() (OSUpgradeStatus, error)
ResumeSystemOSUpgrade() (OSUpgradeStatus, error)
AbortSystemOSUpgrade() (OSUpgradeStatus, error)
AckSystemOSUpgrade(req OSUpgradeAckRequest) (OSUpgradeStatus, error)
// GetSystemOSUpgradeRunbook is the owner's own text of the run that is open, for the owner who takes it over.
GetSystemOSUpgradeRunbook() (*OSUpgradeRunbook, error)
// StartSystemOSUpgradeSettle starts the loop that looks at the upgrade that is open, once, when the core is ready to serve;
// StopSystemOSUpgradeSettle ends it and waits, for no longer than wait, for the look that is being made.
StartSystemOSUpgradeSettle(ctx context.Context)
StopSystemOSUpgradeSettle(wait time.Duration)
// OSUpgradeMuted says whether the alerts about the apps' containers are to be kept quiet: an upgrade holds the machine, or let
// go of it less than ten minutes ago. SetOSUpgradeNotifier sets what tells the owner of what became of an upgrade.
OSUpgradeMuted() bool
SetOSUpgradeNotifier(notify func(key, sentence string))
// ListSystemModules is the modules of this release with what the box says of each; StartSystemModuleInstall and StartSystemModuleRemove start the unit that installs or removes one
// (an *ModuleRefusal says why not), PlanSystemModule says what installing it would do and GetSystemModuleStatus how the job of the module is going.
ListSystemModules() (modulecmd.ListResult, error)
PlanSystemModule(name string) (osmodule.PlanResult, error)
StartSystemModuleInstall(ctx context.Context, name, planID string) (SystemModuleStatus, error)
StartSystemModuleRemove(ctx context.Context, name string) (SystemModuleStatus, error)
GetSystemModuleStatus(name string) (SystemModuleStatus, error)
GetSystemConfigDebug() []string
GetCasaOSLogs(lineNumber int) string
UpdateAssist()
UpSystemPort(port string)
GetTimeZone() string
UpAppOrderFile(str, id string)
GetAppOrderFile(id string) []byte
GetNet(physics bool) []string
GetNetInfo() []net.IOCountersStat
GetCpuCoreNum() int
GetCpuPercent() float64
GetMemInfo() map[string]interface{}
GetCpuInfo() []cpu.InfoStat
GetDirPath(path string) ([]model.Path, error)
GetDirPathOne(path string) (m model.Path)
GetNetState(name string) string
GetDiskInfo() *disk.UsageStat
GetSysInfo() host.InfoStat
GetDeviceTree() string
GetDeviceInfo() model.DeviceInfo
CreateFile(path string) (int, error)
RenameFile(oldF, newF string) (int, error)
MkdirAll(path string) (int, error)
GetCPUTemperature() int
GetCPUPower() map[string]string
GetMacAddress() (string, error)
SystemReboot() error
SystemShutdown() error
GetSystemEntry() string
GenreateSystemEntry()
}
func NewSystemService ¶
func NewSystemService() SystemService
Source Files
¶
- casa.go
- connections.go
- data_ handling.go
- disk_space_linux.go
- dpkg_lock_linux.go
- file.go
- file_upload.go
- health.go
- notify.go
- other.go
- peer.go
- rely.go
- samba_user.go
- service.go
- shares.go
- shares_samba.go
- socket.go
- storage.go
- system.go
- system_docker_containers.go
- system_module.go
- system_module_unit.go
- system_os.go
- system_os_plan.go
- system_os_plan_sandbox.go
- system_os_plan_sandbox_linux.go
- system_os_readiness.go
- system_os_upgrade.go
- system_os_upgrade_abort.go
- system_os_upgrade_ack.go
- system_os_upgrade_actions.go
- system_os_upgrade_alerts.go
- system_os_upgrade_barrier.go
- system_os_upgrade_begin.go
- system_os_upgrade_busy.go
- system_os_upgrade_dir.go
- system_os_upgrade_judge.go
- system_os_upgrade_launch.go
- system_os_upgrade_linux.go
- system_os_upgrade_power.go
- system_os_upgrade_read.go
- system_os_upgrade_reboot.go
- system_os_upgrade_refresh.go
- system_os_upgrade_resume.go
- system_os_upgrade_runbook.go
- system_os_upgrade_settle.go
- system_os_upgrade_start.go
- system_os_upgrade_status.go
- system_os_upgrade_unit.go
- system_package.go
- system_package_docker.go
- system_package_docker_alerts.go
- system_package_docker_run.go
- system_package_docker_script.go
- system_package_docker_update.go
Directories
¶
| Path | Synopsis |
|---|---|
|
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 17:17:57 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-01 17:08:08 * @FilePath: /CasaOS/service/model/o_connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
|
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 17:17:57 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-01 17:08:08 * @FilePath: /CasaOS/service/model/o_connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved. |