Documentation ¶
Index ¶
- Constants
- Variables
- func NewAppStatusFromExport(app *ExportAppStruct) *dbmodel.AppStatus
- func NewAppStatusFromImport(app *ImportAppStruct) *dbmodel.AppStatus
- type APIManager
- type AddDependencyStruct
- type AddEndpiontsReq
- type AddEnvStruct
- type AddHTTPRuleStruct
- type AddNodeLabelStruct
- type AddOrUpdRuleConfigReq
- type AddProbeStruct
- type AddRuleConfigReq
- type AddServiceLabelStruct
- type AddServiceMonitorRequestStruct
- type AddServicePort
- type AddTCPRuleStruct
- type AddTenantServiceEnvVar
- type AddTenantStruct
- type AddVolumeDependencyStruct
- type AddVolumeStruct
- type Addition
- type AllPluginBuildVersionStruct
- type AppConfigGroup
- type AppConfigGroupRelations
- type AppPod
- type AppPort
- type AppService
- type AppStatus
- type AppStatusCondition
- type AppStatusesReq
- type Application
- type ApplicationConfigGroup
- type ApplicationConfigGroupResp
- type Attr
- type AutoScalerRule
- type AutoscalerRuleReq
- type AutoscalerRuleResp
- type BaseEnv
- type BasePort
- type BaseService
- type BatchBuildPlugins
- type BatchCreatePlugins
- type BatchOpRequesters
- type BatchOpResult
- type BatchOpResultItemStatus
- type BatchOperationReq
- type BindServiceRequest
- type Body
- type BuildCodeInfo
- type BuildImageInfo
- type BuildListRespVO
- type BuildPluginReq
- type BuildPluginStruct
- type BuildServiceStruct
- type BuildSlugInfo
- type BuildVersion
- type ByPodName
- type ByServiceName
- type CheckCodeStruct
- type CheckResourceNameReq
- type CheckResourceNameResp
- type ClusterResource
- type CommandResponse
- type Component
- type ComponentBase
- type ComponentBuildReq
- func (b *ComponentBuildReq) BatchOpFailureItem() *ComponentOpResult
- func (b *ComponentBuildReq) GetComponentID() string
- func (b *ComponentBuildReq) GetEventID() string
- func (b *ComponentBuildReq) GetVersion() string
- func (b *ComponentBuildReq) OpType() string
- func (b *ComponentBuildReq) SetVersion(string)
- func (b *ComponentBuildReq) TaskBody(cpt *dbmodel.TenantServices) interface{}
- type ComponentConfigFile
- type ComponentEnv
- type ComponentLabel
- type ComponentOpGeneralReq
- type ComponentOpReq
- type ComponentOpResult
- type ComponentPlugin
- type ComponentStartReq
- func (s *ComponentStartReq) BatchOpFailureItem() *ComponentOpResult
- func (s *ComponentStartReq) GetComponentID() string
- func (s *ComponentStartReq) GetEventID() string
- func (s *ComponentStartReq) GetVersion() string
- func (s *ComponentStartReq) OpType() string
- func (s *ComponentStartReq) SetVersion(string)
- func (s *ComponentStartReq) TaskBody(cpt *dbmodel.TenantServices) interface{}
- type ComponentStopReq
- type ComponentUpgradeReq
- func (u *ComponentUpgradeReq) BatchOpFailureItem() *ComponentOpResult
- func (u *ComponentUpgradeReq) GetComponentID() string
- func (u *ComponentUpgradeReq) GetEventID() string
- func (u *ComponentUpgradeReq) GetVersion() string
- func (u *ComponentUpgradeReq) OpType() string
- func (u *ComponentUpgradeReq) SetVersion(version string)
- func (u *ComponentUpgradeReq) TaskBody(cpt *dbmodel.TenantServices) interface{}
- type ComponentVolume
- type ComposerStruct
- type ConfigEnvs
- type ConfigGroupService
- type ConfigItem
- type CreateAppRequest
- type CreateAppResponse
- type CreatePluginStruct
- type CreateServiceStruct
- type DataLog
- type DelEndpiontsReq
- type DelRuleConfigReq
- type DelTenantServiceEnvVar
- type DeleteDefineSourcesStruct
- type DeleteENVstruct
- type DeleteHTTPRuleStruct
- type DeletePluginSetStruct
- type DeletePluginStruct
- type DeleteProbeStruct
- type DeleteServicePort
- type DeleteTCPRuleStruct
- type DeleteVolumeDependencyStruct
- type DeleteVolumeStruct
- type DependService
- type ENVStruct
- type EndpointKubernetes
- type Endpoints
- type EtcdCleanReq
- type ExportAppStruct
- type GetNetDownStreamRuleStruct
- type GetPluginEnvStruct
- type GetPluginSetStruct
- type GetPluginsStruct
- type GetServiceCheckInfoStruct
- type GetSingleServiceInfoStruct
- type GetSupportProtocols
- type GetTokenInfo
- type GetUserToken
- type GetVersionEnvStruct
- type HTTPRuleConfig
- type HeaderRules
- type HelmAppRelease
- type HistoryLogFile
- type HorizontalServiceStruct
- type ImageShare
- type ImportAppStruct
- type InstallAppReq
- type Item
- type LabelStruct
- type Labels
- type LabelsStruct
- type LanguageSet
- type LastLinesStruct
- type LicenseInfo
- type ListAppResponse
- type ListApplicationConfigGroupResp
- type ListServiceResponse
- type LogByLevelStruct
- type LogData
- type LogFileStruct
- type LogSocketStruct
- type Login
- type MQBody
- type MessageData
- type Model
- type MontiorData
- type MsgStruct
- type NetDownStreamRules
- type NetRulesDownStreamBody
- type NetUpStreamRules
- type NodeResource
- type PagedTenantResList
- type ParseAppServicesReq
- type Plugin
- type PluginBuildVersionStruct
- type PluginDefaultENV
- type PluginSetStruct
- type PluginVersionEnv
- type PodContainer
- type PodDetail
- type PodEvent
- type PodStatus
- type PodsList
- type PodsStructStruct
- type PublicShare
- type ResourceSpec
- type RestoreDep
- type RestoreDepVol
- type RestoreDepVolsReq
- type RestoreDepsReq
- type RestoreEnv
- type RestoreEnvsReq
- type RestorePlugin
- type RestorePluginsReq
- type RestorePort
- type RestorePortsReq
- type RestoreVolume
- type RestoreVolumesReq
- type Rewrite
- type RollBackStruct
- type RollbackInfoRequestStruct
- type RollbackStruct
- type RuleConfigReq
- type RuleExtensionStruct
- type RuleMetric
- type ServiceCheckStruct
- type ServiceGetCommon
- type ServiceImage
- type ServiceLBPortChange
- type ServicePortInnerOrOuter
- type ServicePorts
- type ServiceProbe
- type ServiceShare
- type ServiceSlug
- type ServiceStruct
- type ServicesInfoStruct
- type ServicesResources
- type SetDefineSourcesStruct
- type SetHeader
- type SetLanguageStruct
- type SetNetDownStreamRuleStruct
- type SetVersionEnv
- type ShareConfItems
- type SlugShare
- type SourceSpec
- type SoureBody
- type StartServiceStruct
- type StartStopStruct
- type StatsInfo
- type StatusList
- type StatusServiceListStruct
- type StatusServiceStruct
- type SyncAppConfigGroup
- type SyncComponentReq
- type TenantAndResource
- type TenantComponentRelation
- type TenantList
- type TenantLogByLevelStruct
- type TenantPluginVersionConfig
- type TenantResList
- type TenantResource
- type TenantResources
- type TenantServiceVolume
- type TenantServiceVolumeStruct
- type TenantServicesPort
- type ThirdEndpoint
- type ThirdEndpoints
- type ThridPartyServiceProbe
- type TokenInfo
- type TotalStatsInfo
- type TransPlugins
- type UpdCertificateReq
- type UpdEndpiontsReq
- type UpdRuleConfigReq
- type UpdVolumeReq
- type UpdateAppConfigGroupReq
- type UpdateAppRequest
- type UpdateBuildVersionReq
- type UpdateDefineSourcesStruct
- type UpdateHTTPRuleStruct
- type UpdateNetDownStreamRuleStruct
- type UpdatePluginStruct
- type UpdateServiceMonitorRequestStruct
- type UpdateServiceStruct
- type UpdateTCPRuleStruct
- type UpdateTenantStruct
- type UpdateToken
- type UpgradeServiceStruct
- type V1BuildServiceStruct
- type V2AddVolumeDependencyStruct
- type V2AddVolumeStruct
- type V2DelVolumeDependencyStruct
- type V2DelVolumeStruct
- type VersionEnv
- type VerticalServiceStruct
- type VolumeRelation
- type VolumeTypePageStruct
- type VolumeTypeStruct
- type VolumeWithStatusResp
- type VolumeWithStatusStruct
Constants ¶
const ( AppTypeKato = "kato" AppTypeHelm = "helm" )
AppType
Variables ¶
var FromCodeBuildKing = "build_from_source_code"
FromCodeBuildKing build from code
var FromImageBuildKing = "build_from_image"
FromImageBuildKing build from image
var FromMarketImageBuildKing = "build_from_market_image"
FromMarketImageBuildKing build from market image
var FromMarketSlugBuildKing = "build_from_market_slug"
FromMarketSlugBuildKing build from market slug
Functions ¶
func NewAppStatusFromExport ¶
func NewAppStatusFromExport(app *ExportAppStruct) *dbmodel.AppStatus
NewAppStatusFromExport -
func NewAppStatusFromImport ¶
func NewAppStatusFromImport(app *ImportAppStruct) *dbmodel.AppStatus
NewAppStatusFromImport -
Types ¶
type APIManager ¶
type APIManager struct { //in: body Body struct { //api level //in: body //required: true ClassLevel string `json:"class_level" validate:"class_level|reqired"` //uri front //in: body //required: true Prefix string `json:"prefix" validate:"prefix|required"` //full uri //in: body //required: false URI string `json:"uri" validate:"uri"` //nickname //in: body //required: false Alias string `json:"alias" validate:"alias"` //additional information //in:body //required: false Remark string `json:"remark" validate:"remark"` } }
APIManager
type AddDependencyStruct ¶
type AddDependencyStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // application id that is dependent // in: body // required: true DepServiceID string `json:"dep_service_id"` // The type of application to be relied on, you need to pass a value when adding, and you don't need to pass a value when deleting // in: body // required: false DepServiceType string `json:"dep_service_type"` // Unknown, default pass 1, but not pass // in: body // required: false DepOrder string `json:"dep_order"` } }
AddDependencyStruct AddDependencyStruct
type AddEndpiontsReq ¶
type AddEndpiontsReq struct {
Address string `json:"address" validate:"address|required"`
}
AddEndpiontsReq is one of the Endpoints in the request to add the endpints.
type AddEnvStruct ¶
type AddEnvStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // port // in: body // required: false ContainerPort int `json:"container_port"` // name // in: body // required: false Name string `json:"name"` // variable name // in: body // required: true AttrName string `json:"env_name"` // Variable value, you need to pass the value when adding, you can not pass when deleting // in: body // required: false AttrValue string `json:"env_value"` // Can it be modified // in: body // required: false IsChange bool `json:"is_change"` // Application range: inner or outer or both // in: body // required: false Scope string `json:"scope"` } }
AddEnvStruct AddEnvStruct
type AddHTTPRuleStruct ¶
type AddHTTPRuleStruct struct { HTTPRuleID string `json:"http_rule_id" validate:"http_rule_id|required"` ServiceID string `json:"service_id" validate:"service_id|required"` ContainerPort int `json:"container_port" validate:"container_port|required"` Domain string `json:"domain" validate:"domain|required"` Path string `json:"path"` Header string `json:"header"` Cookie string `json:"cookie"` Weight int `json:"weight"` IP string `json:"ip"` CertificateID string `json:"certificate_id"` Certificate string `json:"certificate"` PrivateKey string `json:"private_key"` RuleExtensions []*RuleExtensionStruct `json:"rule_extensions"` }
AddHTTPRuleStruct is used to add http rule, certificate and rule extensions
type AddNodeLabelStruct ¶
type AddNodeLabelStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Tag value, the format is "[v1, v2, v3]" // in: body // required: true LabelValues []string `json:"label_values" validate:"label_values|required"` } }
AddNodeLabelStruct AddNodeLabelStruct
type AddOrUpdRuleConfigReq ¶
type AddOrUpdRuleConfigReq struct {
Configs []*AddRuleConfigReq `json:"configs"`
}
AddOrUpdRuleConfigReq -
type AddProbeStruct ¶
type AddProbeStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Probe id // in: body // required: true ProbeID string `json:"probe_id"` // mode // in: body // required: false Mode string `json:"mode"` // mode // in: body // required: false Scheme string `json:"scheme"` // path // in: body // required: false Path string `json:"path"` // Port, default is 80 // in: body // required: false Port int `json:"port"` // Run the command // in: body // required: false Cmd string `json:"cmd"` // http request header, key=value, key2=value2 // in: body // required: false HTTPHeader string `json:"http_header"` // Initialize waiting time, default is 1 // in: body // required: false InitialDelaySecond int `json:"initial_delay_second"` // Detection interval time, default is 3 // in: body // required: false PeriodSecond int `json:"period_second"` // Detection timeout, default is 30 // in: body // required: false TimeoutSecond int `json:"timeout_second"` // Whether to enable // in: body // required: false IsUsed int `json:"is_used"` // The number of failed detections marked // in: body // required: false FailureThreshold int `json:"failure_threshold"` // The number of successful detections marked // in: body // required: false SuccessThreshold int `json:"success_threshold"` } }
AddProbeStruct AddProbeStruct
type AddRuleConfigReq ¶
type AddRuleConfigReq struct { ConfigID string `json:"config_id" validate:"config_id|required"` RuleID string `json:"rule_id" validate:"rule_id|required"` Key string `json:"key" validate:"key|required"` Value string `json:"value" validate:"value|required"` }
AddRuleConfigReq -
type AddServiceLabelStruct ¶
type AddServiceLabelStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Tag value, the format is "v1" // in: bid // required: true LabelValues string `json:"label_values"` } }
AddServiceLabelStruct AddServiceLabelStruct
type AddServiceMonitorRequestStruct ¶
type AddServiceMonitorRequestStruct struct { // name // in: body // required: true Name string `json:"name" validate:"name|required"` // service_show_name // in: body // required: true ServiceShowName string `json:"service_show_name" validate:"service_show_name|required"` // port // in: body // required: true Port int `json:"port" validate:"port|required"` // path // in: body // required: true Path string `json:"path" validate:"path|required"` // interval // in: body // required: true Interval string `json:"interval" validate:"interval|required"` }
AddServiceMonitorRequestStruct add service monitor request
func (*AddServiceMonitorRequestStruct) DbModel ¶
func (a *AddServiceMonitorRequestStruct) DbModel(tenantID, serviceID string) *dbmodel.TenantServiceMonitor
DbModel return database model
type AddServicePort ¶
type AddServicePort struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` //in: body Body struct { //in: body ServicePorts } }
AddServicePort service port swagger:parameters addPort updatePort
type AddTCPRuleStruct ¶
type AddTCPRuleStruct struct { TCPRuleID string `json:"tcp_rule_id" validate:"tcp_rule_id|required"` ServiceID string `json:"service_id" validate:"service_id|required"` ContainerPort int `json:"container_port"` IP string `json:"ip"` Port int `json:"port" validate:"service_id|required"` RuleExtensions []*RuleExtensionStruct `json:"rule_extensions"` }
AddTCPRuleStruct is used to add tcp rule and rule extensions
type AddTenantServiceEnvVar ¶
type AddTenantServiceEnvVar struct { Model TenantID string `validate:"tenant_id|between:30,33" json:"tenant_id"` ServiceID string `validate:"service_id|between:30,33" json:"service_id"` ContainerPort int `validate:"container_port|numeric_between:1,65535" json:"container_port"` Name string `validate:"name" json:"name"` AttrName string `validate:"env_name|required" json:"env_name"` AttrValue string `validate:"env_value" json:"env_value"` IsChange bool `validate:"is_change|bool" json:"is_change"` Scope string `validate:"scope|in:outer,inner,both,build" json:"scope"` }
AddTenantServiceEnvVar application environment variables
func (*AddTenantServiceEnvVar) DbModel ¶
func (a *AddTenantServiceEnvVar) DbModel(tenantID, componentID string) *dbmodel.TenantServiceEnvVar
DbModel return database model
type AddTenantStruct ¶
type AddTenantStruct struct { //in: body Body struct { // the tenant id // in: body // required: false TenantID string `json:"tenant_id" validate:"tenant_id"` // the tenant name // in: body // required: false TenantName string `json:"tenant_name" validate:"tenant_name"` // the eid // in : body // required: false Eid string `json:"eid" validata:"eid"` Token string `json:"token" validate:"token"` LimitMemory int `json:"limit_memory" validate:"limit_memory"` } }
AddTenantStruct AddTenantStruct swagger:parameters addTenant
type AddVolumeDependencyStruct ¶
type AddVolumeDependencyStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Dependent service id // in: body // required: true DependServiceID string `json:"depend_service_id" validate:"depend_service_id|required"` // Container mount directory // in: body // required: true VolumePath string `json:"volume_path" validate:"volume_path|required|regex:^/"` // Depend on storage name // in: body // required: true VolumeName string `json:"volume_name" validate:"volume_name|required|max:50"` VolumeType string `json:"volume_type" validate:"volume_type|required|in:share-file,config-file"` } }
AddVolumeDependencyStruct AddVolumeDependencyStruct
type AddVolumeStruct ¶
type AddVolumeStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Type "application;app_publish" // in: body // required: true Category string `json:"category"` // Container mount directory // in: body // required: true VolumePath string `json:"volume_path" validate:"volume_path|required|regex:^/"` //Storage type (share, local, tmpfs) // in: body // required: true VolumeType string `json:"volume_type" validate:"volume_type|required"` // Storage name (unique to the same application) // in: body // required: true VolumeName string `json:"volume_name" validate:"volume_name|required|max:50"` FileContent string `json:"file_content"` // Storage driver alias (StorageClass alias) VolumeProviderName string `json:"volume_provider_name"` IsReadOnly bool `json:"is_read_only"` // VolumeCapacity storage size VolumeCapacity int64 `json:"volume_capacity"` // Unit: Mi // AccessMode Read and write mode (Important! A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time. #https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) AccessMode string `json:"access_mode"` // SharePolicy sharing mode SharePolicy string `json:"share_policy"` // BackupPolicy backup policy BackupPolicy string `json:"backup_policy"` // ReclaimPolicy recycling strategy ReclaimPolicy string `json:"reclaim_policy"` // Whether AllowExpansion supports expansion AllowExpansion bool `json:"allow_expansion"` Mode *int32 `json:"mode"` } }
AddVolumeStruct AddVolumeStruct
type Addition ¶
type Addition struct { Desc string `json:"desc" validate:"desc"` Items []*Item `json:"items" validate:"items"` }
Addition - store additional information
type AllPluginBuildVersionStruct ¶
type AllPluginBuildVersionStruct struct { //in: path //required: true TenantName string `json:"tenant_name" validate:"tenant_name"` //in: path //required: true PluginID string `json:"plugin_id" validate:"plugin_id"` }
AllPluginBuildVersionStruct AllPluginBuildVersionStruct
type AppConfigGroup ¶
type AppConfigGroup struct { ConfigGroupName string `json:"config_group_name" validate:"required,alphanum,min=2,max=64"` DeployType string `json:"deploy_type" validate:"required,oneof=env configfile"` ConfigItems []ConfigItem `json:"config_items"` ConfigGroupServices []ConfigGroupService `json:"config_group_services"` Enable bool `json:"enable"` }
AppConfigGroup Interface for synchronizing application configuration groups
func (AppConfigGroup) DbModel ¶
func (a AppConfigGroup) DbModel(appID string) *dbmodel.ApplicationConfigGroup
DbModel return database model
type AppConfigGroupRelations ¶
type AppConfigGroupRelations struct {
ConfigGroupName string `json:"config_group_name"`
}
AppConfigGroupRelations -
func (*AppConfigGroupRelations) DbModel ¶
func (a *AppConfigGroupRelations) DbModel(appID, serviceID, serviceAlias string) *dbmodel.ConfigGroupService
DbModel return database model
type AppPort ¶
type AppPort struct { ServiceID string `json:"service_id" validate:"required"` ContainerPort int `json:"container_port" validate:"required"` PortAlias string `json:"port_alias" validate:"required"` K8sServiceName string `json:"k8s_service_name" validate:"required"` }
AppPort -
type AppService ¶
type AppService struct { ServiceName string `json:"service_name"` Address string `json:"address"` Ports []*pb.AppService_Port `json:"ports"` OldPods []*AppPod `json:"oldPods"` Pods []*AppPod `json:"pods"` }
AppService -
type AppStatus ¶
type AppStatus struct { AppID string `json:"app_id"` AppName string `json:"app_name"` Status string `json:"status"` CPU *int64 `json:"cpu"` GPU *int64 `json:"gpu"` Memory *int64 `json:"memory"` Disk int64 `json:"disk"` Phase string `json:"phase"` Version string `json:"version"` Overrides []string `json:"overrides"` Conditions []*AppStatusCondition `json:"conditions"` }
AppStatus -
type AppStatusCondition ¶
type AppStatusCondition struct { Type string `json:"type"` Status bool `json:"status"` Reason string `json:"reason"` Message string `json:"message"` }
AppStatusCondition is the conditon of app status.
type AppStatusesReq ¶
type AppStatusesReq struct {
AppIDs []string `json:"app_ids"`
}
AppStatusesReq -
type Application ¶
type Application struct { EID string `json:"eid" validate:"required"` AppName string `json:"app_name" validate:"required"` AppType string `json:"app_type" validate:"required,oneof=kato helm"` ConsoleAppID int64 `json:"console_app_id"` AppID string `json:"app_id"` TenantID string `json:"tenant_id"` ServiceIDs []string `json:"service_ids"` AppStoreName string `json:"app_store_name"` AppStoreURL string `json:"app_store_url"` AppTemplateName string `json:"app_template_name"` Version string `json:"version"` }
Application -
type ApplicationConfigGroup ¶
type ApplicationConfigGroup struct { AppID string `json:"app_id"` ConfigGroupName string `json:"config_group_name" validate:"required,alphanum,min=2,max=64"` DeployType string `json:"deploy_type" validate:"required,oneof=env configfile"` ServiceIDs []string `json:"service_ids"` ConfigItems []ConfigItem `json:"config_items"` Enable bool `json:"enable"` }
ApplicationConfigGroup -
type ApplicationConfigGroupResp ¶
type ApplicationConfigGroupResp struct { CreateTime time.Time `json:"create_time"` AppID string `json:"app_id"` ConfigGroupName string `json:"config_group_name"` DeployType string `json:"deploy_type"` Services []*dbmodel.ConfigGroupService `json:"services"` ConfigItems []*dbmodel.ConfigGroupItem `json:"config_items"` Enable bool `json:"enable"` }
ApplicationConfigGroupResp -
type Attr ¶
type Attr struct { Action string `json:"action"` TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` AttrName string `json:"env_name"` AttrValue string `json:"env_value"` }
Attr attr
type AutoScalerRule ¶
type AutoScalerRule struct { RuleID string `json:"rule_id"` Enable bool `json:"enable"` XPAType string `json:"xpa_type"` MinReplicas int `json:"min_replicas"` MaxReplicas int `json:"max_replicas"` RuleMetrics []RuleMetric `json:"metrics"` }
AutoScalerRule -
func (AutoScalerRule) DbModel ¶
func (a AutoScalerRule) DbModel(componentID string) *dbmodel.TenantServiceAutoscalerRules
DbModel return database model
type AutoscalerRuleReq ¶
type AutoscalerRuleReq struct { RuleID string `json:"rule_id" validate:"rule_id|required"` ServiceID string Enable bool `json:"enable" validate:"enable|required"` XPAType string `json:"xpa_type" validate:"xpa_type|required"` MinReplicas int `json:"min_replicas" validate:"min_replicas|required"` MaxReplicas int `json:"max_replicas" validate:"min_replicas|required"` Metrics []struct { MetricsType string `json:"metric_type"` MetricsName string `json:"metric_name"` MetricTargetType string `json:"metric_target_type"` MetricTargetValue int `json:"metric_target_value"` } `json:"metrics"` }
AutoscalerRuleReq -
type AutoscalerRuleResp ¶
type AutoscalerRuleResp struct { RuleID string `json:"rule_id"` ServiceID string `json:"service_id"` Enable bool `json:"enable"` XPAType string `json:"xpa_type"` MinReplicas int `json:"min_replicas"` MaxReplicas int `json:"max_replicas"` Metrics []struct { MetricsType string `json:"metric_type"` MetricsName string `json:"metric_name"` MetricTargetType string `json:"metric_target_type"` MetricTargetValue int `json:"metric_target_value"` } `json:"metrics"` }
AutoscalerRuleResp -
type BaseEnv ¶
type BaseEnv struct {
Options map[string]interface{} `json:"options"`
}
BaseEnv - no platform-defined type, ordinary kv
type BasePort ¶
type BasePort struct { ServiceAlias string `json:"service_alias"` ServiceID string `json:"service_id"` //Port is the real app port Port int `json:"port"` //ListenPort is mesh listen port, proxy connetion to real app port ListenPort int `json:"listen_port"` Protocol string `json:"protocol"` Options map[string]interface{} `json:"options"` }
BasePort base of current app ports
type BaseService ¶
type BaseService struct { ServiceAlias string `json:"service_alias"` ServiceID string `json:"service_id"` DependServiceAlias string `json:"depend_service_alias"` DependServiceID string `json:"depend_service_id"` Port int `json:"port"` Protocol string `json:"protocol"` Options map[string]interface{} `json:"options"` }
BaseService - based on dependent application and port structure
type BatchBuildPlugins ¶
type BatchBuildPlugins struct {
Plugins []*BuildPluginReq `json:"plugins"`
}
BatchBuildPlugins -
type BatchCreatePlugins ¶
type BatchCreatePlugins struct {
Plugins []*Plugin `json:"plugins"`
}
BatchCreatePlugins -
type BatchOpRequesters ¶
type BatchOpRequesters []ComponentOpReq
BatchOpRequesters -
func (BatchOpRequesters) ComponentIDs ¶
func (b BatchOpRequesters) ComponentIDs() []string
ComponentIDs returns a list of components ids.
type BatchOpResultItemStatus ¶
type BatchOpResultItemStatus string
BatchOpResultItemStatus is the status of ComponentOpResult.
var ( BatchOpResultItemStatusFailure BatchOpResultItemStatus = "failure" BatchOpResultItemStatusSuccess BatchOpResultItemStatus = "success" )
BatchOpResultItemStatus -
type BatchOperationReq ¶
type BatchOperationReq struct { Operator string `json:"operator"` TenantName string `json:"tenant_name"` Body struct { Operation string `json:"operation" validate:"operation|required|in:start,stop,build,upgrade"` Builds []*ComponentBuildReq `json:"build_infos,omitempty"` Starts []*ComponentStartReq `json:"start_infos,omitempty"` Stops []*ComponentStopReq `json:"stop_infos,omitempty"` Upgrades []*ComponentUpgradeReq `json:"upgrade_infos,omitempty"` } }
BatchOperationReq beatch operation request body
type BindServiceRequest ¶
type BindServiceRequest struct {
ServiceIDs []string `json:"service_ids"`
}
BindServiceRequest -
type Body ¶
type Body struct { ProxyConnectTimeout int `json:"proxy_connect_timeout,omitempty" validate:"proxy_connect_timeout|required"` ProxySendTimeout int `json:"proxy_send_timeout,omitempty" validate:"proxy_send_timeout|required"` ProxyReadTimeout int `json:"proxy_read_timeout,omitempty" validate:"proxy_read_timeout|required"` ProxyBodySize int `json:"proxy_body_size,omitempty" validate:"proxy_body_size|required"` SetHeaders []*SetHeader `json:"set_headers,omitempty" ` Rewrites []*Rewrite `json:"rewrite,omitempty"` ProxyBufferSize int `json:"proxy_buffer_size,omitempty" validate:"proxy_buffer_size|numeric_between:1,65535"` ProxyBufferNumbers int `json:"proxy_buffer_numbers,omitempty" validate:"proxy_buffer_size|numeric_between:1,65535"` ProxyBuffering string `json:"proxy_buffering,omitempty" validate:"proxy_buffering|required"` }
Body is a embedded sturct of RuleConfigReq.
type BuildCodeInfo ¶
type BuildCodeInfo struct { // git address // in: body // required: false RepoURL string `json:"repo_url" validate:"repo_url"` // branch branch information // in: body // required: false Branch string `json:"branch" validate:"branch"` // operator // in: body // required: false Lang string `json:"lang" validate:"lang"` // Code server type // in: body // required: false ServerType string `json:"server_type" validate:"server_type"` Runtime string `json:"runtime"` User string `json:"user" validate:"user"` Password string `json:"password" validate:"password"` //for .netcore source type, need cmd Cmd string `json:"cmd"` }
BuildCodeInfo -
type BuildImageInfo ¶
type BuildImageInfo struct { // Mirror address // in: body // required: false ImageURL string `json:"image_url" validate:"image_url"` User string `json:"user" validate:"user"` Password string `json:"password" validate:"password"` Cmd string `json:"cmd"` }
BuildImageInfo -
type BuildListRespVO ¶
type BuildListRespVO struct { DeployVersion string `json:"deploy_version"` List interface{} `json:"list"` }
BuildListRespVO is the response value object for build-list api.
type BuildPluginReq ¶
type BuildPluginReq struct { PluginID string `json:"plugin_id" validate:"plugin_id"` EventID string `json:"event_id" validate:"event_id"` PluginCPU int `json:"plugin_cpu" validate:"plugin_cpu|required"` PluginMemory int `json:"plugin_memory" validate:"plugin_memory|required"` PluginCMD string `json:"plugin_cmd" validate:"plugin_cmd"` BuildVersion string `json:"build_version" validate:"build_version|required"` DeployVersion string `json:"deploy_version" validate:"deploy_version"` RepoURL string `json:"repo_url" validate:"repo_url"` Username string `json:"username"` Password string `json:"password"` Info string `json:"info" validate:"info"` Operator string `json:"operator" validate:"operator"` TenantID string `json:"tenant_id" validate:"tenant_id"` BuildImage string `json:"build_image" validate:"build_image"` ImageInfo struct { HubURL string `json:"hub_url"` HubUser string `json:"hub_user"` HubPassword string `json:"hub_password"` Namespace string `json:"namespace"` IsTrust bool `json:"is_trust,omitempty"` } `json:"ImageInfo" validate:"ImageInfo"` }
BuildPluginReq -
func (BuildPluginReq) DbModel ¶
func (b BuildPluginReq) DbModel(plugin *dbmodel.TenantPlugin) *dbmodel.TenantPluginBuildVersion
DbModel return database model
type BuildPluginStruct ¶
type BuildPluginStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true PluginID string `json:"plugin_id" validate:"plugin_id"` //in: body Body struct { // the event id // in: body // required: false EventID string `json:"event_id" validate:"event_id"` // Plug-in CPU weight, default 125 // in: body // required: true PluginCPU int `json:"plugin_cpu" validate:"plugin_cpu|required"` // plug-in maximum memory, default 50 // in: body // required: true PluginMemory int `json:"plugin_memory" validate:"plugin_memory|required"` // plugin cmd, default 50 // in: body // required: false PluginCMD string `json:"plugin_cmd" validate:"plugin_cmd"` // The version number of the plugin // in: body // required: true BuildVersion string `json:"build_version" validate:"build_version|required"` // Plug-in build version number // in: body // required: true DeployVersion string `json:"deploy_version" validate:"deploy_version"` // git address branch information, the default is master // in: body // required: false RepoURL string `json:"repo_url" validate:"repo_url"` // git username // in: body // required: false Username string `json:"username"` // git password // in: body // required: false Password string `json:"password"` // Version information, assist in choosing the plug-in version // in:body // required: true Info string `json:"info" validate:"info"` // Operator // in: body // required: false Operator string `json:"operator" validate:"operator"` //Tenant id // in: body // required: true TenantID string `json:"tenant_id" validate:"tenant_id"` // Mirror address // in: body // required: false BuildImage string `json:"build_image" validate:"build_image"` //ImageInfo ImageInfo struct { HubURL string `json:"hub_url"` HubUser string `json:"hub_user"` HubPassword string `json:"hub_password"` Namespace string `json:"namespace"` IsTrust bool `json:"is_trust,omitempty"` } `json:"ImageInfo" validate:"ImageInfo"` } }
BuildPluginStruct BuildPluginStruct
type BuildServiceStruct ¶
type BuildServiceStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias" validate:"service_alias"` //in: body Body struct { // the event id // in: body // required: false EventID string `json:"event_id" validate:"event_id"` // variable // in: body // required: false ENVS map[string]string `json:"envs" validate:"envs"` // Application build type // in: body // required: true Kind string `json:"kind" validate:"kind|required"` // Follow-up action, one-click deployment based on the value, if the value is not passed, only the build is performed by default // in: body // required: false Action string `json:"action" validate:"action"` // Mirror address // in: body // required: false ImageURL string `json:"image_url" validate:"image_url"` // deployed version number // in: body // required: true DeployVersion string `json:"deploy_version" validate:"deploy_version|required"` // git address // in: body // required: false RepoURL string `json:"repo_url" validate:"repo_url"` // branch branch information // in: body // required: false Branch string `json:"branch" validate:"branch"` // operator // in: body // required: false Lang string `json:"lang" validate:"lang"` // Code server type // in: body // required: false ServerType string `json:"server_type" validate:"server_type"` Runtime string `json:"runtime" validate:"runtime"` ServiceType string `json:"service_type" validate:"service_type"` User string `json:"user" validate:"user"` Password string `json:"password" validate:"password"` Operator string `json:"operator" validate:"operator"` TenantName string `json:"tenant_name"` ServiceAlias string `json:"service_alias"` Cmd string `json:"cmd"` //Used for cloud city code package creation SlugInfo struct { SlugPath string `json:"slug_path"` FTPHost string `json:"ftp_host"` FTPPort string `json:"ftp_port"` FTPUser string `json:"ftp_username"` FTPPassword string `json:"ftp_password"` } `json:"slug_info"` } }
BuildServiceStruct BuildServiceStruct
type BuildSlugInfo ¶
type BuildSlugInfo struct { SlugPath string `json:"slug_path"` FTPHost string `json:"ftp_host"` FTPPort string `json:"ftp_port"` FTPUser string `json:"ftp_username"` FTPPassword string `json:"ftp_password"` }
BuildSlugInfo -
type BuildVersion ¶
type BuildVersion struct { BuildVersion string `json:"build_version"` //only EventID string `json:"event_id"` ServiceID string `json:"service_id"` Kind string `json:"kind"` //kind //DeliveredType app version delivered type //image: this is a docker image //slug: this is a source code tar file DeliveredType string `json:"delivered_type"` //kind DeliveredPath string `json:"delivered_path"` //deliverable path Cmd string `json:"cmd"` //start command RepoURL string `json:"repo_url"` //source image name or source code url CodeBranch string `json:"code_branch"` CodeVersion string `json:"code_version"` CommitMsg string `json:"code_commit_msg"` Author string `json:"code_commit_author"` ImageName string `json:"image_name"` // runtime image name ImageRepo string `json:"image_repo"` ImageDomain string `json:"image_domain"` ImageTag string `json:"image_tag"` //FinalStatus app version status //success: version available //failure: build failure //lost: there is no delivered CreateTime string `json:"create_time"` FinalStatus string `json:"final_status"` FinishTime time.Time `json:"finish_time"` PlanVersion string `json:"plan_version"` }
BuildVersion -
type ByPodName ¶
type ByPodName []*AppPod
ByPodName implements sort.Interface for []*AppPod based on the PodName field.
type ByServiceName ¶
type ByServiceName []*AppService
ByServiceName implements sort.Interface for []*AppService based on the ServiceName field.
func (ByServiceName) Len ¶
func (a ByServiceName) Len() int
func (ByServiceName) Less ¶
func (a ByServiceName) Less(i, j int) bool
func (ByServiceName) Swap ¶
func (a ByServiceName) Swap(i, j int)
type CheckCodeStruct ¶
type CheckCodeStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: body Body struct { // git branch details // in: body // required: true GitURL string `json:"git_url" validate:"git_url|required"` // git address // in: body // required: true URLRepos string `json:"url_repos" validate:"url_repos|required"` // Check type, "first_check" // in: body // required: true CheckType string `json:"check_type" validate:"check_type|required"` // code branch // in: body // required: true CodeVersion string `json:"code_version" validate:"code_version|required"` // git project id, 0 // in: body // required: true GitProjectID int `json:"git_project_id" validate:"git_project_id|required"` // git source, "gitlab_manual" // in: body // required: true CodeFrom string `json:"code_from" validate:"code_from|required"` // tenant id // in: body // required: false TenantID string `json:"tenant_id" validate:"tenant_id"` Action string `json:"action"` // application id // in: body // required: true ServiceID string `json:"service_id"` } }
CheckCodeStruct CheckCodeStruct
type CheckResourceNameReq ¶
CheckResourceNameReq -
type CheckResourceNameResp ¶
type CheckResourceNameResp struct {
Name string `json:"name"`
}
CheckResourceNameResp -
type ClusterResource ¶
type ClusterResource struct { AllNode int `json:"all_node"` NotReadyNode int `json:"notready_node"` ComputeNode int `json:"compute_node"` Tenant int `json:"tenant"` CapCPU int `json:"cap_cpu"` CapMem int `json:"cap_mem"` HealthCapCPU int `json:"health_cap_cpu"` HealthCapMem int `json:"health_cap_mem"` UnhealthCapCPU int `json:"unhealth_cap_cpu"` UnhealthCapMem int `json:"unhealth_cap_mem"` ReqCPU float32 `json:"req_cpu"` ReqMem int `json:"req_mem"` KatoReqMem int `json:"rbd_req_mem"` // Resources to embody kato scheduling KatoReqCPU float32 `json:"rbd_req_cpu"` HealthReqCPU float32 `json:"health_req_cpu"` HealthReqMem int `json:"health_req_mem"` UnhealthReqCPU float32 `json:"unhealth_req_cpu"` UnhealthReqMem int `json:"unhealth_req_mem"` CapDisk uint64 `json:"cap_disk"` ReqDisk uint64 `json:"req_disk"` MaxAllocatableMemoryNodeResource *NodeResource `json:"max_allocatable_memory_node_resource"` }
ClusterResource -
type CommandResponse ¶
type CommandResponse struct { // in: body Body struct { //Parameter verification error message ValidationError url.Values `json:"validation_error,omitempty"` //API error message Msg string `json:"msg,omitempty"` //Single resource entity Bean interface{} `json:"bean,omitempty"` //Resource list List interface{} `json:"list,omitempty"` //Total number of data sets ListAllNumber int `json:"number,omitempty"` //Current page number Page int `json:"page,omitempty"` } }
CommandResponse api unified return structure swagger:response commandResponse
type Component ¶
type Component struct { ComponentBase ComponentBase `json:"component_base"` HTTPRules []AddHTTPRuleStruct `json:"http_rules"` TCPRules []AddTCPRuleStruct `json:"tcp_rules"` HTTPRuleConfigs []HTTPRuleConfig `json:"http_rule_configs"` Monitors []AddServiceMonitorRequestStruct `json:"monitors"` Ports []TenantServicesPort `json:"ports"` Relations []TenantComponentRelation `json:"relations"` Envs []ComponentEnv `json:"envs"` Probes []ServiceProbe `json:"probes"` AppConfigGroupRels []AppConfigGroupRelations `json:"app_config_groups"` Labels []ComponentLabel `json:"labels"` Plugins []ComponentPlugin `json:"plugins"` AutoScaleRule AutoScalerRule `json:"auto_scale_rule"` ConfigFiles []ComponentConfigFile `json:"config_files"` VolumeRelations []VolumeRelation `json:"volume_relations"` Volumes []ComponentVolume `json:"volumes"` Endpoint *Endpoints `json:"endpoint"` }
Component All attributes related to the component
type ComponentBase ¶
type ComponentBase struct { // in: body // required: true ComponentID string `json:"component_id" validate:"required"` // Service name, used for stateful service DNS // in: body // required: false ComponentName string `json:"component_name" validate:"component_name"` // service alias // in: body // required: true ComponentAlias string `json:"component_alias" validate:"required"` // Service description // in: body // required: false Comment string `json:"comment" validate:"comment"` // Mirror name // in: body // required: false ImageName string `json:"image_name" validate:"image_name"` // Container CPU weight // in: body // required: false ContainerCPU int `json:"container_cpu" validate:"container_cpu"` // Maximum memory of the container // in: body // required: false ContainerMemory int `json:"container_memory" validate:"container_memory"` // Container GPU // in: body // required: false ContainerGPU int `json:"container_gpu" validate:"container_gpu"` // Expansion method; 0: stateless; 1: stateful; 2: partition (v5.2 is used for the type of receiving component) // in: body // required: false ExtendMethod string `json:"extend_method" validate:"extend_method"` // number of nodes // in: body // required: false Replicas int `json:"replicas" validate:"replicas"` // Deployment version // in: body // required: false DeployVersion string `json:"deploy_version" validate:"deploy_version"` // Service category: application, cache, store // in: body // required: false Category string `json:"category" validate:"category"` // Latest operation ID // in: body // required: false EventID string `json:"event_id" validate:"event_id"` // Mirror source // in: body // required: false Namespace string `json:"namespace" validate:"namespace"` // Service creation type cloud cloud city service, assistant cloud help service // in: body // required: false ServiceOrigin string `json:"service_origin" validate:"service_origin"` Kind string `json:"kind" validate:"kind|in:internal,third_party"` }
ComponentBase -
func (*ComponentBase) DbModel ¶
func (c *ComponentBase) DbModel(tenantID, appID, deployVersion string) *dbmodel.TenantServices
DbModel return database model
type ComponentBuildReq ¶
type ComponentBuildReq struct { ComponentOpGeneralReq // variable // in: body // required: false BuildENVs map[string]string `json:"envs" validate:"envs"` // Application build type // in: body // required: true Kind string `json:"kind" validate:"kind|required"` // Follow-up action, one-click deployment based on the value, if the value is not passed, only the build is performed by default // in: body // required: false Action string `json:"action" validate:"action"` // Plan Version PlanVersion string `json:"plan_version"` // Deployed version number, The version is generated by the API // in: body DeployVersion string `json:"deploy_version" validate:"deploy_version"` // Build task initiator //in: body Operator string `json:"operator" validate:"operator"` //build form image ImageInfo BuildImageInfo `json:"image_info,omitempty"` //build from code CodeInfo BuildCodeInfo `json:"code_info,omitempty"` //Used for cloud city code package creation SlugInfo BuildSlugInfo `json:"slug_info,omitempty"` //tenantName TenantName string `json:"-"` }
ComponentBuildReq -
func (*ComponentBuildReq) BatchOpFailureItem ¶
func (b *ComponentBuildReq) BatchOpFailureItem() *ComponentOpResult
BatchOpFailureItem -
func (*ComponentBuildReq) GetComponentID ¶
func (b *ComponentBuildReq) GetComponentID() string
GetComponentID -
func (*ComponentBuildReq) TaskBody ¶
func (b *ComponentBuildReq) TaskBody(cpt *dbmodel.TenantServices) interface{}
TaskBody returns a task body.
type ComponentConfigFile ¶
type ComponentConfigFile struct { VolumeName string `json:"volume_name"` FileContent string `json:"file_content"` }
ComponentConfigFile -
func (*ComponentConfigFile) DbModel ¶
func (c *ComponentConfigFile) DbModel(componentID string) *dbmodel.TenantServiceConfigFile
DbModel return database model
type ComponentEnv ¶
type ComponentEnv struct { ContainerPort int `validate:"container_port|numeric_between:1,65535" json:"container_port"` Name string `validate:"name" json:"name"` AttrName string `validate:"attr_name|required" json:"attr_name"` AttrValue string `validate:"attr_value" json:"attr_value"` IsChange bool `validate:"is_change|bool" json:"is_change"` Scope string `validate:"scope|in:outer,inner,both,build" json:"scope"` }
ComponentEnv -
func (*ComponentEnv) DbModel ¶
func (e *ComponentEnv) DbModel(tenantID, componentID string) *dbmodel.TenantServiceEnvVar
DbModel return database model
type ComponentLabel ¶
type ComponentLabel struct { LabelKey string `json:"label_key"` LabelValue string `json:"label_value"` }
ComponentLabel -
func (*ComponentLabel) DbModel ¶
func (l *ComponentLabel) DbModel(componentID string) *dbmodel.TenantServiceLable
DbModel return database model
type ComponentOpGeneralReq ¶
type ComponentOpGeneralReq struct { EventID string `json:"event_id"` ServiceID string `json:"service_id"` Configs map[string]string `json:"configs"` // When determining the startup sequence of services, you need to know the services they depend on DepServiceIDInBootSeq []string `json:"dep_service_ids_in_boot_seq"` }
ComponentOpGeneralReq -
func (*ComponentOpGeneralReq) UpdateConfig ¶
func (b *ComponentOpGeneralReq) UpdateConfig(key, value string)
UpdateConfig -
type ComponentOpReq ¶
type ComponentOpReq interface { GetComponentID() string GetEventID() string TaskBody(component *dbmodel.TenantServices) interface{} BatchOpFailureItem() *ComponentOpResult UpdateConfig(key, value string) OpType() string SetVersion(version string) GetVersion() string }
ComponentOpReq -
type ComponentOpResult ¶
type ComponentOpResult struct { ServiceID string `json:"service_id"` Operation string `json:"operation"` EventID string `json:"event_id"` Status BatchOpResultItemStatus `json:"status"` ErrMsg string `json:"err_message"` DeployVersion string `json:"deploy_version"` }
ComponentOpResult -
func (*ComponentOpResult) Success ¶
func (b *ComponentOpResult) Success()
Success sets the status to success.
type ComponentPlugin ¶
type ComponentPlugin struct { PluginID string `json:"plugin_id"` VersionID string `json:"version_id"` PluginModel string `json:"plugin_model"` ContainerCPU int `json:"container_cpu"` ContainerMemory int `json:"container_memory"` Switch bool `json:"switch"` ConfigEnvs ConfigEnvs `json:"config_envs" validate:"config_envs"` }
ComponentPlugin -
func (*ComponentPlugin) DbModel ¶
func (p *ComponentPlugin) DbModel(componentID string) *dbmodel.TenantServicePluginRelation
DbModel return database model
type ComponentStartReq ¶
type ComponentStartReq struct {
ComponentOpGeneralReq
}
ComponentStartReq -
func (*ComponentStartReq) BatchOpFailureItem ¶
func (s *ComponentStartReq) BatchOpFailureItem() *ComponentOpResult
BatchOpFailureItem -
func (*ComponentStartReq) GetComponentID ¶
func (s *ComponentStartReq) GetComponentID() string
GetComponentID -
func (*ComponentStartReq) TaskBody ¶
func (s *ComponentStartReq) TaskBody(cpt *dbmodel.TenantServices) interface{}
TaskBody -
type ComponentStopReq ¶
type ComponentStopReq struct {
ComponentStartReq
}
ComponentStopReq -
func (*ComponentStopReq) BatchOpFailureItem ¶
func (s *ComponentStopReq) BatchOpFailureItem() *ComponentOpResult
BatchOpFailureItem -
type ComponentUpgradeReq ¶
type ComponentUpgradeReq struct { ComponentOpGeneralReq //UpgradeVersion The target version of the upgrade //If empty, the same version is upgraded UpgradeVersion string `json:"upgrade_version"` }
ComponentUpgradeReq -
func (*ComponentUpgradeReq) BatchOpFailureItem ¶
func (u *ComponentUpgradeReq) BatchOpFailureItem() *ComponentOpResult
BatchOpFailureItem -
func (*ComponentUpgradeReq) GetComponentID ¶
func (u *ComponentUpgradeReq) GetComponentID() string
GetComponentID -
func (*ComponentUpgradeReq) GetEventID ¶
func (u *ComponentUpgradeReq) GetEventID() string
GetEventID -
func (*ComponentUpgradeReq) GetVersion ¶
func (u *ComponentUpgradeReq) GetVersion() string
GetVersion -
func (*ComponentUpgradeReq) SetVersion ¶
func (u *ComponentUpgradeReq) SetVersion(version string)
SetVersion -
func (*ComponentUpgradeReq) TaskBody ¶
func (u *ComponentUpgradeReq) TaskBody(cpt *dbmodel.TenantServices) interface{}
TaskBody returns the task body.
type ComponentVolume ¶
type ComponentVolume struct { Category string `json:"category"` VolumeType string `json:"volume_type"` VolumeName string `json:"volume_name"` HostPath string `json:"host_path"` VolumePath string `json:"volume_path"` IsReadOnly bool `json:"is_read_only"` VolumeCapacity int64 `json:"volume_capacity"` AccessMode string `json:"access_mode"` BackupPolicy string `json:"backup_policy"` ReclaimPolicy string `json:"reclaim_policy"` AllowExpansion bool `json:"allow_expansion"` VolumeProviderName string `json:"volume_provider_name"` Mode *int32 `json:"mode"` }
ComponentVolume -
func (*ComponentVolume) DbModel ¶
func (v *ComponentVolume) DbModel(componentID string) *dbmodel.TenantServiceVolume
DbModel return database model
func (*ComponentVolume) Key ¶
func (v *ComponentVolume) Key(componentID string) string
Key returns the key of ComponentVolume.
type ComposerStruct ¶
type ComposerStruct struct { // in : body Body struct { Lang string `json:"default_runtime" validate:"default_runtime"` Data struct { JSON struct { PlatForm struct { PHP string `json:"php" validate:"php"` } } Packages []string `json:"packages" validate:"packages"` Lock struct { PlatForm struct { PHP string `json:"php" validate:"php"` } } } } }
ComposerStruct ComposerStruct swagger:parameters resolve
type ConfigEnvs ¶
type ConfigEnvs struct { NormalEnvs []*VersionEnv `json:"normal_envs" validate:"normal_envs"` ComplexEnvs *ResourceSpec `json:"complex_envs" validate:"complex_envs"` }
ConfigEnvs Config
type ConfigGroupService ¶
type ConfigGroupService struct { ServiceID string `json:"service_id"` ServiceAlias string `json:"service_alias"` }
ConfigGroupService -
func (ConfigGroupService) DbModel ¶
func (c ConfigGroupService) DbModel(appID, configGroupName string) *dbmodel.ConfigGroupService
DbModel return database model
type ConfigItem ¶
type ConfigItem struct { AppID string `json:"-"` ConfigGroupName string `json:"-"` ItemKey string `json:"item_key" validate:"required,max=255"` ItemValue string `json:"item_value" validate:"required,max=65535"` }
ConfigItem -
func (ConfigItem) DbModel ¶
func (c ConfigItem) DbModel(appID, configGroupName string) *dbmodel.ConfigGroupItem
DbModel return database model
type CreateAppRequest ¶
type CreateAppRequest struct {
AppsInfo []Application `json:"apps_info"`
}
CreateAppRequest -
type CreateAppResponse ¶
type CreateAppResponse struct { AppID int64 `json:"app_id"` RegionAppID string `json:"region_app_id"` }
CreateAppResponse -
type CreatePluginStruct ¶
type CreatePluginStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: body Body struct { //Plugin id //in: body //required: true PluginID string `json:"plugin_id" validate:"plugin_id|required"` //in: body //required: true PluginName string `json:"plugin_name" validate:"plugin_name|required"` //Plugin usage description //in: body //required: false PluginInfo string `json:"plugin_info" validate:"plugin_info"` // Plug-in docker address // in:body // required: false ImageURL string `json:"image_url" validate:"image_url"` //git address //in: body //required: false GitURL string `json:"git_url" validate:"git_url"` //Build mode //in: body //required: false BuildModel string `json:"build_model" validate:"build_model"` //Plugin mode //in: body //required: false PluginModel string `json:"plugin_model" validate:"plugin_model"` //Tenant id //in: body //required: false TenantID string `json:"tenant_id" validate:"tenant_id"` } }
CreatePluginStruct CreatePluginStruct
type CreateServiceStruct ¶
type CreateServiceStruct struct { // in: path // required: true TenantName string `gorm:"column:tenant_name;size:32" json:"tenant_name" validate:"tenant_name"` // in:body Body struct { // tenant id // in: body // required: false TenantID string `gorm:"column:tenant_id;size:32" json:"tenant_id" validate:"tenant_id"` // application id // in: body // required: false ServiceID string `gorm:"column:service_id;size:32" json:"service_id" validate:"service_id"` // Operator // in: body // required: false Operator string `json:"operator" validate:"operator"` // Application label, value // in: body // required: false ServiceLabel string `json:"service_label" validate:"service_label"` // node label, format: v1, v2 // in: body // required: false NodeLabel string `json:"node_label" validate:"node_label"` // Depend on id, format: []struct TenantServiceRelation // in: body // required: false DependIDs []dbmodel.TenantServiceRelation `json:"depend_ids" validate:"depend_ids"` // Persistent directory information, format: []struct TenantServiceVolume // in: body // required: false VolumesInfo []dbmodel.TenantServiceVolume `json:"volumes_info" validate:"volumes_info"` // Environment variable information, format: []struct TenantServiceEnvVar // in: body // required: false EnvsInfo []dbmodel.TenantServiceEnvVar `json:"envs_info" validate:"envs_info"` // Port information, format: []struct TenantServicesPort // in: body // required: false PortsInfo []dbmodel.TenantServicesPort `json:"ports_info" validate:"ports_info"` // service key // in: body // required: false ServiceKey string `gorm:"column:service_key;size:32" json:"service_key" validate:"service_key"` // service alias // in: body // required: true ServiceAlias string `gorm:"column:service_alias;size:30" json:"service_alias" validate:"service_alias"` // Service description // in: body // required: false Comment string `gorm:"column:comment" json:"comment" validate:"comment"` // Service version // in: body // required: false ServiceVersion string `gorm:"column:service_version;size:32" json:"service_version" validate:"service_version"` // Mirror name // in: body // required: false ImageName string `gorm:"column:image_name;size:100" json:"image_name" validate:"image_name"` // Container CPU weight // in: body // required: false ContainerCPU int `gorm:"column:container_cpu;default:500" json:"container_cpu" validate:"container_cpu"` // Maximum memory of the container // in: body // required: false ContainerMemory int `gorm:"column:container_memory;default:128" json:"container_memory" validate:"container_memory"` // Container start command // in: body // required: false ContainerCMD string `gorm:"column:container_cmd;size:2048" json:"container_cmd" validate:"container_cmd"` // Container environment variables // in: body // required: false ContainerEnv string `gorm:"column:container_env;size:255" json:"container_env" validate:"container_env"` // Volume name // in: body // required: false VolumePath string `gorm:"column:volume_path" json:"volume_path" validate:"volume_path"` // Container mount directory // in: body // required: false VolumeMountPath string `gorm:"column:volume_mount_path" json:"volume_mount_path" validate:"volume_mount_path"` // host directory // in: body // required: false HostPath string `gorm:"column:host_path" json:"host_path" validate:"host_path"` // Expansion method; 0: stateless; 1: stateful; 2: partition // in: body // required: false ExtendMethod string `gorm:"column:extend_method;default:'stateless';" json:"extend_method" validate:"extend_method"` // number of nodes // in: body // required: false Replicas int `gorm:"column:replicas;default:1" json:"replicas" validate:"replicas"` // Deployment version // in: body // required: false DeployVersion string `gorm:"column:deploy_version" json:"deploy_version" validate:"deploy_version"` // Service category: application, cache, store // in: body // required: false Category string `gorm:"column:category" json:"category" validate:"category"` // Latest operation ID // in: body // required: false EventID string `gorm:"column:event_id" json:"event_id" validate:"event_id"` // Service type // in: body // required: false ServiceType string `gorm:"column:service_type" json:"service_type" validate:"service_type"` // Mirror source // in: body // required: false Namespace string `gorm:"column:namespace" json:"namespace" validate:"namespace"` // Shared type shared, exclusive // in: body // required: false VolumeType string `gorm:"column:volume_type;default:'shared'" json:"volume_type" validate:"volume_type"` // Port type, one_outer; dif_protocol; multi_outer // in: body // required: false PortType string `gorm:"column:port_type;default:'multi_outer'" json:"port_type" validate:"port_type"` // update time // in: body // required: false UpdateTime time.Time `gorm:"column:update_time" json:"update_time" validate:"update_time"` // Service creation type cloud cloud city service, assistant cloud help service // in: body // required: false ServiceOrigin string `gorm:"column:service_origin;default:'assistant'" json:"service_origin" validate:"service_origin"` // Code source: gitlab,github // in: body // required: false CodeFrom string `gorm:"column:code_from" json:"code_from" validate:"code_from"` } }
CreateServiceStruct serviceCreate struct swagger:parameters createService
type DataLog ¶
type DataLog struct { Status string Data eventdb.MessageDataList }
DataLog - obtain the operation log of the specified operation
type DelEndpiontsReq ¶
type DelEndpiontsReq struct {
EpID string `json:"ep_id" validate:"required|len:32"`
}
DelEndpiontsReq is one of the Endpoints in the request to update the endpints.
type DelRuleConfigReq ¶
type DelRuleConfigReq struct {
ConfigID string `json:"config_id" validate:"config_id|required"`
}
DelRuleConfigReq -
type DelTenantServiceEnvVar ¶
type DelTenantServiceEnvVar struct { Model TenantID string `validate:"tenant_id|between:30,33" json:"tenant_id"` ServiceID string `validate:"service_id|between:30,33" json:"service_id"` ContainerPort int `validate:"container_port|numeric_between:1,65535" json:"container_port"` Name string `validate:"name" json:"name"` AttrName string `validate:"env_name|required" json:"env_name"` AttrValue string `validate:"env_value" json:"env_value"` IsChange bool `validate:"is_change|bool" json:"is_change"` Scope string `validate:"scope|in:outer,inner,both,build" json:"scope"` }
DelTenantServiceEnvVar application environment variables
type DeleteDefineSourcesStruct ¶
type DeleteDefineSourcesStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true SourceAlias string `json:"source_alias" validate:"source_alias"` // in: path // required: true EnvName string `json:"env_name" validate:"env_name"` }
DeleteDefineSourcesStruct DeleteDefineSourcesStruct
type DeleteENVstruct ¶
type DeleteENVstruct struct { // Tenant name // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name|required"` // plugin id // in: path // required: true PluginID string `json:"plugin_id" validate:"plugin_id|required"` // build version // in: path // required; true VersionID string `json:"version_id" validate:"version_id|required"` //Configuration item name //in: path //required: true ENVName string `json:"env_name" validate:"env_name|required"` }
DeleteENVstruct DeleteENVstruct
type DeleteHTTPRuleStruct ¶
type DeleteHTTPRuleStruct struct {
HTTPRuleID string `json:"http_rule_id" validate:"http_rule_id|required"`
}
DeleteHTTPRuleStruct contains the id of http rule that will be deleted
type DeletePluginSetStruct ¶
type DeletePluginSetStruct struct { //in: path //required: true TenantName string `json:"tenant_name"` //in: path //required: true ServiceAlias string `json:"service_alias"` //Plugin id //in: path //required: true PluginID string `json:"plugin_id"` }
DeletePluginSetStruct DeletePluginSetStruct
type DeletePluginStruct ¶
type DeletePluginStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name|required"` // in: path // required: true PluginID string `json:"plugin_id" validate:"plugin_id|required"` }
DeletePluginStruct deletePluginStruct
type DeleteProbeStruct ¶
type DeleteProbeStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Probe id // in: body // required: true ProbeID string `json:"probe_id"` } }
DeleteProbeStruct DeleteProbeStruct
type DeleteServicePort ¶
type DeleteServicePort struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // container port // in: path // required: true Port int `json:"port"` }
DeleteServicePort service port swagger:parameters deletePort
type DeleteTCPRuleStruct ¶
type DeleteTCPRuleStruct struct {
TCPRuleID string `json:"tcp_rule_id" validate:"tcp_rule_id|required"`
}
DeleteTCPRuleStruct is used to delete tcp rule and rule extensions
type DeleteVolumeDependencyStruct ¶
type DeleteVolumeDependencyStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Dependent service id // in: body // required: true DependServiceID string `json:"depend_service_id" validate:"depend_service_id|required|max:32"` // Depend on storage name // in: body // required: true VolumeName string `json:"volume_name" validate:"volume_name|required|max:50"` } }
DeleteVolumeDependencyStruct DeleteVolumeDependencyStruct
type DeleteVolumeStruct ¶
type DeleteVolumeStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // storage name // in: path // required: true VolumeName string `json:"volume_name"` }
DeleteVolumeStruct DeleteVolumeStruct
type DependService ¶
type DependService struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` DepServiceID string `json:"dep_service_id"` DepServiceType string `json:"dep_service_type"` Action string `json:"action"` }
DependService struct for depend service
type ENVStruct ¶
type ENVStruct struct { // Tenant name // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // plugin id // in: path // required: true PluginID string `json:"plugin_id" validate:"plugin_id"` // build version // in: path // required; true VersionID string `json:"version_id" validate:"version_id"` //in : body Body struct { //in: body //required: true EVNInfo []*PluginDefaultENV } }
ENVStruct ENVStruct
type EndpointKubernetes ¶
type EndpointKubernetes struct { Namespace string `json:"namespace"` ServiceName string `json:"serviceName"` }
EndpointKubernetes -
type Endpoints ¶
type Endpoints struct { Static []string `json:"static" validate:"static"` Kubernetes *EndpointKubernetes `json:" kubernetes "validate:" kubernetes "` }
Endpoints holds third-party service endpoints or configuraion to get endpoints.
type EtcdCleanReq ¶
type EtcdCleanReq struct {
Keys []string `json:"etcd_keys"`
}
EtcdCleanReq etcd clean request struct
type ExportAppStruct ¶
type ExportAppStruct struct { SourceDir string `json:"source_dir"` Body struct { EventID string `json:"event_id"` GroupKey string `json:"group_key"` // TODO consider removing Version string `json:"version"` // TODO consider removing Format string `json:"format"` // only kato-app/docker-compose GroupMetadata string `json:"group_metadata"` } }
ExportAppStruct -
type GetNetDownStreamRuleStruct ¶
type GetNetDownStreamRuleStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias" validate:"service_alias"` // in: path // required: true DestServiceAlias string `json:"dest_service_alias" validate:"dest_service_alias"` // in: path // required: true Port int `json:"port" validate:"port|numeric_between:1,65535"` }
GetNetDownStreamRuleStruct GetNetDownStreamRuleStruct
type GetPluginEnvStruct ¶
type GetPluginEnvStruct struct { //Tenant name //in: path //required: true TenantName string `json:"tenant_name"` // plugin id // in: path // required: true PluginID string `json:"plugin_id"` // Build version id // in: path // required: true VersionID string `json:"version_id"` }
GetPluginEnvStruct GetPluginEnvStruct
type GetPluginSetStruct ¶
type GetPluginSetStruct struct { //in: path //required: true TenantName string `json:"tenant_name"` //in: path //required: true ServiceAlias string `json:"service_alias"` }
GetPluginSetStruct GetPluginSetStruct
type GetPluginsStruct ¶
type GetPluginsStruct struct { //in: path //required: true TenantName string `json:"tenant_name"` }
GetPluginsStruct GetPluginsStruct
type GetServiceCheckInfoStruct ¶
type GetServiceCheckInfoStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true UUID string `json:"uuid"` }
GetServiceCheckInfoStruct to obtain application detection information
type GetSingleServiceInfoStruct ¶
type GetSingleServiceInfoStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` }
GetSingleServiceInfoStruct GetSingleServiceInfoStruct
type GetSupportProtocols ¶
type GetSupportProtocols struct { // in: path // required: true TenantName string `json:"tenant_name"` }
GetSupportProtocols GetSupportProtocols swagger:parameters getSupportProtocols
type GetTokenInfo ¶
type GetTokenInfo struct { // in: path // required: true EID string `json:"eid" validate:"eid|required"` }
GetTokenInfo
type GetUserToken ¶
type GetUserToken struct { // in: body Body struct { // eid // in: body // required: true EID string `json:"eid" validate:"eid|required"` // Controllable range:all_power|node_manager|server_source // in: body // required: false Range string `json:"range" validate:"range"` // valid period // in: body // required: true ValidityPeriod int `json:"validity_period" validate:"validity_period|required"` //1549812345 // data center identification // in: body // required: false RegionTag string `json:"region_tag" validate:"region_tag"` BeforeTime int `json:"before_time"` } }
GetUserToken
type GetVersionEnvStruct ¶
type GetVersionEnvStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // plugin id // in: path // required: true PluginID string `json:"plugin_id"` }
GetVersionEnvStruct GetVersionEnvStruct
type HTTPRuleConfig ¶
type HTTPRuleConfig struct { RuleID string `json:"rule_id,omitempty" validate:"rule_id|required"` ProxyConnectTimeout int `json:"proxy_connect_timeout,omitempty" validate:"proxy_connect_timeout|required"` ProxySendTimeout int `json:"proxy_send_timeout,omitempty" validate:"proxy_send_timeout|required"` ProxyReadTimeout int `json:"proxy_read_timeout,omitempty" validate:"proxy_read_timeout|required"` ProxyBodySize int `json:"proxy_body_size,omitempty" validate:"proxy_body_size|required"` SetHeaders []*SetHeader `json:"set_headers,omitempty" ` Rewrites []*Rewrite `json:"rewrite,omitempty"` ProxyBufferSize int `json:"proxy_buffer_size,omitempty" validate:"proxy_buffer_size|numeric_between:1,65535"` ProxyBufferNumbers int `json:"proxy_buffer_numbers,omitempty" validate:"proxy_buffer_size|numeric_between:1,65535"` ProxyBuffering string `json:"proxy_buffering,omitempty" validate:"proxy_buffering|required"` }
HTTPRuleConfig -
func (*HTTPRuleConfig) DbModel ¶
func (h *HTTPRuleConfig) DbModel() []*dbmodel.GwRuleConfig
DbModel return database model
type HeaderRules ¶
HeaderRules HeaderRules
type HelmAppRelease ¶
type HelmAppRelease struct { Revision int `json:"revision"` Updated string `json:"updated"` Status string `json:"status"` Chart string `json:"chart"` AppVersion string `json:"app_version"` Description string `json:"description"` }
HelmAppRelease -
type HistoryLogFile ¶
type HistoryLogFile struct { Filename string `json:"filename"` RelativePath string `json:"relative_path"` }
HistoryLogFile represents a history log file for service
type HorizontalServiceStruct ¶
type HorizontalServiceStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` //in: body Body struct { // the event id // in: body // required: false EventID string `json:"event_id"` // Number of scaling // in: body // required: false NodeNUM int `json:"node_num"` } }
HorizontalServiceStruct HorizontalServiceStruct
type ImportAppStruct ¶
type ImportAppStruct struct { EventID string `json:"event_id"` SourceDir string `json:"source_dir"` Apps []string `json:"apps"` Format string `json:"format"` ServiceImage ServiceImage `json:"service_image"` ServiceSlug ServiceSlug `json:"service_slug"` }
ImportAppStruct -
type InstallAppReq ¶
type InstallAppReq struct {
Overrides []string `json:"overrides"`
}
InstallAppReq -
type Item ¶
type Item struct { Key string `json:"key" validate:"key"` Value interface{} `json:"value" validate:"value"` }
Item source value, key-value pair form
type LabelStruct ¶
type LabelStruct struct { LabelKey string `json:"label_key" validate:"label_key|required"` LabelValue string `json:"label_value" validate:"label_value|required"` }
LabelStruct holds info for adding, updating or deleting label
type Labels ¶
type Labels struct { // in: path // required: true NodeID string `json:"node"` // in: body Body struct { // label value list // in: body // required: true Labels []string `json:"labels"` } }
Labels LabelsStruct
type LabelsStruct ¶
type LabelsStruct struct {
Labels []LabelStruct `json:"labels"`
}
LabelsStruct blabla
type LanguageSet ¶
LanguageSet set language
type LastLinesStruct ¶
type LastLinesStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias" validate:"service_alias"` // in: body Body struct { // rows // in: body // required: true Lines int `json:"lines" validate:"lines"` } }
LastLinesStruct LastLinesStruct
type LicenseInfo ¶
type LicenseInfo struct { Code string `json:"code"` Company string `json:"company"` Node int `json:"node"` CPU int `json:"cpu"` MEM int `json:"memory"` Tenant int `json:"tenant"` EndTime string `json:"end_time"` StartTime string `json:"start_time"` DataCenter int `json:"data_center"` ModuleList []string `json:"module_list"` }
LicenseInfo license info
type ListAppResponse ¶
type ListAppResponse struct { Page int `json:"page"` PageSize int `json:"pageSize"` Total int64 `json:"total"` Apps []*dbmodel.Application `json:"apps"` }
ListAppResponse -
type ListApplicationConfigGroupResp ¶
type ListApplicationConfigGroupResp struct { ConfigGroup []ApplicationConfigGroupResp `json:"config_group"` Total int64 `json:"total"` Page int `json:"page"` PageSize int `json:"pageSize"` }
ListApplicationConfigGroupResp -
type ListServiceResponse ¶
type ListServiceResponse struct { Page int `json:"page"` PageSize int `json:"pageSize"` Total int64 `json:"total"` Services []*dbmodel.TenantServices `json:"services"` }
ListServiceResponse -
type LogByLevelStruct ¶
type LogByLevelStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias" validate:"service_alias"` // in: body Body struct { // log level - info/debug/error // in: body // required: true Level string `json:"level" validate:"level|required"` // eventID // in: body // required: true EventID string `json:"event_id" validate:"event_id|required"` } }
LogByLevelStruct GetLogByLevelStruct
type LogFileStruct ¶
type LogFileStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias" validate:"service_alias"` // in: path // required: true FileName string `json:"file_name" validate:"file_name"` }
LogFileStruct LogFileStruct
type LogSocketStruct ¶
type LogSocketStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias" validate:"service_alias"` }
LogSocketStruct LogSocketStruct
type Login ¶
type Login struct { // in: body Body struct { // ip: port // in: body // required: true HostPort string `json:"hostport"` // Login type // in: body // required: true LoginType bool `json:"type"` // node type // in: body // required: true HostType string `json:"hosttype"` // root password // in: body // required: false RootPwd string `json:"pwd,omitempty"` } }
Login SSHLoginStruct
type MQBody ¶
type MQBody struct { EventID string `json:"event_id"` GroupKey string `json:"group_key"` Version string `json:"version"` Format string `json:"format"` // only kato-app/docker-compose SourceDir string `json:"source_dir"` }
MQBody -
type MessageData ¶
type MessageData struct { Message string `json:"message"` Time string `json:"time"` Unixtime int64 `json:"utime"` }
MessageData message data - obtain the operation log of the specified operation
type MontiorData ¶
type MontiorData struct { //in: body Body struct { // in: body // required: true Start string `json:"start" validate:"start"` // in: body // required: true Queries string `json:"queries" validate:"queries"` } }
MontiorData opentsdb data swagger:parameters oentsdbquery
type MsgStruct ¶
type MsgStruct struct { EventID string `json:"event_id"` Step string `json:"step"` Message string `json:"message"` Level string `json:"level"` Time string `json:"time"` }
MsgStruct msg struct in eventlog_message
type NetDownStreamRules ¶
type NetDownStreamRules struct { //current limit - max_connections Limit int `json:"limit" validate:"limit|numeric_between:0,1024"` MaxPendingRequests int `json:"max_pending_requests"` MaxRequests int `json:"max_requests"` MaxRetries int `json:"max_retries"` //request header //in: body //required: false Header []HeaderRules `json:"header" validate:"header"` //domain forwarding //in: body //required: false Domain []string `json:"domain" validate:"domain"` //path rule //in: body //required: false Prefix string `json:"prefix" validate:"prefix"` ServiceAlias string `json:"service_alias"` ServiceID string `json:"service_id" validate:"service_id"` }
NetDownStreamRules
type NetRulesDownStreamBody ¶
type NetRulesDownStreamBody struct { DestService string `json:"dest_service"` DestServiceAlias string `json:"dest_service_alias"` Port int `json:"port"` Protocol string `json:"protocol"` Rules *NetDownStreamRules `json:"rules"` }
NetRulesDownStreamBody
type NetUpStreamRules ¶
type NetUpStreamRules struct { NetDownStreamRules SourcePort int32 `json:"source_port"` MapPort int32 `json:"map_port"` }
NetUpStreamRules NetUpStreamRules
type NodeResource ¶
type NodeResource struct { MilliCPU int64 `json:"milli_cpu"` Memory int64 `json:"memory"` NvidiaGPU int64 `json:"nvidia_gpu"` EphemeralStorage int64 `json:"ephemeral_storage"` // We store allowedPodNumber (which is Node.Status.Allocatable.Pods().Value()) // explicitly as int, to avoid conversions and improve performance. AllowedPodNumber int `json:"allowed_pod_number"` }
NodeResource is a collection of compute resource.
func NewResource ¶
func NewResource(rl corev1.ResourceList) *NodeResource
NewResource creates a Resource from ResourceList
func (*NodeResource) Add ¶
func (r *NodeResource) Add(rl corev1.ResourceList)
Add adds ResourceList into Resource.
type PagedTenantResList ¶
type PagedTenantResList struct { List []*TenantResource `json:"list"` Length int `json:"length"` }
PagedTenantResList PagedTenantResList
type ParseAppServicesReq ¶
type ParseAppServicesReq struct {
Values string `json:"values"`
}
ParseAppServicesReq -
type Plugin ¶
type Plugin struct { PluginID string `json:"plugin_id" validate:"plugin_id|required"` PluginName string `json:"plugin_name" validate:"plugin_name|required"` PluginInfo string `json:"plugin_info" validate:"plugin_info"` ImageURL string `json:"image_url" validate:"image_url"` GitURL string `json:"git_url" validate:"git_url"` BuildModel string `json:"build_model" validate:"build_model"` PluginModel string `json:"plugin_model" validate:"plugin_model"` TenantID string `json:"tenant_id" validate:"tenant_id"` }
Plugin -
type PluginBuildVersionStruct ¶
type PluginBuildVersionStruct struct { //in: path //required: true TenantName string `json:"tenant_name" validate:"tenant_name"` //in: path //required: true PluginID string `json:"plugin_id" validate:"plugin_id"` //in: path //required: true VersionID string `json:"version_id" validate:"version_id"` }
PluginBuildVersionStruct PluginBuildVersionStruct
type PluginDefaultENV ¶
type PluginDefaultENV struct { //Corresponding plug-in id //in: body //required: true PluginID string `json:"plugin_id" validate:"plugin_id"` //Build version id //in: body //required: true VersionID string `json:"version_id" validate:"version_id"` //Configuration item name //in: body //required: true ENVName string `json:"env_name" validate:"env_name"` //Configuration item value //in: body //required: true ENVValue string `json:"env_value" validate:"env_value"` //Can be modified by the user //in :body //required: false IsChange bool `json:"is_change" validate:"is_change|bool"` }
PluginDefaultENV plugin default environment variable
type PluginSetStruct ¶
type PluginSetStruct struct { //in: path //required: true TenantName string `json:"tenant_name"` //in: path //required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { //plugin id //in: body //required: true PluginID string `json:"plugin_id" validate:"plugin_id"` // plugin version //in: body //required: true VersionID string `json:"version_id" validate:"version_id"` // plugin is uesd //in: body //required: false Switch bool `json:"switch" validate:"switch|bool"` // plugin cpu size default 125 // in: body // required: false PluginCPU int `json:"plugin_cpu" validate:"plugin_cpu"` // plugin memory size default 64 // in: body // required: false PluginMemory int `json:"plugin_memory" validate:"plugin_memory"` // app plugin config // in: body // required: true ConfigEnvs ConfigEnvs `json:"config_envs" validate:"config_envs"` } }
PluginSetStruct PluginSetStruct
type PluginVersionEnv ¶
type PluginVersionEnv struct { EnvName string `json:"env_name" validate:"env_name"` EnvValue string `json:"env_value" validate:"env_value"` }
PluginVersionEnv -
func (*PluginVersionEnv) DbModel ¶
func (p *PluginVersionEnv) DbModel(componentID, pluginID string) *dbmodel.TenantPluginVersionEnv
DbModel return database model
type PodContainer ¶
type PodContainer struct { Image string `json:"image,omitempty"` State string `json:"state,omitempty"` Reason string `json:"reason,omitempty"` Started string `json:"started,omitempty"` LimitMemory string `json:"limit_memory,omitempty"` LimitCPU string `json:"limit_cpu,omitempty"` }
PodContainer -
type PodDetail ¶
type PodDetail struct { Name string `json:"name,omitempty"` Node string `json:"node,omitempty"` StartTime string `json:"start_time,omitempty"` Status *PodStatus `json:"status,omitempty"` IP string `json:"ip,omitempty"` InitContainers []*PodContainer `json:"init_containers,omitempty"` Containers []*PodContainer `json:"containers,omitempty"` Events []*PodEvent `json:"events,omitempty"` }
PodDetail -
type PodEvent ¶
type PodEvent struct { Type string `json:"type,omitempty"` Reason string `json:"reason,omitempty"` Age string `json:"age,omitempty"` Message string `json:"message,omitempty"` }
PodEvent -
type PodStatus ¶
type PodStatus struct { Type int `json:"type,omitempty"` TypeStr string `json:"type_str,omitempty"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` Advice string `json:"advice,omitempty"` }
PodStatus -
type PodsList ¶
type PodsList struct { PodIP string `json:"pod_ip"` Phase string `json:"phase"` PodName string `json:"pod_name"` NodeName string `json:"node_name"` }
PodsList pod list
type PodsStructStruct ¶
type PodsStructStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` }
PodsStructStruct PodsStructStruct
type ResourceSpec ¶
type ResourceSpec struct { BasePorts []*BasePort `json:"base_ports"` BaseServices []*BaseService `json:"base_services"` BaseNormal BaseEnv `json:"base_normal"` }
ResourceSpec - resource structure
type RestoreDep ¶
type RestoreDep struct { DepServiceID string `validata:"dep_service_id|required" json:"dep_service_id"` DepServiceType string `validata:"dep_service_type|required" json:"dep_service_type"` }
RestoreDep holds infomations of service dependency.
type RestoreDepVol ¶
type RestoreDepVol struct { DepServiceID string `json:"dep_service_id" validate:"dep_service_id|required"` VolumePath string `json:"volume_path" validate:"volume_path|required|regex:^/"` VolumeName string `json:"volume_name" validate:"volume_name|required|max:50"` }
RestoreDepVol holds information of service dependent volume.
type RestoreDepVolsReq ¶
type RestoreDepVolsReq struct {
DepVols []*RestoreDepVol `validate:"dep_vols|required" json:"dep_vols"`
}
RestoreDepVolsReq defines a struct to receive the request body to restore service dependent volumes.
type RestoreDepsReq ¶
type RestoreDepsReq struct {
Deps []*RestoreDep `validate:"deps|required" json:"deps"`
}
RestoreDepsReq defines a struct to receive the request body to restore service dependencies.
type RestoreEnv ¶
type RestoreEnv struct { ContainerPort int `validate:"container_port|numeric_between:1,65535" json:"container_port"` Name string `validate:"name" json:"name"` AttrName string `validate:"env_name|required" json:"env_name"` AttrValue string `validate:"env_value|required" json:"env_value"` IsChange bool `validate:"is_change|bool" json:"is_change"` Scope string `validate:"scope|in:outer,inner,both,build" json:"scope"` }
RestoreEnv holds infomations of every enviroment variables.
type RestoreEnvsReq ¶
type RestoreEnvsReq struct { Scope string `validate:"scope|required|in:outer,inner,both,build"` Envs []*RestoreEnv `validate:"envs|required" json:"envs"` }
RestoreEnvsReq defines a struct to receive the request body to restore enviroment variables
type RestorePlugin ¶
type RestorePlugin struct { PluginID string `json:"plugin_id" validate:"plugin_id"` VersionID string `json:"version_id" validate:"version_id"` Switch bool `json:"switch" validate:"switch|bool"` }
RestorePlugin holds infomations of service dependenct volume.
type RestorePluginsReq ¶
type RestorePluginsReq struct {
Plugins []*RestorePlugin `validate:"plugins|required" json:"plugins"`
}
RestorePluginsReq defines a struct to receive the request body to restore service dependent volumes.
type RestorePort ¶
type RestorePort struct { ContainerPort int `gorm:"column:container_port" validate:"container_port|required|numeric_between:1,65535" json:"container_port"` MappingPort int `gorm:"column:mapping_port" validate:"mapping_port|required|numeric_between:1,65535" json:"mapping_port"` Protocol string `gorm:"column:protocol" validate:"protocol|required|in:http,https,stream,grpc" json:"protocol"` PortAlias string `gorm:"column:port_alias" validate:"port_alias|required|alpha_dash" json:"port_alias"` IsInnerService bool `gorm:"column:is_inner_service" validate:"is_inner_service|bool" json:"is_inner_service"` IsOuterService bool `gorm:"column:is_outer_service" validate:"is_outer_service|bool" json:"is_outer_service"` }
RestorePort holds information of port.
type RestorePortsReq ¶
type RestorePortsReq struct {
Ports []*RestorePort `validate:"ports|required" json:"ports"`
}
RestorePortsReq defines a struct to receive the request body to restore service ports
type RestoreVolume ¶
type RestoreVolume struct { Category string `json:"category"` VolumeName string `json:"volume_name" validate:"volume_name|required|max:50"` VolumePath string `json:"volume_path" validate:"volume_path|required|regex:^/"` VolumeType string `json:"volume_type" validate:"volume_type|required|in:share-file,config-file"` FileContent string `json:"file_content"` HostPath string `json:"host_path"` IsReadOnly bool `json:"is_read_only"` }
RestoreVolume holds infomations of port.
type RestoreVolumesReq ¶
type RestoreVolumesReq struct {
Volumes []*RestoreVolume `validate:"volumes|required" json:"volumes"`
}
RestoreVolumesReq defines a struct to receive the request body to restore service volumes
type Rewrite ¶
type Rewrite struct { Regex string `json:"regex"` Replacement string `json:"replacement"` Flag string `json:"flag" validate:"flag|in:last,break,redirect,permanent"` }
Rewrite is a embeded sturct of Body.
type RollBackStruct ¶
type RollBackStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // event_id // in: body // required: false EventID string `json:"event_id"` // The version number to roll back to // in: body // required: true DeployVersion string `json:"deploy_version"` // Operator // in: body // required: false Operator string `json:"operator"` } }
RollBackStruct RollBackStruct
type RollbackInfoRequestStruct ¶
type RollbackInfoRequestStruct struct { //RollBackVersion The target version of the rollback RollBackVersion string `json:"upgrade_version"` //Event trace ID EventID string `json:"event_id"` ServiceID string `json:"service_id"` Configs map[string]string `json:"configs"` }
RollbackInfoRequestStruct -
type RollbackStruct ¶
type RollbackStruct struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` EventID string `json:"event_id;default:system"` Operator string `json:"operator"` DeployVersion string `json:"deploy_version"` }
RollbackStruct struct
type RuleConfigReq ¶
type RuleConfigReq struct { RuleID string `json:"rule_id,omitempty" validate:"rule_id|required"` ServiceID string EventID string Body Body `json:"body" validate:"body|required"` }
RuleConfigReq -
type RuleExtensionStruct ¶
RuleExtensionStruct represents rule extensions for http rule or tcp rule
type RuleMetric ¶
type RuleMetric struct { MetricsType string `json:"metric_type"` MetricsName string `json:"metric_name"` MetricTargetType string `json:"metric_target_type"` MetricTargetValue int `json:"metric_target_value"` }
RuleMetric -
func (RuleMetric) DbModel ¶
func (r RuleMetric) DbModel(ruleID string) *dbmodel.TenantServiceAutoscalerRuleMetrics
DbModel return database model
type ServiceCheckStruct ¶
type ServiceCheckStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: body Body struct { //uuid // in: body CheckUUID string `json:"uuid"` //Detection source type // in: body // required: true SourceType string `json:"source_type" validate:"source_type|required|in:docker-run,docker-compose,sourcecode,third-party-service"` CheckOS string `json:"check_os"` // Definition of detection source, // Code: https://github.com/gridworkz/kato.git master // docker-run: docker run --name xxx nginx:latest nginx // docker-compose: compose full text // in: body // required: true SourceBody string `json:"source_body"` TenantID string Username string `json:"username"` Password string `json:"password"` EventID string `json:"event_id"` } }
ServiceCheckStruct application detection, support source code detection, mirror detection, dockerrun detection
type ServiceGetCommon ¶
type ServiceGetCommon struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` }
ServiceGetCommon path parameter
type ServiceImage ¶
type ServiceImage struct { HubURL string `json:"hub_url"` HubUser string `json:"hub_user"` HubPassword string `json:"hub_password"` NameSpace string `json:"namespace"` }
ServiceImage -
type ServiceLBPortChange ¶
type ServiceLBPortChange struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: path // required: true Port int `json:"port"` //in: body Body struct { // in: body // required: true ChangePort int `json:"change_port" validate:"change_port|required"` } }
ServiceLBPortChange change lb port swagger:parameters changelbport
type ServicePortInnerOrOuter ¶
type ServicePortInnerOrOuter struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: path // required: true Port int `json:"port"` //in: body Body struct { // Operation value `close` or `open` // in: body // required: true Operation string `json:"operation" validate:"operation|required|in:open,close"` IfCreateExPort bool `json:"if_create_ex_port"` } }
ServicePortInnerOrOuter service port swagger:parameters PortInnerController PortOuterController
type ServicePorts ¶
type ServicePorts struct {
Port []*TenantServicesPort
}
ServicePorts service ports
type ServiceProbe ¶
type ServiceProbe struct { Model ServiceID string `gorm:"column:service_id;size:32" json:"service_id" validate:"service_id|between:30,33"` ProbeID string `gorm:"column:probe_id;size:32" json:"probe_id" validate:"probe_id|required|between:30,33"` Mode string `gorm:"column:mode;default:'liveness'" json:"mode" validate:"mode"` Scheme string `gorm:"column:scheme;default:'scheme'" json:"scheme" validate:"scheme"` Path string `gorm:"column:path" json:"path" validate:"path"` Port int `gorm:"column:port;size:5;default:80" json:"port" validate:"port|numeric_between:1,65535"` Cmd string `gorm:"column:cmd;size:150" json:"cmd" validate:"cmd"` //http request header, key=value,key2=value2 HTTPHeader string `gorm:"column:http_header;size:300" json:"http_header" validate:"http_header"` //Initialize waiting time InitialDelaySecond int `gorm:"column:initial_delay_second;size:2;default:1" json:"initial_delay_second" validate:"initial_delay_second"` //Detection interval time PeriodSecond int `gorm:"column:period_second;size:2;default:3" json:"period_second" validate:"period_second"` //Detection timeout TimeoutSecond int `gorm:"column:timeout_second;size:3;default:30" json:"timeout_second" validate:"timeout_second"` //Whether to enable IsUsed int `gorm:"column:is_used;size:1;default:0" json:"is_used" validate:"is_used|in:0,1"` //The number of detections marked as failed FailureThreshold int `gorm:"column:failure_threshold;size:2;default:3" json:"failure_threshold" validate:"failure_threshold"` //The number of successful detections marked SuccessThreshold int `gorm:"column:success_threshold;size:2;default:1" json:"success_threshold" validate:"success_threshold"` FailureAction string `json:"failure_action" validate:"failure_action"` }
ServiceProbe application probe information
func (*ServiceProbe) DbModel ¶
func (p *ServiceProbe) DbModel(componentID string) *dbmodel.TenantServiceProbe
DbModel return database model
type ServiceShare ¶
type ServiceShare struct { // required: true TenantName string `json:"tenant_name"` // required: true ServiceAlias string `json:"service_alias"` Body struct { //in: body //App share Key ServiceKey string `json:"service_key" validate:"service_key|required"` AppVersion string `json:"app_version" validate:"app_version|required"` EventID string `json:"event_id"` ShareUser string `json:"share_user"` ShareScope string `json:"share_scope"` ImageInfo struct { HubURL string `json:"hub_url"` HubUser string `json:"hub_user"` HubPassword string `json:"hub_password"` Namespace string `json:"namespace"` IsTrust bool `json:"is_trust,omitempty" validate:"is_trust"` } `json:"image_info,omitempty"` SlugInfo struct { Namespace string `json:"namespace"` FTPHost string `json:"ftp_host"` FTPPort string `json:"ftp_port"` FTPUser string `json:"ftp_username"` FTPPassword string `json:"ftp_password"` } `json:"slug_info,omitempty"` } }
ServiceShare service share swagger:parameters shareService
type ServiceSlug ¶
type ServiceSlug struct { FtpHost string `json:"ftp_host"` FtpPort string `json:"ftp_port"` FtpUsername string `json:"ftp_username"` FtpPassword string `json:"ftp_password"` NameSpace string `json:"namespace"` }
ServiceSlug -
type ServiceStruct ¶
type ServiceStruct struct { TenantID string `json:"tenant_id" validate:"tenant_id"` // in: path // required: true ServiceID string `json:"service_id" validate:"service_id"` // Service name, used for stateful service DNS // in: body // required: false ServiceName string `json:"service_name" validate:"service_name"` // service alias // in: body // required: true ServiceAlias string `json:"service_alias" validate:"service_alias"` // Component type // in: body // required: true ServiceType string `json:"service_type" validate:"service_type"` // Service description // in: body // required: false Comment string `json:"comment" validate:"comment"` // Service version // in: body // required: false ServiceVersion string `json:"service_version" validate:"service_version"` // Mirror name // in: body // required: false ImageName string `json:"image_name" validate:"image_name"` // Container CPU weight // in: body // required: false ContainerCPU int `json:"container_cpu" validate:"container_cpu"` // Maximum memory of the container // in: body // required: false ContainerMemory int `json:"container_memory" validate:"container_memory"` // component gpu video memory // in: body // required: false ContainerGPU int `json:"container_gpu" validate:"container_gpu"` // Container start command // in: body // required: false ContainerCMD string `json:"container_cmd" validate:"container_cmd"` // Container environment variables // in: body // required: false ContainerEnv string `json:"container_env" validate:"container_env"` // Expansion method; 0: stateless; 1: stateful; 2: partition (v5.2 is used for the type of receiving component) // in: body // required: false ExtendMethod string `json:"extend_method" validate:"extend_method"` // number of nodes // in: body // required: false Replicas int `json:"replicas" validate:"replicas"` // Deployment version // in: body // required: false DeployVersion string `json:"deploy_version" validate:"deploy_version"` // Service category: application, cache, store // in: body // required: false Category string `json:"category" validate:"category"` // Current status of the service: undeploy,running,closed,unusual,starting,checking,stoping // in: body // required: false CurStatus string `json:"cur_status" validate:"cur_status"` // Latest operation ID // in: body // required: false EventID string `json:"event_id" validate:"event_id"` // Mirror source // in: body // required: false Namespace string `json:"namespace" validate:"namespace"` // update time // in: body // required: false UpdateTime time.Time `json:"update_time" validate:"update_time"` // Service creation type cloud cloud city service, assistant cloud help service // in: body // required: false ServiceOrigin string `json:"service_origin" validate:"service_origin"` Kind string `json:"kind" validate:"kind|in:internal,third_party"` EtcdKey string `json:"etcd_key" validate:"etcd_key"` //OSType runtime os type // in: body // required: false OSType string `json:"os_type" validate:"os_type|in:windows,linux"` ServiceLabel string `json:"service_label" validate:"service_label|in:StatelessServiceType,StatefulServiceType"` NodeLabel string `json:"node_label" validate:"node_label"` Operator string `json:"operator" validate:"operator"` RepoURL string `json:"repo_url" validate:"repo_url"` DependIDs []dbmodel.TenantServiceRelation `json:"depend_ids" validate:"depend_ids"` VolumesInfo []TenantServiceVolumeStruct `json:"volumes_info" validate:"volumes_info"` DepVolumesInfo []dbmodel.TenantServiceMountRelation `json:"dep_volumes_info" validate:"dep_volumes_info"` EnvsInfo []dbmodel.TenantServiceEnvVar `json:"envs_info" validate:"envs_info"` PortsInfo []dbmodel.TenantServicesPort `json:"ports_info" validate:"ports_info"` Endpoints *Endpoints `json:"endpoints" validate:"endpoints"` AppID string `json:"app_id" validate:"required"` ComponentProbes []ServiceProbe `json:"component_probes" validate:"component_probes"` ComponentMonitors []AddServiceMonitorRequestStruct `json:"component_monitors" validate:"component_monitors"` HTTPRules []AddHTTPRuleStruct `json:"http_rules" validate:"http_rules"` TCPRules []AddTCPRuleStruct `json:"tcp_rules" validate:"tcp_rules"` }
ServiceStruct service struct
type ServicesInfoStruct ¶
type ServicesInfoStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` }
ServicesInfoStruct ServicesInfoStruct swagger:parameters getServiceInfo
type ServicesResources ¶
type ServicesResources struct { // in: body Body struct { // in: body // required: true ServiceIDs []string `json:"service_ids" validate:"service_ids"` } }
ServicesResources ServicesResources swagger:parameters serviceResources
type SetDefineSourcesStruct ¶
type SetDefineSourcesStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true SourceAlias string `json:"source_alias" validate:"source_alias"` // in: body Body struct { //in: body //required: true SourceSpec *SourceSpec `json:"source_spec" validate:"source_spec"` } }
SetDefineSourcesStruct
type SetLanguageStruct ¶
type SetLanguageStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` //in: body Body struct { // the tenant id // in: body // required: true EventID string `json:"event_id"` // the language // in: body // required: true Language string `json:"language"` } }
SetLanguageStruct SetLanguageStruct swagger:parameters setLanguage
type SetNetDownStreamRuleStruct ¶
type SetNetDownStreamRuleStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { //in: body //required: true DestService string `json:"dest_service" validate:"dest_service"` //downstream service alias //in: body //required: true DestServiceAlias string `json:"dest_service_alias" validate:"dest_service_alias"` //port //in: body //required: true Port int `json:"port" validate:"port"` //protocol //in: body //required: true Protocol string `json:"protocol" validate:"protocol|between:tcp,http"` //regular body //in: body //required: true Rules *NetDownStreamRules `json:"rules" validate:"rules"` } }
SetNetDownStreamRuleStruct
type SetVersionEnv ¶
type SetVersionEnv struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // plugin id // in: path // required: true PluginID string `json:"plugin_id"` //in: body Body struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` // environment variables // in: body // required: true ConfigEnvs ConfigEnvs `json:"config_envs" validate:"config_envs"` } }
SetVersionEnv SetVersionEnv
type SourceSpec ¶
type SourceSpec struct { Alias string `json:"source_alias" validate:"source_alias"` Info string `json:"source_info" validate:"source_info"` CreateTime string `json:"create_time" validate:"create_time"` Operator string `json:"operator" validate:"operator"` SourceBody *SoureBody `json:"source_body" validate:"source_body"` Additions map[string]*Addition `json:"additons" validate:"additions"` }
SourceSpec SourceSpec
type SoureBody ¶
type SoureBody struct { EnvName string `json:"env_name" validate:"env_name"` EnvVal interface{} `json:"env_value" validate:"env_value"` }
SoureBody SoureBody
type StartServiceStruct ¶
type StartServiceStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` //in: body Body struct { // the tenant id // in: body // required: false EventID string `json:"event_id"` } }
StartServiceStruct StartServiceStruct
type StartStopStruct ¶
type StartStopStruct struct { ServiceID string TenantID string DeployVersion string EventID string TaskType string }
StartStopStruct start struct
type StatusList ¶
type StatusList struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` ServiceAlias string `json:"service_alias"` DeployVersion string `json:"deploy_version"` Replicas int `json:"replicas"` ContainerMem int `json:"container_memory"` CurStatus string `json:"cur_status"` ContainerCPU int `json:"container_cpu"` StatusCN string `json:"status_cn"` StartTime string `json:"start_time"` PodList []PodsList `json:"pod_list"` }
StatusList status list
type StatusServiceListStruct ¶
type StatusServiceListStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: body // required: true Body struct { // The list of service IDs that need to get the status, if not specified, return the status of all applications of the tenant // in: body // required: true ServiceIDs []string `json:"service_ids" validate:"service_ids|required"` } }
StatusServiceListStruct StatusServiceListStruct
type StatusServiceStruct ¶
type StatusServiceStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` }
StatusServiceStruct StatusServiceStruct
type SyncAppConfigGroup ¶
type SyncAppConfigGroup struct {
AppConfigGroups []AppConfigGroup `json:"app_config_groups"`
}
SyncAppConfigGroup -
type SyncComponentReq ¶
type SyncComponentReq struct { Components []*Component `json:"components"` DeleteComponentIDs []string `json:"delete_component_ids"` }
SyncComponentReq -
type TenantAndResource ¶
type TenantAndResource struct { dbmodel.Tenants CPURequest int64 `json:"cpu_request"` CPULimit int64 `json:"cpu_limit"` MemoryRequest int64 `json:"memory_request"` MemoryLimit int64 `json:"memory_limit"` RunningAppNum int64 `json:"running_app_num"` RunningAppInternalNum int64 `json:"running_app_internal_num"` RunningAppThirdNum int64 `json:"running_app_third_num"` }
TenantAndResource tenant and resource strcut
type TenantComponentRelation ¶
type TenantComponentRelation struct { DependServiceID string `json:"dep_service_id"` DependServiceType string `json:"dep_service_type"` DependOrder int `json:"dep_order"` }
TenantComponentRelation -
func (*TenantComponentRelation) DbModel ¶
func (t *TenantComponentRelation) DbModel(tenantID, componentID string) *dbmodel.TenantServiceRelation
DbModel return database model
type TenantList ¶
type TenantList []*TenantAndResource
TenantList Tenant list struct
func (TenantList) Len ¶
func (list TenantList) Len() int
func (TenantList) Less ¶
func (list TenantList) Less(i, j int) bool
func (TenantList) Paging ¶
func (list TenantList) Paging(page, pageSize int) map[string]interface{}
Paging
func (TenantList) Swap ¶
func (list TenantList) Swap(i, j int)
type TenantLogByLevelStruct ¶
type TenantLogByLevelStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: body Body struct { // log level : info/debug/error // in: body // required: true Level string `json:"level" validate:"level|required"` // eventID // in: body // required: true EventID string `json:"event_id" validate:"event_id|required"` } }
TenantLogByLevelStruct GetTenantLogByLevelStruct
type TenantPluginVersionConfig ¶
type TenantPluginVersionConfig struct {
ConfigStr string `json:"config_str" validate:"config_str"`
}
TenantPluginVersionConfig -
func (*TenantPluginVersionConfig) DbModel ¶
func (p *TenantPluginVersionConfig) DbModel(componentID, pluginID string) *dbmodel.TenantPluginVersionDiscoverConfig
DbModel return database model
type TenantResList ¶
type TenantResList []*TenantResource
TenantResList TenantResList
func (TenantResList) Len ¶
func (list TenantResList) Len() int
func (TenantResList) Less ¶
func (list TenantResList) Less(i, j int) bool
func (TenantResList) Swap ¶
func (list TenantResList) Swap(i, j int)
type TenantResource ¶
type TenantResource struct { //without plugin AllocatedCPU int `json:"alloc_cpu"` //without plugin AllocatedMEM int `json:"alloc_memory"` //with plugin UsedCPU int `json:"used_cpu"` //with plugin UsedMEM int `json:"used_memory"` UsedDisk float64 `json:"used_disk"` Name string `json:"name"` UUID string `json:"uuid"` EID string `json:"eid"` }
TenantResource abandoned
type TenantResources ¶
type TenantResources struct { // in: body Body struct { // in: body // required: true TenantNames []string `json:"tenant_name" validate:"tenant_name"` } }
TenantResources TenantResources swagger:parameters tenantResources
type TenantServiceVolume ¶
type TenantServiceVolume struct { Model ServiceID string `gorm:"column:service_id;size:32" json:"service_id" validate:"service_id"` //Service type Category string `gorm:"column:category;size:50" json:"category" validate:"category|required"` HostPath string `gorm:"column:host_path" json:"host_path" validate:"host_path|required"` VolumePath string `gorm:"column:volume_path" json:"volume_path" validate:"volume_path|required"` IsReadOnly bool `gorm:"column:is_read_only;default:false" json:"is_read_only" validate:"is_read_only|bool"` }
TenantServiceVolume application persistent record
type TenantServiceVolumeStruct ¶
type TenantServiceVolumeStruct struct { ServiceID string ` json:"service_id"` //Service type Category string `json:"category"` //Storage type (share, local, tmpfs) VolumeType string `json:"volume_type"` //Storage name VolumeName string `json:"volume_name"` //Host address HostPath string `json:"host_path"` //Mount address VolumePath string `json:"volume_path"` //Whether it is read-only IsReadOnly bool `json:"is_read_only"` FileContent string `json:"file_content"` // VolumeCapacity storage size VolumeCapacity int64 `json:"volume_capacity"` // AccessMode 读写模式(Important! A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time. #https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) AccessMode string `json:"access_mode"` SharePolicy string `json:"share_policy"` // BackupPolicy backup policy BackupPolicy string `json:"backup_policy"` // ReclaimPolicy recycling strategy ReclaimPolicy string `json:"reclaim_policy"` // Whether AllowExpansion supports expansion AllowExpansion bool `json:"allow_expansion"` // The storage driver alias used by VolumeProviderName VolumeProviderName string `json:"volume_provider_name"` }
TenantServiceVolumeStruct -
type TenantServicesPort ¶
type TenantServicesPort struct { Model TenantID string `gorm:"column:tenant_id;size:32" validate:"tenant_id|between:30,33" json:"tenant_id"` ServiceID string `gorm:"column:service_id;size:32" validate:"service_id|between:30,33" json:"service_id"` ContainerPort int `gorm:"column:container_port" validate:"container_port|required|numeric_between:1,65535" json:"container_port"` MappingPort int `gorm:"column:mapping_port" validate:"mapping_port|required|numeric_between:1,65535" json:"mapping_port"` Protocol string `gorm:"column:protocol" validate:"protocol|required|in:http,https,stream,grpc" json:"protocol"` PortAlias string `gorm:"column:port_alias" validate:"port_alias|required|alpha_dash" json:"port_alias"` K8sServiceName string `gorm:"column:k8s_service_name" json:"k8s_service_name"` IsInnerService bool `gorm:"column:is_inner_service" validate:"is_inner_service|bool" json:"is_inner_service"` IsOuterService bool `gorm:"column:is_outer_service" validate:"is_outer_service|bool" json:"is_outer_service"` }
TenantServicesPort application port information
func (*TenantServicesPort) DbModel ¶
func (p *TenantServicesPort) DbModel(tenantID, componentID string) *dbmodel.TenantServicesPort
DbModel return database model
type ThirdEndpoint ¶
type ThirdEndpoint struct { EpID string `json:"ep_id"` Address string `json:"address"` Status string `json:"status"` IsStatic bool `json:"is_static"` }
ThirdEndpoint is one of the Endpoints list in the response to list, add, update or delete the endpints.
type ThirdEndpoints ¶
type ThirdEndpoints []*ThirdEndpoint
ThirdEndpoints -
func (ThirdEndpoints) Less ¶
func (e ThirdEndpoints) Less(i, j int) bool
Less is part of sort.Interface. It is implemented by calling the "by" closure in the sorter.
type ThridPartyServiceProbe ¶
type ThridPartyServiceProbe struct { Scheme string `json:"scheme"` Path string `json:"path"` Port int `json:"port"` TimeInterval int `json:"time_interval"` MaxErrorNum int `json:"max_error_num"` Action string `json:"action"` }
ThridPartyServiceProbe is the json obejct in the request to update or fetch the ThridPartyServiceProbe.
type TokenInfo ¶
type TokenInfo struct { EID string `json:"eid"` Token string `json:"token"` CA string `json:"ca"` Key string `json:"key"` }
TokenInfo
type TotalStatsInfo ¶
type TotalStatsInfo struct {
Data []*StatsInfo `json:"data"`
}
TotalStatsInfo total stats info
type TransPlugins ¶
type TransPlugins struct { // in: path // required: true TenantName string `json:"tenant_name"` //in: body Body struct { // install from this tenant // in: body // required: true FromTenantName string `json:"from_tenant_name" validate:"from_tenant_name"` // plugin id // in: body // required: true PluginsID []string `json:"plugins_id" validate:"plugins_id"` } }
TransPlugins TransPlugins
type UpdCertificateReq ¶
type UpdCertificateReq struct { CertificateID string `json:"certificate_id"` CertificateName string `json:"certificate_name"` Certificate string `json:"certificate"` PrivateKey string `json:"private_key"` }
UpdCertificateReq -
type UpdEndpiontsReq ¶
type UpdEndpiontsReq struct { EpID string `json:"ep_id" validate:"required|len:32"` Address string `json:"address"` }
UpdEndpiontsReq is one of the Endpoints in the request to update the endpints.
type UpdRuleConfigReq ¶
type UpdRuleConfigReq struct { ConfigID string `json:"config_id" validate:"config_id|required"` Key string `json:"key"` Value string `json:"value"` }
UpdRuleConfigReq -
type UpdVolumeReq ¶
type UpdVolumeReq struct { VolumeName string `json:"volume_name" validate:"required"` VolumeType string `json:"volume_type" validate:"volume_type|required"` FileContent string `json:"file_content"` VolumePath string `json:"volume_path" validate:"volume_path|required"` Mode *int32 `json:"mode"` }
UpdVolumeReq is a value struct holding request for updating volume.
type UpdateAppConfigGroupReq ¶
type UpdateAppConfigGroupReq struct { ServiceIDs []string `json:"service_ids"` ConfigItems []ConfigItem `json:"config_items" validate:"required"` Enable bool `json:"enable"` }
UpdateAppConfigGroupReq -
type UpdateAppRequest ¶
type UpdateAppRequest struct { AppName string `json:"app_name"` GovernanceMode string `json:"governance_mode"` Overrides []string `json:"overrides"` Version string `json:"version"` Revision int `json:"revision"` }
UpdateAppRequest -
func (*UpdateAppRequest) NeedUpdateHelmApp ¶
func (u *UpdateAppRequest) NeedUpdateHelmApp() bool
NeedUpdateHelmApp check if necessary to update the helm app.
type UpdateBuildVersionReq ¶
type UpdateBuildVersionReq struct {
PlanVersion string `json:"plan_version" validate:"required"`
}
UpdateBuildVersionReq -
type UpdateDefineSourcesStruct ¶
type UpdateDefineSourcesStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true SourceAlias string `json:"source_alias" validate:"source_alias"` // in: path // required: true EnvName string `json:"env_name" validate:"env_name"` // in: body Body struct { //in: body //required: true SourceSpec *SourceSpec `json:"source_spec" validate:"source_spec"` } }
UpdateDefineSourcesStruct UpdateDefineSourcesStruct
type UpdateHTTPRuleStruct ¶
type UpdateHTTPRuleStruct struct { HTTPRuleID string `json:"http_rule_id" validate:"http_rule_id|required"` ServiceID string `json:"service_id"` ContainerPort int `json:"container_port"` Domain string `json:"domain"` Path string `json:"path"` Header string `json:"header"` Cookie string `json:"cookie"` Weight int `json:"weight"` IP string `json:"ip"` CertificateID string `json:"certificate_id"` Certificate string `json:"certificate"` PrivateKey string `json:"private_key"` RuleExtensions []*RuleExtensionStruct `json:"rule_extensions"` }
UpdateHTTPRuleStruct is used to update http rule, certificate and rule extensions
type UpdateNetDownStreamRuleStruct ¶
type UpdateNetDownStreamRuleStruct struct { // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias" validate:"service_alias"` // in: path // required: true DestServiceAlias string `json:"dest_service_alias" validate:"dest_service_alias"` // in: path // required: true Port int `json:"port" validate:"port|numeric_between:1,65535"` // in: body Body struct { //in: body //required: true DestService string `json:"dest_service" validate:"dest_service"` //protocol //in: body //required: true Protocol string `json:"protocol" validate:"protocol|between:tcp,http"` //regular body //in: body //required: true Rules *NetDownStreamRules `json:"rules" validate:"rules"` } }
UpdateNetDownStreamRuleStruct UpdateNetDownStreamRuleStruct
type UpdatePluginStruct ¶
type UpdatePluginStruct struct { // Tenant name // in: path // required: true TenantName string `json:"tenant_name" validate:"tenant_name|required"` // plugin id // in: path // required: true PluginID string `json:"plugin_id" validate:"tenant_name|required"` // in: body Body struct { //Plugin name //in: body //required: false PluginName string `json:"plugin_name" validate:"plugin_name"` //Plugin usage description //in: body //required: false PluginInfo string `json:"plugin_info" validate:"plugin_info"` //Plugin docker address //in: body //required: false ImageURL string `json:"image_url" validate:"image_url"` //git address //in: body //required: false GitURL string `json:"git_url" validate:"git_url"` //Build mode //in: body //required: false BuildModel string `json:"build_model" validate:"build_model"` //Plugin mode //in: body //required: false PluginModel string `json:"plugin_model" validate:"plugin_model"` } }
UpdatePluginStruct UpdatePluginStruct
type UpdateServiceMonitorRequestStruct ¶
type UpdateServiceMonitorRequestStruct struct { // service_show_name // in: body // required: true ServiceShowName string `json:"service_show_name" validate:"service_show_name|required"` // port // in: body // required: true Port int `json:"port" validate:"port|required"` // path // in: body // required: true Path string `json:"path" validate:"path|required"` // interval // in: body // required: true Interval string `json:"interval" validate:"interval|required"` }
UpdateServiceMonitorRequestStruct update service monitor request
type UpdateServiceStruct ¶
type UpdateServiceStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` //in: body Body struct { // Container start command // in: body // required: false ContainerCMD string `gorm:"column:container_cmd;size:2048" json:"container_cmd" validate:"container_cmd"` // Mirror name // in: body // required: false ImageName string `gorm:"column:image_name;size:100" json:"image_name" validate:"image_name"` // Maximum memory of the container // in: body // required: false ContainerMemory int `gorm:"column:container_memory;default:128" json:"container_memory" validate:"container_memory"` } }
UpdateServiceStruct service update swagger:parameters updateService
type UpdateTCPRuleStruct ¶
type UpdateTCPRuleStruct struct { TCPRuleID string `json:"tcp_rule_id" validate:"tcp_rule_id|required"` ServiceID string `json:"service_id"` ContainerPort int `json:"container_port"` IP string `json:"ip"` Port int `json:"port"` RuleExtensions []*RuleExtensionStruct `json:"rule_extensions"` }
UpdateTCPRuleStruct is used to update tcp rule and rule extensions
type UpdateTenantStruct ¶
type UpdateTenantStruct struct { //in: body Body struct { // the eid // in : body // required: false LimitMemory int `json:"limit_memory" validate:"limit_memory"` } }
UpdateTenantStruct UpdateTenantStruct swagger:parameters updateTenant
type UpdateToken ¶
type UpdateToken struct { // in: path // required: true EID string `json:"eid" validate:"eid|required"` //in: body Body struct { // valid period // in: body // required: true ValidityPeriod int `json:"validity_period" validate:"validity_period|required"` //1549812345 } }
UpdateToken
type UpgradeServiceStruct ¶
type UpgradeServiceStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` //in: body Body struct { // the event id // in: body // required: false EventID string `json:"event_id"` // version number // in: body // required: true DeployVersion int `json:"deploy_version"` // operator // in: body // required: false Operator int `json:"operator"` } }
UpgradeServiceStruct UpgradeServiceStruct
type V1BuildServiceStruct ¶
type V1BuildServiceStruct struct { // in: path // required: true ServiceID string `json:"service_id" validate:"service_id"` Body struct { ServiceID string `json:"service_id" validate:"service_id"` EventID string `json:"event_id" validate:"event_id"` ENVS string `json:"envs" validate:"envs"` Kind string `json:"kind" validate:"kind"` Action string `json:"action" validate:"action"` ImageURL string `json:"image_url" validate:"image_url"` DeployVersion string `json:"deploy_version" validate:"deploy_version|required"` RepoURL string `json:"repo_url" validate:"repo_url"` GitURL string `json:"gitUrl" validate:"gitUrl"` Operator string `json:"operator" validate:"operator"` } }
V1BuildServiceStruct V1BuildServiceStruct
type V2AddVolumeDependencyStruct ¶
type V2AddVolumeDependencyStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Dependent service id // in: body // required: true DependServiceID string `json:"depend_service_id" validate:"depend_service_id|required"` // Mount the directory // in: body // required: true MntDir string `json:"mnt_dir" validate:"mnt_dir|required"` // Mount the directory name in the container // in: body // required: true MntName string `json:"mnt_name" validate:"mnt_name|required"` } }
V2AddVolumeDependencyStruct AddVolumeDependencyStruct
type V2AddVolumeStruct ¶
type V2AddVolumeStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Type "application;app_publish" // in: body // required: true Category string `json:"category"` // Container mount directory // in: body // required: true VolumePath string `json:"volume_path" validate:"volume_path|required|regex:^/"` // Host mount directory // in: body // required: true HostPath string `json:"host_path" validate:"volume_path|required|regex:^/"` //Storage driver name VolumeProviderName string `json:"volume_provider_name"` // storage size VolumeCapacity int64 `json:"volume_capacity" validate:"volume_capacity|required|min:1"` // Unit Mi // AccessMode Read and write mode (Important! A volume can only be mounted using one access mode at a time) AccessMode string `gorm:"column:access_mode" json:"access_mode"` // SharePolicy sharing mode SharePolicy string `gorm:"column:share_policy" json:"share_policy"` // BackupPolicy backup policy BackupPolicy string `gorm:"column:backup_policy" json:"backup_policy"` // ReclaimPolicy recycling strategy ReclaimPolicy string `json:"reclaim_policy"` // Whether AllowExpansion supports expansion AllowExpansion bool `gorm:"column:allow_expansion" json:"allow_expansion"` } }
V2AddVolumeStruct AddVolumeStruct
type V2DelVolumeDependencyStruct ¶
type V2DelVolumeDependencyStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Dependent service id // in: body // required: true DependServiceID string `json:"depend_service_id" validate:"depend_service_id|required"` } }
V2DelVolumeDependencyStruct V2DelVolumeDependencyStruct
type V2DelVolumeStruct ¶
type V2DelVolumeStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` // in: body Body struct { // Type "application;app_publish" // in: body // required: true Category string `json:"category"` // Container mount directory // in: body // required: true VolumePath string `json:"volume_path" validate:"volume_path|required|regex:^/"` } }
V2DelVolumeStruct AddVolumeStruct
type VersionEnv ¶
type VersionEnv struct { //variable name //in:body //required: true EnvName string `json:"env_name" validate:"env_name"` //variable //in:body //required: true EnvValue string `json:"env_value" validate:"env_value"` }
VersionEnv VersionEnv
func (*VersionEnv) DbModel ¶
func (v *VersionEnv) DbModel(componentID, pluginID string) *dbmodel.TenantPluginVersionEnv
DbModel return database model
type VerticalServiceStruct ¶
type VerticalServiceStruct struct { // in: path // required: true TenantName string `json:"tenant_name"` // in: path // required: true ServiceAlias string `json:"service_alias"` //in: body Body struct { // the event id // in: body // required: false EventID string `json:"event_id"` // number of cpu // in: body // required: false ContainerCPU int `json:"container_cpu"` // memory size // in: body // required: false ContainerMemory int `json:"container_memory"` } }
VerticalServiceStruct VerticalServiceStruct
type VolumeRelation ¶
type VolumeRelation struct { MountPath string `json:"mount_path"` DependServiceID string `json:"dep_service_id"` DependVolumeName string `json:"dep_volume_name"` }
VolumeRelation -
func (*VolumeRelation) DbModel ¶
func (v *VolumeRelation) DbModel(tenantID, componentID, hostPath, volumeType string) *dbmodel.TenantServiceMountRelation
DbModel return database model
func (*VolumeRelation) Key ¶
func (v *VolumeRelation) Key() string
Key returns the key of VolumeRelation.
type VolumeTypePageStruct ¶
type VolumeTypePageStruct struct {
// contains filtered or unexported fields
}
VolumeTypePageStruct volume option struct with page
type VolumeTypeStruct ¶
type VolumeTypeStruct struct { VolumeType string `json:"volume_type" validate:"volume_type|required"` NameShow string `json:"name_show"` CapacityValidation map[string]interface{} `json:"capacity_validation"` Description string `json:"description"` AccessMode []string `json:"access_mode"` // read and write mode(Important! A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time. #https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) BackupPolicy []string `json:"backup_policy"` // backup strategy ReclaimPolicy string `json:"reclaim_policy"` // recycling strategy: delete, retain, recyle Provisioner string `json:"provisioner"` // storage provider StorageClassDetail map[string]interface{} `json:"storage_class_detail" validate:"storage_class_detail|required"` Sort int `json:"sort"` // sort Enable bool `json:"enable"` // does it take effect }
VolumeTypeStruct volume option struct
type VolumeWithStatusResp ¶
type VolumeWithStatusResp struct { ServiceID string `json:"service_id"` //Storage name Status map[string]string `json:"status"` }
VolumeWithStatusResp volume status
type VolumeWithStatusStruct ¶
type VolumeWithStatusStruct struct { ServiceID string `json:"service_id"` //Service type Category string `json:"category"` //Storage type (share, local, tmpfs) VolumeType string `json:"volume_type"` //Storage name VolumeName string `json:"volume_name"` //Host address HostPath string `json:"host_path"` //Mount address VolumePath string `json:"volume_path"` //Whether it is read-only IsReadOnly bool `json:"is_read_only"` // VolumeCapacity storage size VolumeCapacity int64 `json:"volume_capacity"` // AccessMode Read and write mode (Important! A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time. #https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) AccessMode string `json:"access_mode"` SharePolicy string `json:"share_policy"` // BackupPolicy backup policy BackupPolicy string `json:"backup_policy"` // ReclaimPolicy recycling strategy ReclaimPolicy string `json:"reclaim_policy"` // Whether AllowExpansion supports expansion AllowExpansion bool `json:"allow_expansion"` // The storage driver alias used by VolumeProviderName VolumeProviderName string `json:"volume_provider_name"` Status string `json:"status"` }
VolumeWithStatusStruct volume with status struct
Source Files ¶
- app.go
- app_restore.go
- autoscaler.go
- batch_service.go
- cloudModel.go
- cluster.go
- component.go
- defineSources.go
- etcd.go
- event_log.go
- gateway_model.go
- logModel.go
- model.go
- netStreamRulesModel.go
- pluginModel.go
- pods.go
- service_model.go
- service_monitor.go
- tenantResourceModel.go
- third_party_srvice.go
- tsdbModel.go
- volume.go
- volume_type.go