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 ¶
- Variables
- func DockerContainerStats1() error
- func DockerEx()
- func DockerImageRemove(name string) error
- func DockerLog()
- func DockerLogs()
- func DockerNetwork()
- func DockerPull()
- func Exec(container, row, col string) (hr types.HijackedResponse, err error)
- func GetToken() string
- func MsqlExec(container string) error
- type AppService
- type DockerService
- type Repository
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Cache *cache.Cache MyService Repository NewVersionApp map[string]string )
Functions ¶
func DockerContainerStats1 ¶
func DockerContainerStats1() error
func DockerImageRemove ¶
func DockerLogs ¶
func DockerLogs()
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) (*[]model2.MyAppList, *[]model2.MyAppList) SaveContainer(m model2.AppListDBModel) GetUninstallInfo(id string) model2.AppListDBModel DeleteApp(id string) GetContainerInfo(id string) (types.Container, error) GetAppDBInfo(id string) model2.AppListDBModel UpdateApp(m model2.AppListDBModel) GetSimpleContainerInfo(id string) (types.Container, error) DelAppConfigDir(path string) GetSystemAppList() []types.Container GetHardwareUsageStream() GetHardwareUsage() []model.DockerStatsModel GetAppStats(id string) string GetAllDBApps() []model2.AppListDBModel ImportApplications(casaApp bool) CheckNewImage() }
func NewAppService ¶
func NewAppService(db *gorm.DB) 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) DockerContainerCommit(name string) DockerContainerList() []types.Container DockerNetworkModelList() []types.NetworkResource DockerImageInfo(image string) (types.ImageInspect, error) GetNetWorkNameByNetWorkID(id string) (string, error) ContainerExecShell(container_id string) string GetDockerInfo() (types.Info, error) }
func NewDockerService ¶
func NewDockerService() DockerService
type Repository ¶
type Repository interface { App() AppService Docker() DockerService Gateway() external.ManagementService }
func NewService ¶
func NewService(db *gorm.DB, RuntimePath string) Repository
Directories ¶
Path | Synopsis |
---|---|
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-07-13 10:56:34 * @FilePath: /CasaOS/service/model/o_container.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
|
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-07-13 10:56:34 * @FilePath: /CasaOS/service/model/o_container.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved. |
Click to show internal directories.
Click to hide internal directories.