Versions in this module Expand all Collapse all v1 v1.4.1 Jan 18, 2017 Changes in this version + func AddHardware(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func AddLocation(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func AddManageNetwork(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func AddNetwork(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func AddOsConfig(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func AddSystemConfig(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func AddUser(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func AddVmDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchAddDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchAssignManufacturerOnwer(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchCancelInstall(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchDelete(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchDeleteScanDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchDeleteVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchPowerOff(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchPowerOn(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchReInstall(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchReInstallVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchReStart(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchReStartVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchStartFromPxe(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchStartVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchStopVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func BatchUpdateDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func CheckOnlineUpdate(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func CloudBootCron(conf *config.Config, logger logger.Logger, repo model.Repo) + func CollectAndUpdateVmHostResource(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func CreateNewMacAddress(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func CreatePxeFile(ctx context.Context, mac string) error + func DBVersionUpdate(logger logger.Logger, repo model.Repo) + func DeleteHardwareById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func DeleteLocationById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func DeleteManageNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func DeleteNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func DeleteOsConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func DeleteSystemConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func DeleteUserById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func DeleteVmDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ExportDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ExportHardware(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ExportScanDeviceList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func FormatLocationToTreeByPid(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetCidrInfoByNetwork(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetCompanyByGroup(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetDeviceBySn(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetDeviceInstallCallbackList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetDeviceInstallReport(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetDeviceList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetDeviceLogByDeviceIdAndType(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetDeviceNumByStatus(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetDevicePrepareInstallInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetDhcpSubnetList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetFullDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetFullVmDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetHardwareById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetHardwareBySn(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetHardwareList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetLocationById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetLocationList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetLocationListByPid(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetLocationTreeNameById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetManageNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetManageNetworkList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetModelNameByWhereAndGroup(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetNetworkBySn(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetNetworkBySnForVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetNetworkList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetNotUsedIPListByNetworkId(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetOsConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetOsConfigList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetPlatformConfigByName(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetProductByWhereAndGroup(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetScanDeviceByDeviceId(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetScanDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetScanDeviceCompany(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetScanDeviceList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetScanDeviceModelName(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetScanDeviceProduct(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetSession(w rest.ResponseWriter, r *rest.Request) (model.UserWithToken, error) + func GetSystemBySn(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetSystemBySnForVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetSystemConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetSystemConfigList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetUserById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetUserList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetVmDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetVmDeviceList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetVmDeviceListByHostSn(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetVmDeviceLogByDeviceIdAndType(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetVmHostBySn(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func GetVmHostList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ImportDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ImportDeviceForOpenApi(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ImportPriview(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func InitBootOSIPForScanDeviceListProcess(logger logger.Logger, repo model.Repo) + func InstallTimeoutProcess(conf *config.Config, logger logger.Logger, repo model.Repo) + func IsInPreInstallList(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func IsInPreInstallListForVm(ctx context.Context, w rest.ResponseWriter, mac string) + func Login(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func LoginOut(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ReportDeviceInstallReport(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ReportInstallInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ReportInstallInfoForVm(ctx context.Context, w rest.ResponseWriter, mac string, title string, ...) + func ReportMacInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ReportProductInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func RunCreateVm(ctx context.Context, vmDeviceId uint) error + func RunCreateVmNoVncTokenFile(repo model.Repo, logger logger.Logger, vmDeviceId uint) error + func RunCreateVol(ctx context.Context, vmDeviceId uint) error + func RunDeleteVmNoVncTokenFile(repo model.Repo, logger logger.Logger, vmDeviceId uint) error + func RunDestroyVm(ctx context.Context, vmDeviceId uint) error + func RunDestroyVol(ctx context.Context, vmDeviceId uint) error + func RunGetVmHostInfo(repo model.Repo, logger logger.Logger, deviceId uint) (string, error) + func RunGetVmHostPoolInfo(repo model.Repo, logger logger.Logger, conf *config.Config, deviceId uint) (string, error) + func RunGetVmInfo(repo model.Repo, logger logger.Logger, vmDeviceId uint) (string, error) + func RunOnlineUpdate(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func RunReStartVm(ctx context.Context, vmDeviceId uint) error + func RunStartVm(ctx context.Context, vmDeviceId uint) error + func RunStopVm(ctx context.Context, vmDeviceId uint) error + func RunTestConnectVmHost(repo model.Repo, logger logger.Logger, deviceId uint) (string, error) + func SaveDeviceInstallCallback(ctx context.Context, deviceId uint, callbackType string, content string) error + func SaveDhcpSubnet(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func SavePlatformConfig(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UpdateHardwareById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UpdateLocationById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UpdateManageNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UpdateMyInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UpdateNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UpdateOsConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UpdateSystemConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UpdateUserById(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UpdateVmHostResource(logger logger.Logger, repo model.Repo, conf *config.Config, deviceId uint) + func UploadCompanyHardware(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UploadDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func UploadHardware(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ValidateIp(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ValidateMac(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ValidateManageIp(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func ValidateSn(ctx context.Context, w rest.ResponseWriter, r *rest.Request) + func VerifyAccessPurview(token string, ctx context.Context, isVerifyAdministratorRole bool, ...) (model.UserWithToken, error) + func VerifyAccessToken(token string, ctx context.Context, isVerifyAdministratorRole bool) (model.UserWithToken, error) + type BatchOperateInfo struct + AccessToken string + OobIp string + Password string + Sn string + UserID uint + Username string + func CheckPermissionForBatchOperate(ctx context.Context, w rest.ResponseWriter, r *rest.Request, ...) (bool, []BatchOperateInfo)