Documentation ¶
Index ¶
Constants ¶
View Source
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" 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" 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" 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" ColumnMessage = "message" ColumnAppDefaultStatus = "app_default_status" ColumnMarketId = "market_id" )
View Source
const ( 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" IAMServiceHost = prefix + "iam-service" RepoIndexerHost = prefix + "repo-indexer" CategoryManagerHost = prefix + "category-manager" MarketManagerHost = prefix + "market-manager" )
View Source
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 IAMServicePort = 9115 FrontgateFileServerPort = 9116 MarketManagerPort = 9117 EtcdServicePort = 2379 )
View Source
const ( StatusActive = "active" 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" StatusUnmounted = "unmounted" StatusInUse2 = "in_use" StatusDraft = "draft" StatusSubmitted = "submitted" StatusPassed = "passed" StatusRejected = "rejected" StatusSuspended = "suspended" )
View Source
const ( VisibilityPublic = "public" VisibilityPrivate = "private" )
View Source
const ( DefaultMaxWorkingJobs = 20 DefaultMaxWorkingTasks = 20 DefaultMaxRepoEvents = 20 )
View Source
const ( MaxTaskTimeout = 3600 * time.Second WaitHelmTaskTimeout = 1800 * 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 )
View Source
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" )
View Source
const ( ProviderQingCloud = "qingcloud" ProviderKubernetes = "kubernetes" ProviderAWS = "aws" ProviderAliyun = "aliyun" TargetPilot = "pilot" )
View Source
const ( PlaceHolder = "*" ReplicaRoleSuffix = "-replica" )
View Source
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" )
View Source
const ( TypeS3 = "s3" TypeHttp = "http" TypeHttps = "https" )
View Source
const ( RoleUser = "user" RoleDeveloper = "developer" RoleGlobalAdmin = "global_admin" GrantTypeClientCredentials = "client_credentials" GrantTypePassword = "password" GrantTypeRefreshToken = "refresh_token" )
View Source
const ( RepoIndexPrefix = "repo_index_" ClusterPrefix = "cluster_" )
View Source
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" TableRuntimeLabel = "runtime_label" TableTask = "task" TableUser = "user" TableGroupMember = "group_member" TableUserPasswordReset = "user_password_reset" TableGroup = "group" TableUserClient = "user_client" TableToken = "token" TableMarket = "market" TableMarketUser = "market_user" )
View Source
const FrontgateAppId = "app-ABCDEFGHIJKLMNOPQRST"
View Source
const FrontgateDefaultConf = `` /* 362-byte string literal not displayed */
View Source
const FrontgateVersionId = "appv-ABCDEFGHIJKLMNOPQRST"
can use this id for internal test
View Source
const (
RetryInterval = 3 * time.Second
)
Variables ¶
View Source
var AllAdminRoles = []string{ RoleGlobalAdmin, }
View Source
var AllDeveloperRoles = []string{ RoleDeveloper, RoleGlobalAdmin, }
View Source
var AllRoles = []string{ RoleUser, RoleDeveloper, RoleGlobalAdmin, }
View Source
var AllowedAppDefaultStatus = []string{ "", StatusDraft, StatusActive, }
View Source
var DeletedStatuses = []string{ StatusDeleted, StatusCeased, }
View Source
var GrantTypeTokens = []string{ GrantTypeClientCredentials, GrantTypePassword, GrantTypeRefreshToken, }
View Source
var IndexedColumns = map[string][]string{ TableApp: { ColumnAppId, ColumnName, ColumnRepoId, ColumnDescription, ColumnStatus, ColumnHome, ColumnIcon, ColumnScreenshots, ColumnMaintainers, ColumnSources, ColumnReadme, ColumnOwner, ColumnChartName, }, TableAppVersion: { ColumnVersionId, ColumnAppId, ColumnName, ColumnOwner, ColumnDescription, ColumnPackageName, ColumnStatus, }, TableJob: { ColumnJobId, ColumnClusterId, ColumnAppId, ColumnVersionId, ColumnExecutor, ColumnProvider, ColumnStatus, ColumnOwner, }, TableTask: { ColumnJobId, ColumnTaskId, ColumnExecutor, ColumnStatus, ColumnOwner, }, TableRepo: { ColumnRepoId, ColumnName, ColumnType, ColumnVisibility, ColumnStatus, ColumnAppDefaultStatus, ColumnOwner, }, TableRuntime: { ColumnRuntimeId, ColumnProvider, ColumnZone, ColumnStatus, 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, }, TableUser: { ColumnGroupId, ColumnUserId, ColumnStatus, ColumnRole, }, TableMarket: { ColumnMarketId, ColumnName, ColumnVisibility, ColumnStatus, ColumnOwner, }, TableMarketUser: { ColumnMarketId, ColumnUserId, }, }
columns that can be search through sql '=' operator
View Source
var InternalRepos = []string{
"repo-vmbased", "repo-helm",
}
View Source
var InternalUsers = []string{
"system",
}
View Source
var PushEventTables = map[string][]string{ TableRepoEvent: { ColumnRepoEventId, ColumnRepoId, ColumnStatus, }, TableCluster: { ColumnClusterId, ColumnStatus, ColumnTransitionStatus, }, TableClusterNode: { ColumnNodeId, ColumnStatus, ColumnTransitionStatus, }, TableJob: { ColumnJobId, ColumnStatus, ColumnClusterId, ColumnAppId, ColumnAppId, }, }
View Source
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, }, TableCluster: { ColumnClusterId, ColumnName, ColumnOwner, ColumnAppId, ColumnVersionId, ColumnRuntimeId, }, TableClusterNode: { ColumnNodeId, ColumnClusterId, ColumnName, ColumnInstanceId, ColumnVolumeId, ColumnPrivateIp, ColumnRole, ColumnOwner, }, TableRepo: { ColumnName, ColumnDescription, }, TableUser: { ColumnUserId, ColumnDescription, ColumnEmail, ColumnUsername, }, TableCategory: { ColumnCategoryId, ColumnLocale, ColumnOwner, ColumnName, }, }
columns that can be search through sql 'like' operator
View Source
var SearchWordColumnTable = []string{ TableRuntime, TableApp, TableAppVersion, TableRepo, TableJob, TableTask, TableCluster, TableClusterNode, TableUser, TableCategory, }
View Source
var ServiceNames = []string{ ServiceInit, ServiceStart, ServiceStop, ServiceScaleIn, ServiceScaleOut, ServiceRestart, ServiceDestroy, ServiceBackup, ServiceRestore, ServiceDeleteSnapshot, ServiceUpgrade, }
View Source
var SupportRoles = []string{ RoleUser, RoleDeveloper, RoleGlobalAdmin, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.