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 (
NewVersionApp map[string]string // TODO - make use of this
)
Functions ¶
func PublishEventWrapper ¶ added in v0.4.2
Types ¶
type DockerService ¶
type DockerService interface {
// image
IsExistImage(imageName string) bool
PullImage(ctx context.Context, imageName string) error
PullLatestImage(ctx context.Context, imageName string) (bool, error)
RemoveImage(name string) error
// container
CheckContainerHealth(id string) (bool, error)
CreateContainer(m model.CustomizationPostData, id string) (containerID string, err error)
CreateContainerShellSession(container, row, col string) (hr types.HijackedResponse, err error)
DescribeContainer(ctx context.Context, 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
RecreateContainer(ctx context.Context, id string, pull bool, force bool) error
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 GitService ¶ added in v0.4.2
type GitService struct {
// contains filtered or unexported fields
}
func NewGitService ¶ added in v0.4.2
func NewGitService() *GitService
type Services ¶
type Services interface {
V1AppStore() v1.AppStore
V2AppStore() *v2.AppStore
// Git() *GitService
Compose() *v2.ComposeService
Docker() DockerService
Gateway() external.ManagementService
Notify() external.NotifyService
MessageBus() *message_bus.ClientWithResponses
}
var (
MyService Services
)
func NewService ¶
Click to show internal directories.
Click to hide internal directories.