service

package
v0.4.0-alpha7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

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

func DockerImageRemove(name string) error

func Exec

func Exec(container, row, col string) (hr types.HijackedResponse, err error)

func GetToken

func GetToken() string

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)
	ShareAppFile(body []byte) string

	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

func NewService(RuntimePath string) Services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL