Documentation
¶
Overview ¶
@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.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DockerContainerStats1 ¶
func DockerContainerStats1() error
func RemoveImage ¶ added in v0.4.1
Types ¶
type AppStore ¶ added in v0.4.1
type AppStore interface {
GetServerList(index, size, tp, categoryID, key string) (model.ServerAppListCollection, error)
GetServerAppInfo(id, t string, language string) (model.ServerAppList, error)
GetServerCategoryList() (list []model.CategoryList, err error)
AsyncGetServerCategoryList() ([]model.CategoryList, error)
}
func NewAppService ¶
func NewAppService() AppStore
type DockerService ¶
type DockerService interface {
// image
IsExistImage(imageName string) bool
PullImage(imageName string, icon, name string) error
RemoveImage(name string) error
// container
CheckContainerHealth(id string) (bool, error)
CloneContainer(info *types.ContainerJSON) (containerID string, err error)
CreateContainer(m model.CustomizationPostData, id string) (containerID string, err error)
CreateContainerShellSession(container, row, col string) (hr types.HijackedResponse, err error)
DescribeContainer(name string) (*types.ContainerJSON, error)
GetContainer(id string) (types.Container, error)
GetContainerAppList(name, image, state *string) (*[]model.MyAppList, *[]model.MyAppList)
GetContainerByName(name string) (*types.Container, error)
GetContainerLog(name string) ([]byte, error)
GetContainerStats() []model.DockerStatsModel
RemoveContainer(name string, update bool) error
RenameContainer(name, id string) (err error)
StartContainer(name string) error
StopContainer(id string) error
// network
GetNetworkList() []types.NetworkResource
// docker server
GetServerInfo() (types.Info, error)
}
func NewDockerService ¶
func NewDockerService() DockerService
type Services ¶
type Services interface {
AppStore() AppStore
Docker() DockerService
Gateway() external.ManagementService
Notify() external.NotifyService
MessageBus() *message_bus.ClientWithResponses
}
func NewService ¶
Click to show internal directories.
Click to hide internal directories.