Documentation
¶
Index ¶
- Constants
- Variables
- func AppToPb(app *App) *pb.App
- func AppVersionToPb(appVersion *AppVersion) *pb.AppVersion
- func AppVersionsToPbs(appVersions []*AppVersion) (pbAppVersions []*pb.AppVersion)
- func AppsToPbs(apps []*App) (pbApps []*pb.App)
- func ClusterNodeToPb(clusterNode *ClusterNode) *pb.ClusterNode
- func ClusterNodesToPbs(clusterNodes []*ClusterNode) (pbClusterNodes []*pb.ClusterNode)
- func ClusterToPb(cluster *Cluster) *pb.Cluster
- func ClustersToPbs(clusters []*Cluster) (pbClusters []*pb.Cluster)
- func GetColumnsFromStruct(s interface{}) []string
- func GetColumnsFromStructWithPrefix(prefix string, s interface{}) []string
- func JobToPb(job *Job) *pb.Job
- func JobsToPbs(jobs []*Job) (pbJobs []*pb.Job)
- func NewAppId() string
- func NewAppVersionId() string
- func NewClusterId() string
- func NewClusterNodeId() string
- func NewJobId() string
- func NewRepoId() string
- func NewRepoLabelId() string
- func NewRepoSelectorId() string
- func NewRepoTaskId() string
- func NewRuntimeEnvCrentialId() string
- func NewRuntimeEnvId() string
- func NewRuntimeEnvLabelId() string
- func NewTaskId() string
- func RepoLabelToPb(repoLabel *RepoLabel) *pb.RepoLabel
- func RepoLabelsToPbs(repoLabels []*RepoLabel) (pbRepoLabels []*pb.RepoLabel)
- func RepoSelectorToPb(repoSelector *RepoSelector) *pb.RepoSelector
- func RepoSelectorsToPbs(repoSelectors []*RepoSelector) (pbRepoSelectors []*pb.RepoSelector)
- func RepoTaskToPb(repoTask *RepoTask) *pb.RepoTask
- func RepoTasksToPbs(repoTasks []*RepoTask) (pbRepoTasks []*pb.RepoTask)
- func RepoToPb(repo *Repo) *pb.Repo
- func ReposToPbs(repos []*Repo) (pbRepos []*pb.Repo)
- func RuntimeEnvCredentialContentMapToString(mapContent map[string]string) string
- func RuntimeEnvCredentialContentStringToMap(stringContent string) map[string]string
- func RuntimeEnvCredentialToPb(runtimeEnvCredential *RuntimeEnvCredential) *pb.RuntimeEnvCredential
- func RuntimeEnvCredentialToPbs(runtimeEnvCredentials []*RuntimeEnvCredential) (pbRuntimeEnvCredentials []*pb.RuntimeEnvCredential)
- func RuntimeEnvLabelToPb(runtimeEnvLabel *RuntimeEnvLabel) *pb.RuntimeEnvLabel
- func RuntimeEnvLabelsToPbs(runtimeEnvLabels []*RuntimeEnvLabel) (pbRuntimeEnvLabels []*pb.RuntimeEnvLabel)
- func RuntimeEnvToPb(runtimeEnv *RuntimeEnv) *pb.RuntimeEnv
- func RuntimeEnvToPbs(runtimeEnvs []*RuntimeEnv) (pbRuntimeEnvs []*pb.RuntimeEnv)
- func TaskToPb(task *Task) *pb.Task
- func TasksToPbs(tasks []*Task) (pbTasks []*pb.Task)
- type App
- type AppVersion
- type Cluster
- type ClusterCommon
- type ClusterJsonMustache
- type ClusterLink
- type ClusterLoadbalancer
- type ClusterNode
- type ClusterRole
- type ClusterSnapshot
- type ClusterUpgradeAudit
- type ClusterWrapper
- type HealthCheck
- type Job
- type Monitor
- type Node
- type Repo
- type RepoLabel
- type RepoSelector
- type RepoTask
- type RuntimeEnv
- type RuntimeEnvAttachedCredential
- type RuntimeEnvCredential
- type RuntimeEnvLabel
- type ServiceParams
- type Task
- type TaskLayer
- type WalkFunc
Constants ¶
View Source
const AppTableName = "app"
View Source
const AppVersionTableName = "app_version"
View Source
const ClusterCommonTableName = "cluster_common"
View Source
const ClusterLinkTableName = "cluster_link"
View Source
const ClusterLoadbalancerTableName = "cluster_loadbalancer"
View Source
const ClusterNodeTableName = "cluster_node"
View Source
const ClusterRoleTableName = "cluster_role"
View Source
const ClusterSnapshotTableName = "cluster_snapshot"
View Source
const ClusterTableName = "cluster"
View Source
const ClusterUpgradeAuditTableName = "cluster_upgrade_audit"
View Source
const JobTableName = "job"
View Source
const RepoLabelTableName = "repo_label"
View Source
const RepoSelectorTableName = "repo_selector"
View Source
const RepoTableName = "repo"
View Source
const RepoTaskTableName = "repo_task"
View Source
const RuntimeEnvAttachedCredentialTableName = "runtime_env_attached_credential"
View Source
const RuntimeEnvCredentialTableName = "runtime_env_credential"
View Source
const RuntimeEnvLabelTableName = "runtime_env_label"
View Source
const RuntimeEnvTableName = "runtime_env"
View Source
const TaskTableName = "task"
Variables ¶
View Source
var AppColumns = GetColumnsFromStruct(&App{})
View Source
var AppVersionColumns = GetColumnsFromStruct(&AppVersion{})
View Source
var ClusterColumns = GetColumnsFromStruct(&Cluster{})
View Source
var ClusterCommonColumns = GetColumnsFromStruct(&ClusterCommon{})
View Source
var ClusterLinkColumns = GetColumnsFromStruct(&ClusterLink{})
View Source
var ClusterLoadbalancerColumns = GetColumnsFromStruct(&ClusterLoadbalancer{})
View Source
var ClusterNodeColumns = GetColumnsFromStruct(&ClusterNode{})
View Source
var ClusterRoleColumns = GetColumnsFromStruct(&ClusterRole{})
View Source
var ClusterSnapshotColumns = GetColumnsFromStruct(&ClusterSnapshot{})
View Source
var ClusterUpgradeAuditColumns = GetColumnsFromStruct(&ClusterUpgradeAudit{})
View Source
var IndexedColumns = map[string][]string{
AppTableName: {
"app_id", "name", "repo_id", "description", "status",
"home", "icon", "screenshots", "maintainers", "sources",
"readme", "owner", "chart_name",
},
AppVersionTableName: {
"version_id", "app_id", "name", "owner", "description",
"package_name", "status",
},
JobTableName: {
"job_id", "cluster_id", "app_id", "app_version", "status",
},
TaskTableName: {
"job_id", "task_id", "status",
},
RepoTableName: {
"repo_id", "name", "type", "visibility", "status",
},
RuntimeEnvTableName: {
"runtime_env_id", "status", "owner",
},
RuntimeEnvCredentialTableName: {
"runtime_env_credential_id", "status", "owner",
},
RepoLabelTableName: {
"repo_id", "repo_label_id", "status",
},
RepoSelectorTableName: {
"repo_id", "repo_selector_id", "status",
},
RepoTaskTableName: {
"repo_task_id", "repo_id", "status",
},
}
columns that can be search through sql '=' operator
View Source
var JobColumns = GetColumnsFromStruct(&Job{})
View Source
var RepoColumns = GetColumnsFromStruct(&Repo{})
View Source
var RepoColumnsWithTablePrefix = GetColumnsFromStructWithPrefix(RepoTableName, &Repo{})
View Source
var RepoLabelColumns = GetColumnsFromStruct(&RepoLabel{})
View Source
var RepoSelectorColumns = GetColumnsFromStruct(&RepoSelector{})
View Source
var RepoTaskColumns = GetColumnsFromStruct(&RepoTask{})
View Source
var RuntimeEnvAttachedCredentialColumns = GetColumnsFromStruct(&RuntimeEnvAttachedCredential{})
View Source
var RuntimeEnvColumns = GetColumnsFromStruct(&RuntimeEnv{})
View Source
var RuntimeEnvCredentialColumns = GetColumnsFromStruct(&RuntimeEnvCredential{})
View Source
var RuntimeEnvLabelColumns = GetColumnsFromStruct(&RuntimeEnvLabel{})
View Source
var SearchColumns = map[string][]string{
AppTableName: {
"app_id", "name", "repo_id", "owner", "chart_name",
},
AppVersionTableName: {
"version_id", "app_id", "name", "description", "owner", "package_name",
},
JobTableName: {
"job_id", "cluster_id", "app_id", "app_version", "status",
},
TaskTableName: {
"job_id", "task_id", "status",
},
RuntimeEnvTableName: {
"runtime_env_id", "name",
},
RuntimeEnvCredentialTableName: {
"runtime_env_credential_id", "name",
},
}
columns that can be search through sql 'like' operator
View Source
var SearchWordColumnTable = []string{ RuntimeEnvTableName, RuntimeEnvCredentialTableName, AppTableName, AppVersionTableName, }
View Source
var TaskColumns = GetColumnsFromStruct(&Task{})
Functions ¶
func AppVersionToPb ¶
func AppVersionToPb(appVersion *AppVersion) *pb.AppVersion
func AppVersionsToPbs ¶
func AppVersionsToPbs(appVersions []*AppVersion) (pbAppVersions []*pb.AppVersion)
func ClusterNodeToPb ¶
func ClusterNodeToPb(clusterNode *ClusterNode) *pb.ClusterNode
func ClusterNodesToPbs ¶
func ClusterNodesToPbs(clusterNodes []*ClusterNode) (pbClusterNodes []*pb.ClusterNode)
func ClusterToPb ¶
func ClustersToPbs ¶
func GetColumnsFromStruct ¶
func GetColumnsFromStruct(s interface{}) []string
func NewAppVersionId ¶
func NewAppVersionId() string
func NewClusterId ¶
func NewClusterId() string
func NewClusterNodeId ¶
func NewClusterNodeId() string
func NewRepoLabelId ¶
func NewRepoLabelId() string
func NewRepoSelectorId ¶
func NewRepoSelectorId() string
func NewRepoTaskId ¶
func NewRepoTaskId() string
func NewRuntimeEnvCrentialId ¶
func NewRuntimeEnvCrentialId() string
func NewRuntimeEnvId ¶
func NewRuntimeEnvId() string
func NewRuntimeEnvLabelId ¶
func NewRuntimeEnvLabelId() string
func RepoLabelToPb ¶
func RepoLabelsToPbs ¶
func RepoSelectorToPb ¶
func RepoSelectorToPb(repoSelector *RepoSelector) *pb.RepoSelector
func RepoSelectorsToPbs ¶
func RepoSelectorsToPbs(repoSelectors []*RepoSelector) (pbRepoSelectors []*pb.RepoSelector)
func RepoTaskToPb ¶
func RepoTasksToPbs ¶
func ReposToPbs ¶
func RuntimeEnvCredentialToPb ¶
func RuntimeEnvCredentialToPb(runtimeEnvCredential *RuntimeEnvCredential) *pb.RuntimeEnvCredential
func RuntimeEnvCredentialToPbs ¶
func RuntimeEnvCredentialToPbs(runtimeEnvCredentials []*RuntimeEnvCredential) (pbRuntimeEnvCredentials []*pb.RuntimeEnvCredential)
func RuntimeEnvLabelToPb ¶
func RuntimeEnvLabelToPb(runtimeEnvLabel *RuntimeEnvLabel) *pb.RuntimeEnvLabel
func RuntimeEnvLabelsToPbs ¶
func RuntimeEnvLabelsToPbs(runtimeEnvLabels []*RuntimeEnvLabel) (pbRuntimeEnvLabels []*pb.RuntimeEnvLabel)
func RuntimeEnvToPb ¶
func RuntimeEnvToPb(runtimeEnv *RuntimeEnv) *pb.RuntimeEnv
func RuntimeEnvToPbs ¶
func RuntimeEnvToPbs(runtimeEnvs []*RuntimeEnv) (pbRuntimeEnvs []*pb.RuntimeEnv)
func TasksToPbs ¶
Types ¶
type App ¶
type AppVersion ¶
type AppVersion struct { VersionId string AppId string Owner string Name string Description string PackageName string Status string CreateTime time.Time StatusTime time.Time }
func NewAppVersion ¶
func NewAppVersion(appId, name, description, owner, packageName string) *AppVersion
type Cluster ¶
type Cluster struct { ClusterId string Name string Description string AppId string VersionId string VxnetId string FrontgateId string ClusterType int32 Endpoints string Status string TransitionStatus string MetadataRootAccess bool Owner string GlobalUuid string UpgradeStatus string UpgradeTime time.Time RuntimeEnvId string CreateTime time.Time StatusTime time.Time }
func NewCluster ¶
func NewCluster() *Cluster
type ClusterCommon ¶
type ClusterCommon struct { ClusterId string Role string ServerIdUpperBound int32 AdvancedActions string InitService string StartService string StopService string ScaleOutService string ScaleInService string RestartService string DestroyService string UpgradeService string CustomService string BackupService string RestoreService string DeleteSnapshotService string HealthCheck string Monitor string Passphraseless string VerticalScalingPolicy string AgentInstalled bool CustomMetadataScript string ImageId string BackupPolicy string IncrementalBackupSupported bool Hypervisor string }
type ClusterJsonMustache ¶
type ClusterJsonMustache struct { AppId string `json:"app_id"` VersionId string `json:"version_id"` GlobalUuid string `json:"global_uuid"` Name string `json:"name"` Description string `json:"description"` Vxnet string `json:"vxnet"` Links map[string]string `json:"links"` BackupPolicy string `json:"backup_policy"` IncrementalBackupSupported *bool `json:"incremental_backup_supported"` UpgradePolicy []string `json:"upgrade_policy"` Nodes []Node `json:"nodes"` Env map[string]interface{} `json:"env"` AdvancedActions []string `json:"advanced_actions"` Endpoints map[string]struct { Port int32 `json:"port"` Protocol string `json:"protocol"` } `json:"endpoints"` MetadataRootAccess *bool `json:"metadata_root_access"` HealthCheck *HealthCheck `json:"health_check"` Monitor *Monitor `json:"monitor"` DisplayTabs struct { DisplayTabsItems map[string]struct { Cmd string `json:"cmd"` RolesToExecuteOn []string `json:"roles_to_execute_on"` Description string `json:"description"` Timeout int32 `json:"timeout"` } } `json:"display_tabs"` }
type ClusterLink ¶
type ClusterLoadbalancer ¶
type ClusterNode ¶
type ClusterNode struct { NodeId string ClusterId string Name string InstanceId string VolumeId string VxnetId string PrivateIp string ServerId int32 Role string Status string TransitionStatus string GroupId int32 Owner string GlobalServerId string CustomMetadata string PubKey string HealthStatus string IsBackup bool AutoBackup bool CreateTime time.Time StatusTime time.Time }
func NewClusterNode ¶
func NewClusterNode() *ClusterNode
type ClusterRole ¶
type ClusterSnapshot ¶
type ClusterUpgradeAudit ¶
type ClusterWrapper ¶
type ClusterWrapper struct { Cluster *Cluster ClusterNodes []*ClusterNode ClusterCommons []*ClusterCommon ClusterLinks []*ClusterLink ClusterRoles []*ClusterRole ClusterLoadbalancers []*ClusterLoadbalancer }
type HealthCheck ¶
type HealthCheck struct { Enable *bool `json:"enable"` IntervalSec int32 `json:"interval_sec"` TimeoutSec int32 `json:"timeout_sec"` ActionTimeoutSec int32 `json:"action_timeout_sec"` HealthyThreshold int32 `json:"healthy_threshold"` UnhealthyThreshold int32 `json:"unhealthy_threshold"` CheckCmd string `json:"check_cmd"` ActionCmd string `json:"action_cmd"` }
type Job ¶
type Monitor ¶
type Monitor struct { Enable *bool `json:"enable"` Cmd string `json:"cmd"` Items map[string]struct { Unit string `json:"unit"` ValueType string `json:"value_type"` StatisticsType string `json:"statistics_type"` ScaleFactorWhenDisplay int32 `json:"scale_factor_when_display"` Enums []string `json:"enums"` } `json:"items"` Groups map[string][]string `json:"groups"` Display []string `json:"display"` Alarm []string `json:"alarm"` }
type Node ¶
type Node struct { Role string `json:"role"` AdvancedActions []string `json:"advanced_actions"` Loadbalancer []struct { Listener string `json:"listener"` Port int32 `json:"port"` Policy string `json:"policy"` } `json:"loadbalancer"` Container struct { Type string `json:"type"` Image string `json:"image"` } `json:"container"` Count int32 `json:"count"` CPU int32 `json:"cpu"` Memory int32 `json:"memory"` GPU int32 `json:"gpu"` Volume struct { Size int32 `json:"size"` InstanceSize int32 `json:"instance_size"` MountPoint interface{} `json:"mount_point"` MountOptions string `json:"mount_options"` Filesystem string `json:"filesystem"` } `json:"volume"` Replica int32 `json:"replica"` Passphraseless string `json:"passphraseless"` VerticalScalingPolicy string `json:"vertical_scaling_policy"` UserAccess *bool `json:"user_access"` Services map[string]interface{} `json:"services"` ServerIDUpperBound int32 `json:"server_id_upper_bound"` Env map[string]interface{} `json:"env"` AgentInstalled *bool `json:"agent_installed"` CustomMetadata map[string]interface{} `json:"custom_metadata"` HealthCheck *HealthCheck `json:"health_check"` Monitor *Monitor `json:"monitor"` }
type Repo ¶
type RepoLabel ¶
type RepoLabel struct { RepoLabelId string RepoId string LabelKey string LabelValue string Status string CreateTime time.Time StatusTime time.Time }
func NewRepoLabel ¶
type RepoSelector ¶
type RepoSelector struct { RepoSelectorId string RepoId string SelectorKey string SelectorValue string Status string CreateTime time.Time StatusTime time.Time }
func NewRepoSelector ¶
func NewRepoSelector(repoId, selectorKey, selectorValue string) *RepoSelector
type RepoTask ¶
type RepoTask struct { RepoTaskId string RepoId string Status string Result string Owner string CreateTime time.Time StatusTime time.Time }
func NewRepoTask ¶
type RuntimeEnv ¶
type RuntimeEnv struct { RuntimeEnvId string Name string Description string RuntimeEnvUrl string Owner string Status string CreateTime time.Time StatusTime time.Time }
func NewRuntimeEnv ¶
func NewRuntimeEnv(name, description, runtimeEnvUrl, owner string) *RuntimeEnv
type RuntimeEnvAttachedCredential ¶
func NewRuntimeEnvAttachedCredential ¶
func NewRuntimeEnvAttachedCredential(runtimeEnvId, runtimeEnvCredentialId string) *RuntimeEnvAttachedCredential
type RuntimeEnvCredential ¶
type RuntimeEnvCredential struct { RuntimeEnvCredentialId string Name string Description string Owner string Content string Status string CreateTime time.Time StatusTime time.Time }
func NewRuntimeEnvCredential ¶
func NewRuntimeEnvCredential(name, description, owner string, content map[string]string) *RuntimeEnvCredential
type RuntimeEnvLabel ¶
type RuntimeEnvLabel struct { RuntimeEnvLabelId string RuntimeEnvId string LabelKey string LabelValue string }
func NewRuntimeEnvLabel ¶
func NewRuntimeEnvLabel(runtimeEnvId, labelKey, labelValue string) *RuntimeEnvLabel
type ServiceParams ¶
type ServiceParams struct {
Params map[string]interface{}
}
type Task ¶
Source Files
¶
- app.go
- app_version.go
- cluster.go
- cluster_common.go
- cluster_json_mustache.go
- cluster_link.go
- cluster_loadbalancer.go
- cluster_node.go
- cluster_role.go
- cluster_snapshot.go
- cluster_upgrade_audit.go
- cluster_wrapper.go
- common.go
- job.go
- repo.go
- repo_task.go
- runtime_env.go
- runtime_env_attached_credential.go
- runtime_env_credential.go
- runtime_env_label.go
- task.go
Click to show internal directories.
Click to hide internal directories.