dvservice

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppService

type AppService struct {
}

func GetAppService

func GetAppService() *AppService

func (*AppService) CreateApp

func (s *AppService) CreateApp(info *req.AppUpsertReq) error

func (*AppService) DeleteApp

func (s *AppService) DeleteApp(id int64) error

func (*AppService) FindOneById

func (s *AppService) FindOneById(id int64) (*dvmodel.App, error)

func (*AppService) FindOneByNameAndVersion

func (s *AppService) FindOneByNameAndVersion(name, version string) (*dvmodel.App, error)

func (*AppService) GetUploadTmpDir

func (s *AppService) GetUploadTmpDir(workDir string) string

func (*AppService) PageList

func (s *AppService) PageList(keyword string, page, pageSize int) (*res.PageableData[*dvmodel.App], error)

func (*AppService) UpdateApp

func (s *AppService) UpdateApp(id int64, info *req.AppUpsertReq) error

type ExplorerService

type ExplorerService struct {
}

func GetExplorerService

func GetExplorerService() *ExplorerService

func (*ExplorerService) ListEntries

func (s *ExplorerService) ListEntries(parentDir string) ([]*dvRes.ExplorerEntry, error)

type ExplorerSftpService added in v0.1.0

type ExplorerSftpService struct {
}

func GetExplorerSftpService added in v0.1.0

func GetExplorerSftpService() *ExplorerSftpService

func (*ExplorerSftpService) CreateDir added in v0.1.0

func (s *ExplorerSftpService) CreateDir(r *req.SftpCreateDirReq, host *dvmodel.Host) error

func (*ExplorerSftpService) DeleteEntry added in v0.1.0

func (s *ExplorerSftpService) DeleteEntry(path string, host *dvmodel.Host) error

func (*ExplorerSftpService) DownloadFile added in v0.1.0

func (s *ExplorerSftpService) DownloadFile(filePath string, host *dvmodel.Host, w io.Writer) error

func (*ExplorerSftpService) ListEntries added in v0.1.0

func (s *ExplorerSftpService) ListEntries(parentDir string, host *dvmodel.Host) ([]*dvRes.ExplorerEntry, error)

func (*ExplorerSftpService) Rename added in v0.1.0

func (s *ExplorerSftpService) Rename(r *req.SftpRenameReq, host *dvmodel.Host) error

func (*ExplorerSftpService) UploadFile added in v0.1.0

func (s *ExplorerSftpService) UploadFile(filePath string, file multipart.File, host *dvmodel.Host) error

type GroupService

type GroupService struct {
}

func GetGroupService

func GetGroupService() *GroupService

func (*GroupService) CreateGroup

func (s *GroupService) CreateGroup(info *req.GroupUpsertReq) error

func (*GroupService) DeleteGroup

func (s *GroupService) DeleteGroup(id int64) error

func (*GroupService) FindOneById

func (s *GroupService) FindOneById(id int64, preloads ...string) (*dvmodel.Group, error)

func (*GroupService) PageList

func (s *GroupService) PageList(keyword string, page, pageSize int) (*res.PageableData[*dvmodel.Group], error)

func (*GroupService) UpdateGroup

func (s *GroupService) UpdateGroup(id int64, info *req.GroupUpsertReq) error

type HostService

type HostService struct {
}

func GetHostService

func GetHostService() *HostService

func (*HostService) CreateHost

func (s *HostService) CreateHost(info *req.HostUpsertReq) error

func (*HostService) DeleteHost

func (s *HostService) DeleteHost(id int64) error

func (*HostService) FindAll

func (s *HostService) FindAll() ([]*dvRes.HostBasicRes, error)

func (*HostService) FindOneById

func (s *HostService) FindOneById(id int64) (*dvmodel.Host, error)

func (*HostService) FindOneByIp

func (s *HostService) FindOneByIp(ip string) (*dvmodel.Host, error)

func (*HostService) PageList

func (s *HostService) PageList(keyword string, page, pageSize int) (*res.PageableData[*dvmodel.Host], error)

func (*HostService) SshConnectTest

func (s *HostService) SshConnectTest(params *req.SshConnectTestParams) (connectSuccess bool)

func (*HostService) UpdateHost

func (s *HostService) UpdateHost(id int64, info *req.HostUpsertReq) error

type ScriptService

type ScriptService struct {
}

func GetScriptService

func GetScriptService() *ScriptService

func (*ScriptService) CreateScript

func (s *ScriptService) CreateScript(info *req.ScriptUpsertReq) error

func (*ScriptService) DeleteScript

func (s *ScriptService) DeleteScript(id int64) error

func (*ScriptService) FindOneById

func (s *ScriptService) FindOneById(id int64) (*dvmodel.Script, error)

func (*ScriptService) FindOneByNameAndVersion

func (s *ScriptService) FindOneByNameAndVersion(name, version string) (*dvmodel.Script, error)

func (*ScriptService) PageList

func (s *ScriptService) PageList(keyword string, page, pageSize int) (*res.PageableData[*dvRes.ScriptRes], error)

func (*ScriptService) UpdateScript

func (s *ScriptService) UpdateScript(id int64, info *req.ScriptUpsertReq) error

type SshService added in v1.0.0

type SshService struct {
}

func GetSshService added in v1.0.0

func GetSshService() *SshService

func (*SshService) CreateSshClient added in v1.0.0

func (s *SshService) CreateSshClient(host *dvmodel.Host) (*ssh.Client, error)

type WorkDirService added in v1.0.0

type WorkDirService struct {
	// contains filtered or unexported fields
}

func GetWorkdirService added in v1.0.0

func GetWorkdirService() *WorkDirService

func (*WorkDirService) CreateDirectory added in v1.0.0

func (s *WorkDirService) CreateDirectory(relativeDirPath string) error

func (*WorkDirService) CreateFile added in v1.0.0

func (s *WorkDirService) CreateFile(relativeFilePath string) (*os.File, error)

func (*WorkDirService) GetWorkDir added in v1.0.0

func (s *WorkDirService) GetWorkDir() string

func (*WorkDirService) RemoveDirectory added in v1.0.0

func (s *WorkDirService) RemoveDirectory(relativeDirPath string) error

func (*WorkDirService) RemoveFile added in v1.0.0

func (s *WorkDirService) RemoveFile(relativeFilePath string) error

Directories

Path Synopsis
dto
req
res
log

Jump to

Keyboard shortcuts

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