Documentation ¶
Index ¶
- Variables
- func Containerd()
- 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 GetHead() map[string]string
- func GetSearchType(ext string) int
- func GetToken() string
- func LoginGetToken(username, pwd string) string
- func MsqlExec(container string) error
- func NewReader(ctx context.Context, r io.Reader) io.Reader
- func NewWriter(ctx context.Context, w io.Writer) io.Writer
- func SyncTask(db *gorm.DB)
- func UpdateDDNSList(db *gorm.DB)
- func ZeroTierGet(url string, cookies []*http.Cookie, t uint8) (action string, c []*http.Cookie, isExistSession bool)
- func ZeroTierPost(str bytes.Buffer, action string, cookies []*http.Cookie, isLogin bool) (url, errInfo string, err error)
- type AppService
- type CasaService
- type DDNSService
- type DiskService
- type DockerService
- type GithubService
- type NotifyServer
- type RedisService
- type RelyService
- type Repository
- type SearchService
- type ShareDirService
- type ShortcutsService
- type SystemService
- type TaskService
- type UserService
- type ZeroTierService
- type ZiMaService
Constants ¶
This section is empty.
Variables ¶
View Source
var Cache *cache.Cache
Functions ¶
func Containerd ¶
func Containerd()
func DockerContainerStats1 ¶
func DockerContainerStats1() error
func DockerImageRemove ¶
func DockerLogs ¶
func DockerLogs()
func GetSearchType ¶
func LoginGetToken ¶
登录并获取token,会出现账号密码错误,和邮箱未验证情况,目前未出现其他情况
func NewReader ¶ added in v0.2.4
NewReader wraps an io.Reader to handle context cancellation.
Context state is checked BEFORE every Read.
Types ¶
type AppService ¶
type AppService interface { GetMyList(index, size int, position bool) *[]model2.MyAppList SaveContainer(m model2.AppListDBModel) GetUninstallInfo(id string) model2.AppListDBModel RemoveContainerById(id string) GetContainerInfo(name string) (types.Container, error) GetAppDBInfo(id string) model2.AppListDBModel UpdateApp(m model2.AppListDBModel) GetSimpleContainerInfo(name string) (types.Container, error) DelAppConfigDir(path string) GetSystemAppList() *[]model2.MyAppList GetHardwareUsageSteam() GetHardwareUsage() []model.DockerStatsModel GetAppStats(id string) string }
func NewAppService ¶
func NewAppService(db *gorm.DB, logger loger2.OLog) AppService
type CasaService ¶
type CasaService interface { GetServerList(index, size, tp, categoryId, key, language string) (recommend, list, community []model.ServerAppList) GetServerCategoryList() []model.ServerCategoryList GetTaskList(size int) []model2.TaskDBModel GetServerAppInfo(id, t string, language string) model.ServerAppList }
func NewOasisService ¶
func NewOasisService() CasaService
type DDNSService ¶
type DDNSService interface { IsExis(t int, domain string, host string) bool GetExternalIP() (string, string) GetConfigList() *[]model.DDNSList DeleteConfig(id uint) bool GetType(name string) (uint, string) SaveConfig(model model.DDNSUpdateDBModel) error }
func NewDDNSService ¶
func NewDDNSService(db *gorm.DB, log loger2.OLog) DDNSService
type DiskService ¶
type DiskService interface { GetPlugInDisk() []string LSBLK() []model.LSBLKModel SmartCTL(path string) model.SmartctlA FormatDisk(path, format string) []string UmountPointAndRemoveDir(path string) []string GetDiskInfo(path string) model.LSBLKModel DelPartition(path, num string) string AddPartition(path string) string GetDiskInfoByPath(path string) *disk.UsageStat MountDisk(path, volume string) GetSerialAll() []model2.SerialDisk SaveMountPoint(m model2.SerialDisk) DeleteMountPoint(path, mountPoint string) DeleteMount(id string) UpdateMountPoint(m model2.SerialDisk) RemoveLSBLKCache() }
func NewDiskService ¶
func NewDiskService(log loger2.OLog, db *gorm.DB) DiskService
type DockerService ¶
type DockerService interface { DockerPullImage(imageName string, m model2.AppNotify) error IsExistImage(imageName string) bool DockerContainerCreate(imageName string, containerDbId string, m model.CustomizationPostData, net string) (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) (string, error) DockerContainerCommit(name string) DockerNetworkModelList() []types.NetworkResource DockerImageInfo(image string) GetNetWorkNameByNetWorkID(id string) (string, error) ContainerExecShell(container_id string) string }
func NewDockerService ¶ added in v0.2.3
func NewDockerService(log loger2.OLog) DockerService
type GithubService ¶
type GithubService interface {
GetManifestJsonByRepo() (image, tcp, udp string)
}
func GetNewGithubService ¶
func GetNewGithubService(cl *github.Client) GithubService
type NotifyServer ¶
type NotifyServer interface { GetLog(id string) model.AppNotify AddLog(log model.AppNotify) UpdateLog(log model.AppNotify) DelLog(id string) GetList() (list []model.AppNotify) MarkRead(id string, state int) }
func NewNotifyService ¶
func NewNotifyService(db *gorm.DB) NotifyServer
type RedisService ¶
type RedisService interface { Set(key string, data interface{}, time int) error Exists(key string) bool Get(key string) ([]byte, error) PutExpireTime(key string, time int) Delete(key string) (bool, error) LikeDeletes(key string) error }
func NewRedisService ¶
func NewRedisService(rp *redis.Pool) RedisService
type RelyService ¶
type RelyService interface { Create(rely model2.RelyDBModel) Delete(id string) GetInfo(id string) model2.RelyDBModel }
func NewRelyService ¶
func NewRelyService(db *gorm.DB, log loger2.OLog) RelyService
type Repository ¶
type Repository interface { App() AppService DDNS() DDNSService User() UserService Docker() DockerService //Redis() RedisService ZeroTier() ZeroTierService ZiMa() ZiMaService OAPI() CasaService Disk() DiskService Notify() NotifyServer Task() TaskService Rely() RelyService System() SystemService Shortcuts() ShortcutsService Search() SearchService }
var MyService Repository
func NewService ¶
func NewService(db *gorm.DB, log loger2.OLog) Repository
type SearchService ¶
type SearchService interface {
SearchList(key string) ([]model.SearchFileInfo, error)
}
func NewSearchService ¶
func NewSearchService() SearchService
type ShareDirService ¶
type ShareDirService interface {}
func NewShareDirService ¶
func NewShareDirService(db *gorm.DB, log loger2.OLog) ShareDirService
type ShortcutsService ¶
type ShortcutsService interface { DeleteData(id string) AddData(m model2.ShortcutsDBModel) EditData(m model2.ShortcutsDBModel) GetList() (list []model2.ShortcutsDBModel) }
func NewShortcutsService ¶
func NewShortcutsService(db *gorm.DB) ShortcutsService
type SystemService ¶
type SystemService interface { UpSystemConfig(str string, widget string) UpdateSystemVersion(version string) GetSystemConfigDebug() []string GetCasaOSLogs(lineNumber int) string UpdateAssist() UpSystemPort(port string) GetTimeZone() string }
func NewSystemService ¶
func NewSystemService(log loger.OLog) SystemService
type TaskService ¶
type TaskService interface { List(desc bool) []model.TaskDBModel Delete(id string) Add(m *model.TaskDBModel) Update(m *model.TaskDBModel) Info(id string) model.TaskDBModel SyncTaskService() GetServerTasks() []model.TaskDBModel }
func NewTaskService ¶
func NewTaskService(db *gorm.DB, log loger2.OLog) TaskService
type UserService ¶
type ZeroTierService ¶
type ZeroTierService interface { GetToken(username, pwd string) string ZeroTierRegister(email, lastName, firstName, password string) string ZeroTierNetworkList(token string) (interface{}, []string) ZeroTierJoinNetwork(networkId string) ZeroTierLeaveNetwork(networkId string) ZeroTierGetInfo(token, id string) (interface{}, []string) ZeroTierGetStatus(token string) interface{} EditNetwork(token string, data string, id string) interface{} CreateNetwork(token string) interface{} MemberList(token string, id string) interface{} EditNetworkMember(token string, data string, id, mId string) interface{} DeleteMember(token string, id, mId string) interface{} DeleteNetwork(token, id string) interface{} GetJoinNetworks() string NetworkIdFilter(letter rune) bool }
func NewZeroTierService ¶
func NewZeroTierService() ZeroTierService
type ZiMaService ¶
type ZiMaService interface { GetCpuPercent() float64 GetCpuCoreNum() int GetMemInfo() *mem.VirtualMemoryStat GetDiskInfo() *disk.UsageStat GetNetInfo() []net.IOCountersStat GetNet(physics bool) []string GetNetState(name string) string GetSysInfo() host.InfoStat GetDirPath(path string) []model.Path MkdirAll(path string) (int, error) CreateFile(path string) (int, error) RenameFile(oldF, newF string) (int, error) GetCpuInfo() []cpu.InfoStat }
系统信息
Source Files ¶
Click to show internal directories.
Click to hide internal directories.