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 ¶
View Source
var ( Cache *cache.Cache MyService Services NewVersionApp map[string]string )
Functions ¶
func DockerContainerStats1 ¶
func DockerContainerStats1() error
func DockerImageRemove ¶
Types ¶
type AppService ¶
type AppService 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) GetMyList(index, size int, position bool) (*[]model.MyAppList, *[]model.MyAppList) GetContainerInfo(id string) (types.Container, error) GetSimpleContainerInfo(id string) (types.Container, error) GetSystemAppList() []types.Container GetHardwareUsageStream() GetHardwareUsage() []model.DockerStatsModel GetAppStats(id string) string }
func NewAppService ¶
func NewAppService() AppService
type DockerService ¶
type DockerService interface { DockerPullImage(imageName string, icon, name string) error IsExistImage(imageName string) bool DockerContainerCreate(m model.CustomizationPostData, id string) (containerID string, err error) DockerContainerCopyCreate(info *types.ContainerJSON) (containerID string, err error) DockerContainerStart(name string) error DockerContainerStats(name string) (string, error) DockerListByName(name string) (*types.Container, error) DockerListByImage(image, version string) (*types.Container, error) DockerContainerInfo(name string) (*types.ContainerJSON, error) DockerImageRemove(name string) error DockerContainerRemove(name string, update bool) error DockerContainerStop(id string) error DockerContainerUpdateName(name, id string) (err error) DockerContainerUpdate(m model.CustomizationPostData, id string) (err error) DockerContainerLog(name string) ([]byte, error) DockerContainerList() []types.Container DockerNetworkModelList() []types.NetworkResource GetDockerInfo() (types.Info, error) }
func NewDockerService ¶
func NewDockerService() DockerService
type Services ¶
type Services interface { App() AppService Docker() DockerService Gateway() external.ManagementService Notify() external.NotifyService MessageBus() *message_bus.ClientWithResponses }
func NewService ¶
Click to show internal directories.
Click to hide internal directories.