refactor: openpitrix module
Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
240
vendor/openpitrix.io/openpitrix/pkg/constants/column.go
generated
vendored
Normal file
240
vendor/openpitrix.io/openpitrix/pkg/constants/column.go
generated
vendored
Normal file
@@ -0,0 +1,240 @@
|
||||
// Copyright 2018 The OpenPitrix Authors. All rights reserved.
|
||||
// Use of this source code is governed by a Apache license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
package constants
|
||||
|
||||
const (
|
||||
ColumnAppId = "app_id"
|
||||
ColumnCategoryId = "category_id"
|
||||
ColumnChartName = "chart_name"
|
||||
ColumnClusterId = "cluster_id"
|
||||
ColumnClusterType = "cluster_type"
|
||||
ColumnCreateTime = "create_time"
|
||||
ColumnCredential = "credential"
|
||||
ColumnDescription = "description"
|
||||
ColumnExecutor = "executor"
|
||||
ColumnFrontgateId = "frontgate_id"
|
||||
ColumnHome = "home"
|
||||
ColumnIcon = "icon"
|
||||
ColumnInstanceId = "instance_id"
|
||||
ColumnJobAction = "job_action"
|
||||
ColumnJobId = "job_id"
|
||||
ColumnKeywords = "keywords"
|
||||
ColumnLabelKey = "label_key"
|
||||
ColumnLabelValue = "label_value"
|
||||
ColumnLocale = "locale"
|
||||
ColumnMaintainers = "maintainers"
|
||||
ColumnName = "name"
|
||||
ColumnNodeId = "node_id"
|
||||
ColumnKeyPairId = "key_pair_id"
|
||||
ColumnOwner = "owner"
|
||||
ColumnOwnerPath = "owner_path"
|
||||
ColumnPackageName = "package_name"
|
||||
ColumnPrivateIp = "private_ip"
|
||||
ColumnProvider = "provider"
|
||||
ColumnReadme = "readme"
|
||||
ColumnRepoEventId = "repo_event_id"
|
||||
ColumnRepoId = "repo_id"
|
||||
ColumnRepoLabelId = "repo_label_id"
|
||||
ColumnRepoSelectorId = "repo_selector_id"
|
||||
ColumnResouceId = "resource_id"
|
||||
ColumnRole = "role"
|
||||
ColumnRuntimeId = "runtime_id"
|
||||
ColumnRuntimeCredentialId = "runtime_credential_id"
|
||||
ColumnRuntimeUrl = "runtime_url"
|
||||
ColumnDebug = "debug"
|
||||
ColumnRuntimeLabelId = "runtime_label_id"
|
||||
ColumnScreenshots = "screenshots"
|
||||
ColumnSelectorKey = "selector_key"
|
||||
ColumnSelectorValue = "selector_value"
|
||||
ColumnSequence = "sequence"
|
||||
ColumnSources = "sources"
|
||||
ColumnStatus = "status"
|
||||
ColumnStatusTime = "status_time"
|
||||
ColumnTarget = "target"
|
||||
ColumnTaskAction = "task_action"
|
||||
ColumnTaskId = "task_id"
|
||||
ColumnTransitionStatus = "transition_status"
|
||||
ColumnType = "type"
|
||||
ColumnUpdateTime = "update_time"
|
||||
ColumnUrl = "url"
|
||||
ColumnVersionId = "version_id"
|
||||
ColumnVisibility = "visibility"
|
||||
ColumnVolumeId = "volume_id"
|
||||
ColumnZone = "zone"
|
||||
ColumnVpcId = "vpc_id"
|
||||
ColumnEnv = "env"
|
||||
ColumnLoadbalancerListenerId = "loadbalancer_listener_id"
|
||||
ColumnResult = "result"
|
||||
ColumnDirective = "directive"
|
||||
ColumnRuntimeCredentialContent = "runtime_credential_content"
|
||||
ColumnUserId = "user_id"
|
||||
ColumnGroupId = "group_id"
|
||||
ColumnResetId = "reset_id"
|
||||
ColumnPassword = "password"
|
||||
ColumnEmail = "email"
|
||||
ColumnClientId = "client_id"
|
||||
ColumnClientSecret = "client_secret"
|
||||
ColumnRefreshToken = "refresh_token"
|
||||
ColumnAccessToken = "access_token"
|
||||
ColumnTokenId = "token_id"
|
||||
ColumnScope = "scope"
|
||||
ColumnUsername = "username"
|
||||
ColumnAttachmentId = "attachment_id"
|
||||
ColumnMessage = "message"
|
||||
ColumnAppDefaultStatus = "app_default_status"
|
||||
ColumnMarketId = "market_id"
|
||||
ColumnController = "controller"
|
||||
ColumnActive = "active"
|
||||
ColumnOperator = "operator"
|
||||
ColumnReviewId = "review_id"
|
||||
ColumnPhase = "phase"
|
||||
ColumnReviewer = "reviewer"
|
||||
ColumnCompanyName = "company_name"
|
||||
ColumnCompanyWebsite = "company_website"
|
||||
ColumnCompanyProfile = "company_profile"
|
||||
ColumnAuthorizerName = "authorizer_name"
|
||||
ColumnAuthorizerEmail = "authorizer_email"
|
||||
ColumnAuthorizerPhone = "authorizer_phone"
|
||||
ColumnBankName = "bank_name"
|
||||
ColumnBankAccountName = "bank_account_name"
|
||||
ColumnBankAccountNumber = "bank_account_number"
|
||||
ColumnRejectMessage = "reject_message"
|
||||
ColumnSubmitTime = "submit_time"
|
||||
ColumnApprover = "approver"
|
||||
ColumnIsv = "isv"
|
||||
)
|
||||
|
||||
var PushEventTables = map[string][]string{
|
||||
TableRepoEvent: {
|
||||
ColumnRepoEventId, ColumnRepoId, ColumnStatus,
|
||||
},
|
||||
TableCluster: {
|
||||
ColumnClusterId, ColumnStatus, ColumnTransitionStatus,
|
||||
},
|
||||
TableClusterNode: {
|
||||
ColumnNodeId, ColumnStatus, ColumnTransitionStatus,
|
||||
},
|
||||
TableJob: {
|
||||
ColumnJobId, ColumnStatus, ColumnClusterId, ColumnAppId, ColumnAppId,
|
||||
},
|
||||
}
|
||||
|
||||
// columns that can be search through sql '=' operator
|
||||
var IndexedColumns = map[string][]string{
|
||||
TableApp: {
|
||||
ColumnAppId, ColumnName, ColumnRepoId, ColumnDescription, ColumnStatus,
|
||||
ColumnHome, ColumnIcon, ColumnScreenshots, ColumnMaintainers, ColumnSources,
|
||||
ColumnReadme, ColumnOwner, ColumnChartName, ColumnIsv,
|
||||
},
|
||||
TableAppVersion: {
|
||||
ColumnVersionId, ColumnAppId, ColumnName, ColumnOwner, ColumnDescription,
|
||||
ColumnPackageName, ColumnStatus, ColumnType,
|
||||
},
|
||||
TableJob: {
|
||||
ColumnJobId, ColumnClusterId, ColumnAppId, ColumnVersionId,
|
||||
ColumnExecutor, ColumnProvider, ColumnStatus, ColumnOwner,
|
||||
},
|
||||
TableTask: {
|
||||
ColumnJobId, ColumnTaskId, ColumnExecutor, ColumnStatus, ColumnOwner,
|
||||
},
|
||||
TableRepo: {
|
||||
ColumnRepoId, ColumnName, ColumnType, ColumnVisibility, ColumnStatus,
|
||||
ColumnAppDefaultStatus, ColumnOwner, ColumnController,
|
||||
},
|
||||
TableRuntime: {
|
||||
ColumnRuntimeId, ColumnProvider, ColumnZone, ColumnStatus, ColumnOwner,
|
||||
},
|
||||
TableRuntimeCredential: {
|
||||
ColumnRuntimeCredentialId, ColumnStatus, ColumnProvider, ColumnOwner,
|
||||
},
|
||||
TableRepoLabel: {
|
||||
ColumnRepoId, ColumnRepoLabelId, ColumnStatus,
|
||||
},
|
||||
TableRepoSelector: {
|
||||
ColumnRepoId, ColumnRepoSelectorId, ColumnStatus,
|
||||
},
|
||||
TableRepoEvent: {
|
||||
ColumnRepoEventId, ColumnRepoId, ColumnStatus, ColumnOwner,
|
||||
},
|
||||
TableCluster: {
|
||||
ColumnClusterId, ColumnAppId, ColumnVersionId, ColumnStatus,
|
||||
ColumnRuntimeId, ColumnFrontgateId, ColumnOwner, ColumnClusterType,
|
||||
},
|
||||
TableKeyPair: {
|
||||
ColumnKeyPairId, ColumnName, ColumnOwner,
|
||||
},
|
||||
TableClusterNode: {
|
||||
ColumnClusterId, ColumnNodeId, ColumnStatus, ColumnOwner,
|
||||
},
|
||||
TableCategory: {
|
||||
ColumnCategoryId, ColumnStatus, ColumnLocale, ColumnOwner, ColumnName,
|
||||
},
|
||||
TableMarket: {
|
||||
ColumnMarketId, ColumnName, ColumnVisibility, ColumnStatus, ColumnOwner,
|
||||
},
|
||||
TableMarketUser: {
|
||||
ColumnMarketId, ColumnUserId,
|
||||
},
|
||||
TableAppVersionAudit: {
|
||||
ColumnVersionId, ColumnAppId, ColumnStatus, ColumnOperator, ColumnRole,
|
||||
},
|
||||
TableAppVersionReview: {
|
||||
ColumnReviewId, ColumnVersionId, ColumnAppId, ColumnStatus, ColumnReviewer,
|
||||
},
|
||||
TableVendorVerifyInfo: {
|
||||
ColumnUserId, ColumnStatus,
|
||||
},
|
||||
}
|
||||
|
||||
var SearchWordColumnTable = []string{
|
||||
TableRuntime,
|
||||
TableRuntimeCredential,
|
||||
TableApp,
|
||||
TableAppVersion,
|
||||
TableRepo,
|
||||
TableJob,
|
||||
TableTask,
|
||||
TableCluster,
|
||||
TableClusterNode,
|
||||
TableCategory,
|
||||
TableVendorVerifyInfo,
|
||||
}
|
||||
|
||||
// columns that can be search through sql 'like' operator
|
||||
var SearchColumns = map[string][]string{
|
||||
TableApp: {
|
||||
ColumnAppId, ColumnName, ColumnRepoId, ColumnOwner, ColumnChartName, ColumnKeywords,
|
||||
},
|
||||
TableAppVersion: {
|
||||
ColumnVersionId, ColumnAppId, ColumnName, ColumnDescription, ColumnOwner, ColumnPackageName,
|
||||
},
|
||||
TableJob: {
|
||||
ColumnJobId, ColumnClusterId, ColumnOwner, ColumnJobAction, ColumnExecutor, ColumnProvider, ColumnExecutor, ColumnProvider,
|
||||
},
|
||||
TableTask: {
|
||||
ColumnJobId, ColumnTaskId, ColumnTaskAction, ColumnOwner, ColumnNodeId, ColumnTarget,
|
||||
},
|
||||
TableRuntime: {
|
||||
ColumnRuntimeId, ColumnName, ColumnOwner, ColumnProvider, ColumnZone,
|
||||
},
|
||||
TableRuntimeCredential: {
|
||||
ColumnRuntimeCredentialId, ColumnName, ColumnOwner, ColumnProvider,
|
||||
},
|
||||
TableCluster: {
|
||||
ColumnClusterId, ColumnName, ColumnOwner, ColumnAppId, ColumnVersionId, ColumnRuntimeId,
|
||||
},
|
||||
TableClusterNode: {
|
||||
ColumnNodeId, ColumnClusterId, ColumnName, ColumnInstanceId, ColumnVolumeId, ColumnPrivateIp, ColumnRole, ColumnOwner,
|
||||
},
|
||||
TableRepo: {
|
||||
ColumnName, ColumnDescription,
|
||||
},
|
||||
TableCategory: {
|
||||
ColumnCategoryId, ColumnLocale, ColumnOwner, ColumnName,
|
||||
},
|
||||
TableVendorVerifyInfo: {
|
||||
ColumnUserId, ColumnCompanyName, ColumnCompanyWebsite, ColumnAuthorizerName, ColumnAuthorizerEmail,
|
||||
},
|
||||
}
|
||||
272
vendor/openpitrix.io/openpitrix/pkg/constants/common.go
generated
vendored
Normal file
272
vendor/openpitrix.io/openpitrix/pkg/constants/common.go
generated
vendored
Normal file
@@ -0,0 +1,272 @@
|
||||
// Copyright 2017 The OpenPitrix Authors. All rights reserved.
|
||||
// Use of this source code is governed by a Apache license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
package constants
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
prefix = "openpitrix-"
|
||||
ProviderPrefix = "openpitrix-rp-"
|
||||
ApiGatewayHost = prefix + "api-gateway"
|
||||
RepoManagerHost = prefix + "repo-manager"
|
||||
AppManagerHost = prefix + "app-manager"
|
||||
RuntimeManagerHost = prefix + "runtime-manager"
|
||||
ClusterManagerHost = prefix + "cluster-manager"
|
||||
JobManagerHost = prefix + "job-manager"
|
||||
TaskManagerHost = prefix + "task-manager"
|
||||
PilotServiceHost = prefix + "pilot-service"
|
||||
AccountServiceHost = prefix + "account-service"
|
||||
IMServiceHost = prefix + "im-service"
|
||||
AMServiceHost = prefix + "am-service"
|
||||
RepoIndexerHost = prefix + "repo-indexer"
|
||||
CategoryManagerHost = prefix + "category-manager"
|
||||
RuntimeProviderManagerHost = prefix + "rp-manager"
|
||||
NotificationHost = prefix + "notification"
|
||||
MarketManagerHost = prefix + "market-manager"
|
||||
AttachmentManagerHost = prefix + "attachment-manager"
|
||||
IsvManagerHost = prefix + "isv-manager"
|
||||
)
|
||||
|
||||
const (
|
||||
ApiGatewayPort = 9100 // 91 is similar as Pi, Open[Pi]trix
|
||||
RepoManagerPort = 9101
|
||||
AppManagerPort = 9102
|
||||
RuntimeManagerPort = 9103
|
||||
ClusterManagerPort = 9104
|
||||
JobManagerPort = 9106
|
||||
TaskManagerPort = 9107
|
||||
RepoIndexerPort = 9108
|
||||
PilotServicePort = 9110
|
||||
FrontgateServicePort = 9111
|
||||
DroneServicePort = 9112
|
||||
CategoryManagerPort = 9113
|
||||
PilotTlsListenPort = 9114 // public service for frontgate
|
||||
AccountServicePort = 9115
|
||||
FrontgateFileServerPort = 9116
|
||||
MarketManagerPort = 9117
|
||||
IsvManagerPort = 9118
|
||||
IMServicePort = 9119
|
||||
AMServicePort = 9120
|
||||
EtcdServicePort = 2379
|
||||
AttachmentManagerPort = 9122
|
||||
RuntimeProviderManagerPort = 9121
|
||||
NotificationPort = 9201
|
||||
ServiceConfigPort = 9202
|
||||
)
|
||||
|
||||
const (
|
||||
StatusActive = "active"
|
||||
StatusUsed = "used"
|
||||
StatusEnabled = "enabled"
|
||||
StatusDisabled = "disabled"
|
||||
StatusCreating = "creating"
|
||||
StatusDeleted = "deleted"
|
||||
StatusDeleting = "deleting"
|
||||
StatusUpgrading = "upgrading"
|
||||
StatusUpdating = "updating"
|
||||
StatusRollbacking = "rollbacking"
|
||||
StatusStopped = "stopped"
|
||||
StatusStopping = "stopping"
|
||||
StatusStarting = "starting"
|
||||
StatusRecovering = "recovering"
|
||||
StatusCeased = "ceased"
|
||||
StatusCeasing = "ceasing"
|
||||
StatusResizing = "resizing"
|
||||
StatusScaling = "scaling"
|
||||
StatusWorking = "working"
|
||||
StatusPending = "pending"
|
||||
StatusSuccessful = "successful"
|
||||
StatusFailed = "failed"
|
||||
|
||||
StatusRunning = "running"
|
||||
StatusTerminated = "terminated"
|
||||
|
||||
StatusAvailable = "available"
|
||||
StatusInUse = "in-use"
|
||||
|
||||
StatusInUse2 = "in_use"
|
||||
|
||||
StatusDraft = "draft"
|
||||
StatusSubmitted = "submitted"
|
||||
StatusPassed = "passed"
|
||||
StatusRejected = "rejected"
|
||||
StatusSuspended = "suspended"
|
||||
StatusInReview = "in-review"
|
||||
StatusNew = "new"
|
||||
)
|
||||
|
||||
var DeletedStatuses = []string{
|
||||
StatusDeleted,
|
||||
StatusCeased,
|
||||
}
|
||||
|
||||
const (
|
||||
VisibilityPublic = "public"
|
||||
VisibilityPrivate = "private"
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultMaxWorkingJobs = 20
|
||||
DefaultMaxWorkingTasks = 20
|
||||
DefaultMaxRepoEvents = 20
|
||||
)
|
||||
|
||||
const (
|
||||
MaxTaskTimeout = 3600 * time.Second
|
||||
WaitHelmTaskTimeout = 7200 * time.Second
|
||||
WaitTaskTimeout = 600 * time.Second
|
||||
WaitFrontgateServiceTimeout = 1800 * time.Second
|
||||
WaitDroneServiceTimeout = 1800 * time.Second
|
||||
WaitTaskInterval = 3 * time.Second
|
||||
WaitFrontgateServiceInterval = 10 * time.Second
|
||||
WaitDroneServiceInterval = 10 * time.Second
|
||||
|
||||
GrpcToPilotTimeout = 10 * time.Second
|
||||
|
||||
TimeoutName = "timeout"
|
||||
DefaultServiceTimeout = 600
|
||||
|
||||
// Maybe metadata is upgrading
|
||||
PilotTasksRetry = 5
|
||||
PilotTasksSleep = 2 * time.Second
|
||||
)
|
||||
|
||||
const (
|
||||
ActionCreateCluster = "CreateCluster"
|
||||
ActionUpgradeCluster = "UpgradeCluster"
|
||||
ActionRollbackCluster = "RollbackCluster"
|
||||
ActionResizeCluster = "ResizeCluster"
|
||||
ActionAddClusterNodes = "AddClusterNodes"
|
||||
ActionDeleteClusterNodes = "DeleteClusterNodes"
|
||||
ActionStopClusters = "StopClusters"
|
||||
ActionStartClusters = "StartClusters"
|
||||
ActionDeleteClusters = "DeleteClusters"
|
||||
ActionRecoverClusters = "RecoverClusters"
|
||||
ActionCeaseClusters = "CeaseClusters"
|
||||
ActionUpdateClusterEnv = "UpdateClusterEnv"
|
||||
ActionAttachKeyPairs = "AttachKeyPairs"
|
||||
ActionDetachKeyPairs = "DetachKeyPairs"
|
||||
)
|
||||
|
||||
const (
|
||||
ProviderQingCloud = "qingcloud"
|
||||
ProviderKubernetes = "kubernetes"
|
||||
ProviderAWS = "aws"
|
||||
ProviderAliyun = "aliyun"
|
||||
ProviderTypeVmbased = "vmbased"
|
||||
TargetPilot = "pilot"
|
||||
)
|
||||
|
||||
const (
|
||||
PlaceHolder = "*"
|
||||
ReplicaRoleSuffix = "-replica"
|
||||
)
|
||||
|
||||
const (
|
||||
NodesToExecuteOnName = "nodes_to_execute_on"
|
||||
PostStartServiceName = "post_start_service"
|
||||
PostStopServiceName = "post_stop_service"
|
||||
AgentInstalledName = "agent_installed"
|
||||
ServiceOrderName = "order"
|
||||
ServiceTimeoutName = "timeout"
|
||||
ServiceCmdName = "cmd"
|
||||
ServicePreCheckName = "pre_check"
|
||||
ScalingPolicyParallel = "parallel"
|
||||
ScalingPolicySequential = "sequential"
|
||||
|
||||
NormalClusterType = 0
|
||||
FrontgateClusterType = 1
|
||||
|
||||
ServiceInit = "init"
|
||||
ServiceStart = "start"
|
||||
ServiceStop = "stop"
|
||||
ServiceScaleIn = "scale_in"
|
||||
ServiceScaleOut = "scale_out"
|
||||
ServiceCustom = "custom_service"
|
||||
ServiceRestart = "restart"
|
||||
ServiceDestroy = "destroy"
|
||||
ServiceBackup = "backup"
|
||||
ServiceRestore = "restore"
|
||||
ServiceDeleteSnapshot = "delete_snapshot"
|
||||
ServiceUpgrade = "upgrade"
|
||||
)
|
||||
|
||||
const (
|
||||
NfContentTypeInvite = "invite"
|
||||
NfContentTypeVerify = "verify"
|
||||
|
||||
NfTypeEmail = "email"
|
||||
)
|
||||
|
||||
var ServiceNames = []string{
|
||||
ServiceInit, ServiceStart, ServiceStop, ServiceScaleIn, ServiceScaleOut, ServiceRestart,
|
||||
ServiceDestroy, ServiceBackup, ServiceRestore, ServiceDeleteSnapshot, ServiceUpgrade,
|
||||
}
|
||||
|
||||
const (
|
||||
TypeS3 = "s3"
|
||||
TypeHttp = "http"
|
||||
TypeHttps = "https"
|
||||
)
|
||||
|
||||
const (
|
||||
RetryInterval = 3 * time.Second
|
||||
)
|
||||
|
||||
const (
|
||||
RoleUser = "user"
|
||||
RoleDeveloper = "developer"
|
||||
RoleIsv = "isv"
|
||||
RoleGlobalAdmin = "global_admin"
|
||||
|
||||
PortalGlobalAdmin = "global_admin"
|
||||
|
||||
GrantTypeClientCredentials = "client_credentials"
|
||||
GrantTypePassword = "password"
|
||||
GrantTypeRefreshToken = "refresh_token"
|
||||
|
||||
OperatorTypeGlobalAdmin = "global_admin"
|
||||
OperatorTypeDeveloper = "developer"
|
||||
OperatorTypeBusiness = "business"
|
||||
OperatorTypeTechnical = "technical"
|
||||
OperatorTypeIsv = "isv"
|
||||
OperatorTypeAdmin = "admin"
|
||||
|
||||
ActionBundleBusinessReview = "business_review"
|
||||
ActionBundleTechnicalReview = "technical_review"
|
||||
ActionBundleIsvReview = "isv_review"
|
||||
ActionBundleIsvApply = "isv_apply"
|
||||
ActionBundleIsvAuth = "isv_auth"
|
||||
)
|
||||
|
||||
var GrantTypeTokens = []string{
|
||||
GrantTypeClientCredentials,
|
||||
GrantTypePassword,
|
||||
GrantTypeRefreshToken,
|
||||
}
|
||||
|
||||
var InternalRepos = []string{
|
||||
"repo-vmbased", "repo-helm",
|
||||
}
|
||||
|
||||
var AllowedAppDefaultStatus = []string{
|
||||
"",
|
||||
StatusDraft,
|
||||
StatusActive,
|
||||
}
|
||||
|
||||
const (
|
||||
ServiceTypeNotification = "notification"
|
||||
ServiceTypeRuntime = "runtime"
|
||||
ServiceTypeBasicConfig = "basic_config"
|
||||
)
|
||||
|
||||
var ServiceTypes = []string{
|
||||
ServiceTypeNotification,
|
||||
ServiceTypeRuntime,
|
||||
ServiceTypeBasicConfig,
|
||||
}
|
||||
10
vendor/openpitrix.io/openpitrix/pkg/constants/dlock.go
generated
vendored
Normal file
10
vendor/openpitrix.io/openpitrix/pkg/constants/dlock.go
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// Copyright 2018 The OpenPitrix Authors. All rights reserved.
|
||||
// Use of this source code is governed by a Apache license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
package constants
|
||||
|
||||
const (
|
||||
RepoIndexPrefix = "repo_index_"
|
||||
ClusterPrefix = "cluster_"
|
||||
)
|
||||
448
vendor/openpitrix.io/openpitrix/pkg/constants/email_template.go
generated
vendored
Normal file
448
vendor/openpitrix.io/openpitrix/pkg/constants/email_template.go
generated
vendored
Normal file
@@ -0,0 +1,448 @@
|
||||
// Copyright 2019 The OpenPitrix Authors. All rights reserved.
|
||||
// Use of this source code is governed by a Apache license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
package constants
|
||||
|
||||
const (
|
||||
EmailNotifyTemplate = `
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Simple Transactional Email</title>
|
||||
<style>
|
||||
/* -------------------------------------
|
||||
GLOBAL RESETS
|
||||
------------------------------------- */
|
||||
/*All the styling goes here*/
|
||||
img {
|
||||
border: none;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #eff0f5;
|
||||
font-family: Roboto, PingFang SC, Lantinghei SC, Helvetica Neue, Helvetica, Arial, Microsoft YaHei, 微软雅黑, STHeitiSC-Light, simsun, 宋体, WenQuanYi Zen Hei, WenQuanYi Micro Hei, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
color: #576075;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: separate;
|
||||
mso-table-lspace: 0pt;
|
||||
mso-table-rspace: 0pt;
|
||||
width: 100%; }
|
||||
table td {
|
||||
font-size: 14px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* -------------------------------------
|
||||
BODY & CONTAINER
|
||||
------------------------------------- */
|
||||
|
||||
.body {
|
||||
background-color: #eff0f5;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Set a max-width, and make it display as block so it will automatically stretch to that width, but will also shrink down on a phone or something */
|
||||
.container {
|
||||
display: block;
|
||||
margin: 0 auto !important;
|
||||
/* makes it centered */
|
||||
max-width: 780px;
|
||||
padding: 10px;
|
||||
padding-top: 80px;
|
||||
width: 780px;
|
||||
}
|
||||
|
||||
/* This should also be a block element, so that it will fill 100% of the .container */
|
||||
.content {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
max-width: 780px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* -------------------------------------
|
||||
HEADER, FOOTER, MAIN
|
||||
------------------------------------- */
|
||||
.main {
|
||||
background: #ffffff;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 1px 4px 0 rgba(73, 33, 173, 0.06), 0 4px 8px 0 rgba(35, 35, 36, 0.04);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
box-sizing: border-box;
|
||||
padding: 48px;
|
||||
}
|
||||
|
||||
.content-block {
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
clear: both;
|
||||
margin-top: 14px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
.footer td,
|
||||
.footer p,
|
||||
.footer span,
|
||||
.footer a {
|
||||
color: #8c96ad;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
.gray {
|
||||
color: #8c96ad;
|
||||
}
|
||||
|
||||
/* -------------------------------------
|
||||
TYPOGRAPHY
|
||||
------------------------------------- */
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
color: #000000;
|
||||
font-weight: 400;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 35px;
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
p,
|
||||
ul,
|
||||
ol {
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
line-height: 2;
|
||||
margin: 0;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
p li,
|
||||
ul li,
|
||||
ol li {
|
||||
list-style-position: inside;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #8454cd;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* -------------------------------------
|
||||
BUTTONS
|
||||
------------------------------------- */
|
||||
.btn {
|
||||
box-sizing: border-box;
|
||||
width: 100%; }
|
||||
.btn > tbody > tr > td {
|
||||
padding-bottom: 15px; }
|
||||
.btn table {
|
||||
width: auto;
|
||||
}
|
||||
.btn table td {
|
||||
background-color: #ffffff;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
.btn a {
|
||||
background-color: #ffffff;
|
||||
border: solid 1px #3498db;
|
||||
border-radius: 5px;
|
||||
box-sizing: border-box;
|
||||
color: #3498db;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
padding: 12px 25px;
|
||||
text-decoration: none;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.btn-primary table td {
|
||||
background-color: #3498db;
|
||||
}
|
||||
|
||||
.btn-primary a {
|
||||
background-color: #3498db;
|
||||
border-color: #3498db;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* -------------------------------------
|
||||
OTHER STYLES THAT MIGHT BE USEFUL
|
||||
------------------------------------- */
|
||||
.last {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.first {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.mt0 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.mb0 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.preheader {
|
||||
color: transparent;
|
||||
display: none;
|
||||
height: 0;
|
||||
max-height: 0;
|
||||
max-width: 0;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
mso-hide: all;
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.powered-by a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 0;
|
||||
border-bottom: 1px solid #eff0f5;
|
||||
margin: 50px 0 12px;
|
||||
}
|
||||
.linkBtn {
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 1px 3px 0 rgba(73, 33, 173, 0.16), 0 1px 2px 0 rgba(52, 57, 69, 0.03);
|
||||
background-color: #8454cd;
|
||||
color: #fff;
|
||||
padding: 4px 20px;
|
||||
}
|
||||
.link {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-stretch: normal;
|
||||
line-height: 28px;
|
||||
letter-spacing: normal;
|
||||
}
|
||||
.platform {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
font-stretch: normal;
|
||||
line-height: 20px;
|
||||
letter-spacing: normal;
|
||||
color: #343945;
|
||||
margin-left: 12px;
|
||||
}
|
||||
.line1 {
|
||||
margin-top: 42px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.line2 {
|
||||
line-height: 2;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.line3 {
|
||||
margin-bottom: 40px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.line4 {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.line5 {
|
||||
margin-top: 0px;
|
||||
}
|
||||
.line6 {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* -------------------------------------
|
||||
RESPONSIVE AND MOBILE FRIENDLY STYLES
|
||||
------------------------------------- */
|
||||
@media only screen and (max-width: 620px) {
|
||||
table[class=body] h1 {
|
||||
font-size: 28px !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
table[class=body] p,
|
||||
table[class=body] ul,
|
||||
table[class=body] ol,
|
||||
table[class=body] td,
|
||||
table[class=body] span,
|
||||
table[class=body] a {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
table[class=body] .wrapper,
|
||||
table[class=body] .article {
|
||||
padding: 10px !important;
|
||||
}
|
||||
table[class=body] .content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
table[class=body] .container {
|
||||
padding: 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
table[class=body] .main {
|
||||
border-left-width: 0 !important;
|
||||
border-radius: 0 !important;
|
||||
border-right-width: 0 !important;
|
||||
}
|
||||
table[class=body] .btn table {
|
||||
width: 100% !important;
|
||||
}
|
||||
table[class=body] .btn a {
|
||||
width: 100% !important;
|
||||
}
|
||||
table[class=body] .img-responsive {
|
||||
height: auto !important;
|
||||
max-width: 100% !important;
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------
|
||||
PRESERVE THESE STYLES IN THE HEAD
|
||||
------------------------------------- */
|
||||
@media all {
|
||||
.ExternalClass {
|
||||
width: 100%;
|
||||
}
|
||||
.ExternalClass,
|
||||
.ExternalClass p,
|
||||
.ExternalClass span,
|
||||
.ExternalClass font,
|
||||
.ExternalClass td,
|
||||
.ExternalClass div {
|
||||
line-height: 100%;
|
||||
}
|
||||
.apple-link a {
|
||||
color: inherit !important;
|
||||
font-family: inherit !important;
|
||||
font-size: inherit !important;
|
||||
font-weight: inherit !important;
|
||||
line-height: inherit !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.btn-primary table td:hover {
|
||||
background-color: #34495e !important;
|
||||
}
|
||||
.btn-primary a:hover {
|
||||
background-color: #34495e !important;
|
||||
border-color: #34495e !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body class="">
|
||||
<span class="preheader">This is preheader text. Some clients will show this text as a preview.</span>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td class="container">
|
||||
<div class="content">
|
||||
<!-- START CENTERED WHITE CONTAINER -->
|
||||
<table role="presentation" class="main">
|
||||
|
||||
<!-- START MAIN CONTENT AREA -->
|
||||
<tr>
|
||||
<td class="wrapper">
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Rectangle</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Navigation" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Admin-Navigation---我的工作台" transform="translate(-25.000000, -24.000000)">
|
||||
<rect id="Rectangle" fill="#FFFFFF" fill-rule="nonzero" x="0" y="0" width="64" height="64"></rect>
|
||||
<polygon id="Rectangle" fill="#FFFFFF" fill-rule="nonzero" points="0 0 64 0 64 900 0 900"></polygon>
|
||||
<rect id="Rectangle" fill-rule="nonzero" x="25" y="24" width="16" height="16"></rect>
|
||||
<g id="logo-new" transform="translate(25.000000, 24.060000)">
|
||||
<g id="Group">
|
||||
<path d="M3.24886005,7.29741333 L6.81243645,7.29741333 C7.14426097,7.29741333 7.43390666,7.23501333 7.68270831,7.11101333 C7.93150996,6.98701333 8.13519629,6.81794667 8.2937673,6.60408 C8.45260526,6.39021333 8.57006527,6.14568 8.64614732,5.86914667 C8.72196241,5.59341333 8.76013691,5.31048 8.76013691,5.02061333 C8.76013691,4.71741333 8.72196241,4.42754667 8.64614732,4.15154667 C8.57006527,3.87554667 8.45260526,3.63421333 8.2937673,3.42728 C8.13519629,3.22034667 7.93150996,3.05448 7.68270831,2.93048 C7.43390666,2.80594667 7.14426097,2.74408 6.81243645,2.74408 L3.24886005,2.74408 L3.24886005,7.29741333 Z M6.81243645,0.03288 C7.54469281,0.03288 8.19018893,0.15688 8.74972568,0.405413333 C9.30899549,0.653946667 9.7753651,0.998746667 10.1483006,1.44008 C10.5212361,1.88194667 10.803941,2.39928 10.9974831,2.99234667 C11.1912921,3.58568 11.2879296,4.22061333 11.2879296,4.89661333 C11.2879296,5.55874667 11.197699,6.19021333 11.0185725,6.79021333 C10.8389121,7.39048 10.5626141,7.91474667 10.1896786,8.36328 C9.81701001,8.81154667 9.3506404,9.17048 8.79110364,9.43954667 C8.23156689,9.70834667 7.57218913,9.84301333 6.81243645,9.84301333 L3.24886005,9.84301333 L3.24886005,15.8795467 L0.535,15.8795467 L0.535,0.03288 L6.81243645,0.03288 Z" id="Fill-1" fill="#5628B4"></path>
|
||||
<polygon id="Fill-37" fill="#5628B4" points="12.755 9.30386667 12.755 0.0329333333 15.46886 0.0329333333 15.46886 10.6366667"></polygon>
|
||||
<polygon id="Fill-162" fill="#F7B236" points="15.46886 13.4177067 15.46886 15.8795733 12.755 15.87904 12.755 12.08544"></polygon>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
{{.Content}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="footer">
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
<span class="apple-link">Copyright © 2019 | OpenPitrix | All rights reserved.</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
`
|
||||
)
|
||||
28
vendor/openpitrix.io/openpitrix/pkg/constants/frontgate.go
generated
vendored
Normal file
28
vendor/openpitrix.io/openpitrix/pkg/constants/frontgate.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright 2018 The OpenPitrix Authors. All rights reserved.
|
||||
// Use of this source code is governed by a Apache license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
package constants
|
||||
|
||||
// can use this id for internal test
|
||||
const FrontgateVersionId = "appv-ABCDEFGHIJKLMNOPQRST"
|
||||
const FrontgateAppId = "app-ABCDEFGHIJKLMNOPQRST"
|
||||
|
||||
const FrontgateDefaultConf = `
|
||||
{
|
||||
"app_id": "app-ABCDEFGHIJKLMNOPQRST",
|
||||
"version_id": "appv-ABCDEFGHIJKLMNOPQRST",
|
||||
"name": "frontgate",
|
||||
"description": "OpenPitrix built-in frontgate service",
|
||||
"subnet": "",
|
||||
"nodes": [{
|
||||
"container": {
|
||||
"type": "docker",
|
||||
"image": "openpitrix/openpitrix:metadata"
|
||||
},
|
||||
"count": 3,
|
||||
"cpu": 1,
|
||||
"memory": 1024
|
||||
}]
|
||||
}
|
||||
`
|
||||
708
vendor/openpitrix.io/openpitrix/pkg/constants/notify_message.go
generated
vendored
Normal file
708
vendor/openpitrix.io/openpitrix/pkg/constants/notify_message.go
generated
vendored
Normal file
@@ -0,0 +1,708 @@
|
||||
// Copyright 2018 The OpenPitrix Authors. All rights reserved.
|
||||
// Use of this source code is governed by a Apache license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
package constants
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"text/template"
|
||||
)
|
||||
|
||||
const (
|
||||
en = "en"
|
||||
zhCN = "zh_cn"
|
||||
defaultLocale = zhCN
|
||||
)
|
||||
|
||||
const EmailNotifyName = "email"
|
||||
|
||||
type EmailNotifyContent struct {
|
||||
Content string
|
||||
}
|
||||
|
||||
type NotifyMessage struct {
|
||||
en string
|
||||
zhCN string
|
||||
}
|
||||
|
||||
type NotifyTitle struct {
|
||||
NotifyMessage
|
||||
}
|
||||
|
||||
type NotifyContent struct {
|
||||
NotifyMessage
|
||||
}
|
||||
|
||||
func (n *NotifyMessage) GetMessage(locale string, params ...interface{}) string {
|
||||
switch locale {
|
||||
case en:
|
||||
return fmt.Sprintf(n.en, params...)
|
||||
case zhCN:
|
||||
return fmt.Sprintf(n.zhCN, params...)
|
||||
default:
|
||||
return fmt.Sprintf(n.zhCN, params...)
|
||||
}
|
||||
}
|
||||
|
||||
func (n *NotifyTitle) GetDefaultMessage(params ...interface{}) string {
|
||||
return n.GetMessage(defaultLocale, params...)
|
||||
}
|
||||
|
||||
func (n *NotifyContent) GetDefaultMessage(params ...interface{}) string {
|
||||
t, _ := template.New(EmailNotifyName).Parse(EmailNotifyTemplate)
|
||||
|
||||
b := bytes.NewBuffer([]byte{})
|
||||
emailContent := &EmailNotifyContent{
|
||||
Content: n.GetMessage(defaultLocale, params...),
|
||||
}
|
||||
|
||||
t.Execute(b, emailContent)
|
||||
return b.String()
|
||||
}
|
||||
|
||||
var (
|
||||
AdminInviteIsvNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】邀请您成为平台服务商",
|
||||
},
|
||||
}
|
||||
AdminInviteIsvNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
<strong>%s</strong>邀请您入驻应用市场<strong>「%s」</strong>,成为优质服务商,为平台用户提供企业解决方案、产品和集成服务,共享快速收益。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">接受邀请</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
<p class="line6">
|
||||
用户名:<strong>%s</strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
密码:<strong>%s</strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
首次登陆后请修改密码。
|
||||
</p>
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
AdminInviteUserNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】邀请您成为平台用户",
|
||||
},
|
||||
}
|
||||
AdminInviteUserNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">Hi, %s</p>
|
||||
<p class="line2">
|
||||
<strong>%s</strong>邀请你加入<strong>「%s」</strong>,成为平台正式用户。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">接受邀请</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
<p class="line6">
|
||||
用户名:<strong>%s</strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
密码:<strong>%s</strong>
|
||||
</p>
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
IsvInviteMemberNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】邀请您加入 %s 平台",
|
||||
},
|
||||
}
|
||||
IsvInviteMemberNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
<strong>%s</strong>邀请您加入<strong>「%s」</strong>平台协同工作。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">接受邀请</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
<p class="line6">
|
||||
用户名:<strong>%s</strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
密码:<strong>%s</strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
首次登陆后请修改密码。
|
||||
</p>
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
SubmitVendorNotifyAdminTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】%s 应用服务商资质申请",
|
||||
},
|
||||
}
|
||||
SubmitVendorNotifyAdminContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
收到 %s 应用服务商资质申请,请尽快完成审核。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">审核</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
SubmitVendorNotifyIsvTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】已收到您的应用服务商资质申请",
|
||||
},
|
||||
}
|
||||
SubmitVendorNotifyIsvContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
已收到您的应用服务商资质申请,我们会在3个工作日内完成审核,请您耐心等待。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看申请</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
|
||||
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
PassVendorNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】您的 %s 应用服务商资质申请已通过",
|
||||
},
|
||||
}
|
||||
PassVendorNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
恭喜您,应用服务商资质申请通过审核,正式成为 %s 应用服务商。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
RejectVendorNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】已拒绝您的 %s 应用服务商资质申请",
|
||||
},
|
||||
}
|
||||
RejectVendorNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
您提交的 %s 应用服务商资质申请信息有误,请核对相关内容,完善申请后重新提交。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
SubmitAppVersionNotifyReviewerTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】%s 应用 %s 版本审核申请",
|
||||
},
|
||||
}
|
||||
SubmitAppVersionNotifyReviewerContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
收到 %s 应用 %s 版本审核申请,请尽快完成审核。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
SubmitAppVersionNotifySubmitterTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】已收到您的 %s 应用 %s 版本审核申请",
|
||||
},
|
||||
}
|
||||
SubmitAppVersionNotifySubmitterContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
已收到您的 %s 应用 %s 版本审核申请,请您耐心等待。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
PassAppVersionInfoNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】%s 应用 %s 版本通过应用信息审核",
|
||||
},
|
||||
}
|
||||
PassAppVersionInfoNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
恭喜您,%s 应用 %s 版本已通过应用信息审核,等待平台商务审核。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
PassAppVersionBusinessNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】%s 应用 %s 版本通过平台商务审核",
|
||||
},
|
||||
}
|
||||
PassAppVersionBusinessNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
恭喜您,%s 应用 %s 版本已通过平台商务审核,等待平台技术审核。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
PassAppVersionTechnicalNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】%s 应用 %s 版本通过平台技术审核",
|
||||
},
|
||||
}
|
||||
PassAppVersionTechnicalNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
恭喜您,%s 应用 %s 版本已通过平台技术审核,请尽快完成应用版本上架。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
RejectAppVersionInfoNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】%s 应用 %s 版本未通过应用信息审核",
|
||||
},
|
||||
}
|
||||
RejectAppVersionInfoNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
您提交的 %s 应用 %s 版本未通过应用信息审核,请核对相关内容,完善后重新提交。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
RejectAppVersionBusinessNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】%s 应用 %s 版本未通过平台商务审核",
|
||||
},
|
||||
}
|
||||
RejectAppVersionBusinessNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
您提交的 %s 应用 %s 版本未通过平台商务审核,请核对相关内容,完善后重新提交。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
RejectAppVersionTechnicalNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】%s 应用 %s 版本未通过平台技术审核",
|
||||
},
|
||||
}
|
||||
RejectAppVersionTechnicalNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
您提交的 %s 应用 %s 版本未通过平台技术审核,请核对相关内容,完善后重新提交。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
ReleaseAppVersionNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】%s 应用 %s 版本已上架",
|
||||
},
|
||||
}
|
||||
ReleaseAppVersionNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
%s 应用 %s 版本已上架到应用市场。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
SuspendAppVersionNotifyTitle = NotifyTitle{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: "【%s】%s 应用 %s 版本已下架",
|
||||
},
|
||||
}
|
||||
SuspendAppVersionNotifyContent = NotifyContent{
|
||||
NotifyMessage: NotifyMessage{
|
||||
zhCN: `
|
||||
<span class="platform">%s</span>
|
||||
</p>
|
||||
<p class="line1">%s 您好</p>
|
||||
<p class="line2">
|
||||
%s 应用 %s 版本已从应用市场下架。
|
||||
</p>
|
||||
|
||||
<p class="line3">
|
||||
<a class="linkBtn" href="%s">查看详情</a>
|
||||
</p>
|
||||
|
||||
<p class="line4">
|
||||
如果按钮无法点击,请直接访问以下链接:
|
||||
</p>
|
||||
|
||||
<p class="line5">
|
||||
<a class="link" href="%s">%s</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr />
|
||||
<p class="gray">
|
||||
* 此为系统邮件请勿回复
|
||||
</p>
|
||||
`,
|
||||
},
|
||||
}
|
||||
)
|
||||
44
vendor/openpitrix.io/openpitrix/pkg/constants/table.go
generated
vendored
Normal file
44
vendor/openpitrix.io/openpitrix/pkg/constants/table.go
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright 2018 The OpenPitrix Authors. All rights reserved.
|
||||
// Use of this source code is governed by a Apache license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
package constants
|
||||
|
||||
const (
|
||||
TableApp = "app"
|
||||
TableAppVersion = "app_version"
|
||||
TableCategory = "category"
|
||||
TableCategoryResource = "category_resource"
|
||||
TableCluster = "cluster"
|
||||
TableClusterCommon = "cluster_common"
|
||||
TableClusterLink = "cluster_link"
|
||||
TableClusterLoadbalancer = "cluster_loadbalancer"
|
||||
TableClusterNode = "cluster_node"
|
||||
TableClusterRole = "cluster_role"
|
||||
TableJob = "job"
|
||||
TableKeyPair = "key_pair"
|
||||
TableNodeKeyPair = "node_key_pair"
|
||||
TableRepo = "repo"
|
||||
TableRepoEvent = "repo_event"
|
||||
TableRepoLabel = "repo_label"
|
||||
TableRepoProvider = "repo_provider"
|
||||
TableRepoSelector = "repo_selector"
|
||||
TableRuntime = "runtime"
|
||||
TableRuntimeCredential = "runtime_credential"
|
||||
TableTask = "task"
|
||||
TableAttachment = "attachment"
|
||||
|
||||
TableUser = "user"
|
||||
TableGroupMember = "group_member"
|
||||
TableUserPasswordReset = "user_password_reset"
|
||||
TableGroup = "group"
|
||||
TableUserClient = "user_client"
|
||||
TableToken = "token"
|
||||
|
||||
TableMarket = "market"
|
||||
TableMarketUser = "market_user"
|
||||
|
||||
TableAppVersionAudit = "app_version_audit"
|
||||
TableAppVersionReview = "app_version_review"
|
||||
TableVendorVerifyInfo = "vendor_verify_info"
|
||||
)
|
||||
11
vendor/openpitrix.io/openpitrix/pkg/constants/user.go
generated
vendored
Normal file
11
vendor/openpitrix.io/openpitrix/pkg/constants/user.go
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright 2018 The OpenPitrix Authors. All rights reserved.
|
||||
// Use of this source code is governed by a Apache license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
package constants
|
||||
|
||||
const UserSystem = "system"
|
||||
|
||||
var InternalUsers = []string{
|
||||
UserSystem,
|
||||
}
|
||||
Reference in New Issue
Block a user