|
| 1 | +//go:build xpack |
| 2 | + |
| 3 | +package xpack |
| 4 | + |
| 5 | +import ( |
| 6 | + "net/http" |
| 7 | + |
| 8 | + "github.com/1Panel-dev/1Panel/agent/app/dto" |
| 9 | + "github.com/1Panel-dev/1Panel/agent/app/model" |
| 10 | + edition "github.com/1Panel-dev/1Panel/agent/xpack/edition" |
| 11 | + "github.com/gin-gonic/gin" |
| 12 | +) |
| 13 | + |
| 14 | +func RemoveTamper(website string) { |
| 15 | + edition.RemoveTamper(website) |
| 16 | +} |
| 17 | + |
| 18 | +func StartClam(startClam *model.Clam, isUpdate bool) (int, error) { |
| 19 | + return edition.StartClam(startClam, isUpdate) |
| 20 | +} |
| 21 | + |
| 22 | +func LoadNodeInfo(isBase bool) (model.NodeInfo, error) { |
| 23 | + return edition.LoadNodeInfo(isBase) |
| 24 | +} |
| 25 | + |
| 26 | +func GetImagePrefix() string { |
| 27 | + return edition.GetImagePrefix() |
| 28 | +} |
| 29 | + |
| 30 | +func IsUseCustomApp() bool { |
| 31 | + return edition.IsUseCustomApp() |
| 32 | +} |
| 33 | + |
| 34 | +func IsXpack() bool { |
| 35 | + return edition.IsXpack() |
| 36 | +} |
| 37 | + |
| 38 | +func CreateTaskScanSMSAlertLog(info dto.AlertDTO, alertType string, create dto.AlertLogCreate, pushAlert dto.PushAlert, method string) error { |
| 39 | + return edition.CreateTaskScanSMSAlertLog(info, alertType, create, pushAlert, method) |
| 40 | +} |
| 41 | + |
| 42 | +func CreateSMSAlertLog(alertType string, info dto.AlertDTO, create dto.AlertLogCreate, project string, params []dto.Param, method string) error { |
| 43 | + return edition.CreateSMSAlertLog(alertType, info, create, project, params, method) |
| 44 | +} |
| 45 | + |
| 46 | +func CreateTaskScanWebhookAlertLog(alert dto.AlertDTO, alertType string, create dto.AlertLogCreate, pushAlert dto.PushAlert, method string, transport *http.Transport, agentInfo *dto.AgentInfo) error { |
| 47 | + return edition.CreateTaskScanWebhookAlertLog(alert, alertType, create, pushAlert, method, transport, agentInfo) |
| 48 | +} |
| 49 | + |
| 50 | +func CreateWebhookAlertLog(alertType string, info dto.AlertDTO, create dto.AlertLogCreate, project string, params []dto.Param, method string, transport *http.Transport, agentInfo *dto.AgentInfo) error { |
| 51 | + return edition.CreateWebhookAlertLog(alertType, info, create, project, params, method, transport, agentInfo) |
| 52 | +} |
| 53 | + |
| 54 | +func GetLicenseErrorAlert() (uint, error) { |
| 55 | + return edition.GetLicenseErrorAlert() |
| 56 | +} |
| 57 | + |
| 58 | +func GetNodeErrorAlert() (uint, error) { |
| 59 | + return edition.GetNodeErrorAlert() |
| 60 | +} |
| 61 | + |
| 62 | +func LoadRequestTransport() *http.Transport { return edition.LoadRequestTransport() } |
| 63 | + |
| 64 | +func ValidateCertificate(c *gin.Context) bool { |
| 65 | + return edition.ValidateCertificate(c) |
| 66 | +} |
| 67 | + |
| 68 | +func PushSSLToNode(websiteSSL *model.WebsiteSSL) error { |
| 69 | + return edition.PushSSLToNode(websiteSSL) |
| 70 | +} |
| 71 | + |
| 72 | +func GetAgentInfo() (*dto.AgentInfo, error) { |
| 73 | + return edition.GetAgentInfo() |
| 74 | +} |
0 commit comments