controller

package
v5.1.5-release+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2019 License: LGPL-3.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const TIMELAYOUT = "2006-01-02T15:04:05"

TIMELAYOUT timelayout

Variables

This section is empty.

Functions

func AddVolume

func AddVolume(w http.ResponseWriter, r *http.Request)

AddVolume AddVolume

func AddVolumeDependency

func AddVolumeDependency(w http.ResponseWriter, r *http.Request)

AddVolumeDependency add volume dependency

func BackupCopy

func BackupCopy(w http.ResponseWriter, r *http.Request)

BackupCopy backup copy

func Backups

func Backups(w http.ResponseWriter, r *http.Request)

Backups list all backup history by group app

func BatchOperation

func BatchOperation(w http.ResponseWriter, r *http.Request)

BatchOperation batch operation for tenant support operation is : start,build,stop,update

func ChargesVerifyController

func ChargesVerifyController(w http.ResponseWriter, r *http.Request)

ChargesVerifyController service charges verify swagger:operation GET /v2/tenants/{tenant_name}/chargesverify v2 chargesverify

应用扩大资源申请接口,公有云云市验证,私有云不验证

service charges verify

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 状态码非200,表示验证过程发生错误。状态码200,msg代表实际状态:success, illegal_quantity, missing_tenant, owned_fee, region_unauthorized, lack_of_memory

func Check

func Check(w http.ResponseWriter, r *http.Request)

Check service check swagger:operation POST /v2/tenants/{tenant_name}/servicecheck v2 serviceCheck

应用构建源检测,支持docker run ,docker compose, source code

service check

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func CheckLabel

func CheckLabel(serviceID string) bool

CheckLabel check label

func CheckMapKey

func CheckMapKey(rebody map[string]interface{}, key string, defaultValue interface{}) map[string]interface{}

CheckMapKey CheckMapKey

func CreateV2RouterManager

func CreateV2RouterManager(conf option.Config, statusCli *client.AppRuntimeSyncClient) (err error)

CreateV2RouterManager 创建manager

func DeleteBackup

func DeleteBackup(w http.ResponseWriter, r *http.Request)

DeleteBackup delete backup

func DeleteVolume

func DeleteVolume(w http.ResponseWriter, r *http.Request)

DeleteVolume DeleteVolume

func DeleteVolumeDependency

func DeleteVolumeDependency(w http.ResponseWriter, r *http.Request)

DeleteVolumeDependency delete volume dependency

func DirectRequest

func DirectRequest(w http.ResponseWriter, r *http.Request, endpoint string)

DirectRequest direct request

func Display

func Display(i interface{}, j interface{})

Display 遍历结构体

func FileServer

func FileServer(r chi.Router, path string, root http.FileSystem)

FileServer conveniently sets up a http.FileServer handler to serve static files from a http.FileSystem.

func GetBackup

func GetBackup(w http.ResponseWriter, r *http.Request)

GetBackup get one backup status

func GetDepVolume

func GetDepVolume(w http.ResponseWriter, r *http.Request)

GetDepVolume 获取应用所有依赖的存储

func GetNotificationEvent

func GetNotificationEvent(w http.ResponseWriter, r *http.Request)

GetNotificationEvent GetNotificationEvent swagger:operation GET /v2/notificationEvent/{hash} v2/notificationEvent getevents

获取通知事件

get events

--- produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func GetNotificationEvents

func GetNotificationEvents(w http.ResponseWriter, r *http.Request)

GetNotificationEvents GetNotificationEvent support query from start and end time or all swagger:operation GET /v2/notificationEvent v2/notificationEvent getevents

获取数据中心通知事件

get events

--- produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func GetServiceAliasID

func GetServiceAliasID(ServiceID string) string

GetServiceAliasID get service alias id python: new_word = str(ord(string[10])) + string + str(ord(string[3])) + 'log' + str(ord(string[2]) / 7) new_id = hashlib.sha224(new_word).hexdigest()[0:16]

func GetServiceCheckInfo

func GetServiceCheckInfo(w http.ResponseWriter, r *http.Request)

GetServiceCheckInfo get service check info swagger:operation GET /v2/tenants/{tenant_name}/servicecheck/{uuid} v2 getServiceCheckInfo

获取构建检测信息

get service check info

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func GetServiceDeployInfo

func GetServiceDeployInfo(w http.ResponseWriter, r *http.Request)

GetServiceDeployInfo get service deploy info

func GetVolume

func GetVolume(w http.ResponseWriter, r *http.Request)

GetVolume 获取应用全部存储,包括依赖的存储

func HTTPRequest

func HTTPRequest(w http.ResponseWriter, r *http.Request, endpoint string)

HTTPRequest public http request

func HandleNotificationEvent

func HandleNotificationEvent(w http.ResponseWriter, r *http.Request)

HandleNotificationEvent HandleNotificationEvent swagger:operation PUT /v2/notificationEvent/{hash} v2/notificationEvent handlenotify

处理通知事件

get events

--- produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func NewBackups

func NewBackups(w http.ResponseWriter, r *http.Request)

NewBackups new group app backup

func Pods

func Pods(w http.ResponseWriter, r *http.Request)

Pods get some service pods swagger:operation GET /v2/tenants/{tenant_name}/pods v2/tenants pods

获取一些应用的Pod信息

get some service pods

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: get some service pods

func RestInfo

func RestInfo(code int, others ...string) []byte

RestInfo rest info

func Restore

func Restore(w http.ResponseWriter, r *http.Request)

Restore restore group app

func RestoreResult

func RestoreResult(w http.ResponseWriter, r *http.Request)

RestoreResult restore group app result

func TestFunc

func TestFunc(w http.ResponseWriter)

TestFunc test func

func TransBody

func TransBody(r *http.Request) (map[string]interface{}, error)

TransBody transfer body to map

func TransStatus

func TransStatus(eStatus string) string

TransStatus trans service status

Types

type AcpNodeStruct

type AcpNodeStruct struct {
	HTTPProxy proxy.Proxy
}

AcpNodeStruct acp node struct

func (*AcpNodeStruct) Apps

func (a *AcpNodeStruct) Apps(w http.ResponseWriter, r *http.Request)

Apps trans to app

func (*AcpNodeStruct) Jobs

func (a *AcpNodeStruct) Jobs(w http.ResponseWriter, r *http.Request)

Jobs trans to job

func (*AcpNodeStruct) Nodes

func (a *AcpNodeStruct) Nodes(w http.ResponseWriter, r *http.Request)

Nodes trans to node

type AppRestoreController

type AppRestoreController struct {
}

AppRestoreController is an implementation of AppRestoreInterface

func (*AppRestoreController) RestoreDepVols

func (a *AppRestoreController) RestoreDepVols(w http.ResponseWriter, r *http.Request)

RestoreDepVols restores service dependent volumes. delete the existing dependent volumes first, then create the ones in the request body.

func (*AppRestoreController) RestoreDeps

func (a *AppRestoreController) RestoreDeps(w http.ResponseWriter, r *http.Request)

RestoreDeps restores service dependencies. delete the existing dependencies first, then create the ones in the request body.

func (*AppRestoreController) RestoreEnvs

func (a *AppRestoreController) RestoreEnvs(w http.ResponseWriter, r *http.Request)

RestoreEnvs restores environment variables. delete the existing environment variables first, then create the ones in the request body.

func (*AppRestoreController) RestorePlugins

func (a *AppRestoreController) RestorePlugins(w http.ResponseWriter, r *http.Request)

RestorePlugins restores service plugins. delete the existing service plugins first, then create the ones in the request body.

func (*AppRestoreController) RestorePorts

func (a *AppRestoreController) RestorePorts(w http.ResponseWriter, r *http.Request)

RestorePorts restores service ports. delete the existing ports first, then create the ones in the request body.

func (*AppRestoreController) RestoreProbe

func (a *AppRestoreController) RestoreProbe(w http.ResponseWriter, r *http.Request)

RestoreProbe restores service probe. delete the existing probe first, then create the one in the request body.

func (*AppRestoreController) RestoreVolumes

func (a *AppRestoreController) RestoreVolumes(w http.ResponseWriter, r *http.Request)

RestoreVolumes restores service volumes. delete the existing volumes first, then create the ones in the request body.

type AppStruct

type AppStruct struct{}

AppStruct -

func (*AppStruct) Download

func (a *AppStruct) Download(w http.ResponseWriter, r *http.Request)

Download -

func (*AppStruct) ExportApp

func (a *AppStruct) ExportApp(w http.ResponseWriter, r *http.Request)

ExportApp -

func (*AppStruct) ImportApp

func (a *AppStruct) ImportApp(w http.ResponseWriter, r *http.Request)

ImportApp -

func (*AppStruct) ImportID

func (a *AppStruct) ImportID(w http.ResponseWriter, r *http.Request)

ImportID -

func (*AppStruct) NewUpload

func (a *AppStruct) NewUpload(w http.ResponseWriter, r *http.Request)

NewUpload -

func (*AppStruct) Upload

func (a *AppStruct) Upload(w http.ResponseWriter, r *http.Request)

Upload -

type CloudManager

type CloudManager struct{}

CloudManager cloud manager

func GetCloudRouterManager

func GetCloudRouterManager() *CloudManager

GetCloudRouterManager get cloud Manager

func (*CloudManager) AddAPIManager

func (c *CloudManager) AddAPIManager(w http.ResponseWriter, r *http.Request)

AddAPIManager AddAPIManager swagger:operation POST /cloud/api/manager cloud addAPIManager

添加api管理

get api manager

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*CloudManager) CreateToken

func (c *CloudManager) CreateToken(w http.ResponseWriter, r *http.Request)

CreateToken CreateToken swagger:operation POST /cloud/auth cloud createToken

产生token

create token

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*CloudManager) DeleteAPIManager

func (c *CloudManager) DeleteAPIManager(w http.ResponseWriter, r *http.Request)

DeleteAPIManager DeleteAPIManager swagger:operation DELETE /cloud/api/manager cloud deleteAPIManager

删除api管理

delete api manager

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*CloudManager) GetAPIManager

func (c *CloudManager) GetAPIManager(w http.ResponseWriter, r *http.Request)

GetAPIManager GetAPIManager swagger:operation GET /cloud/api/manager cloud GetAPIManager

获取api管理

get api manager

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*CloudManager) GetTokenInfo

func (c *CloudManager) GetTokenInfo(w http.ResponseWriter, r *http.Request)

GetTokenInfo GetTokenInfo swagger:operation GET /cloud/auth/{eid} cloud getTokenInfo

获取tokeninfo

get token info

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*CloudManager) Show

func (c *CloudManager) Show(w http.ResponseWriter, r *http.Request)

Show Show

func (*CloudManager) UpdateToken

func (c *CloudManager) UpdateToken(w http.ResponseWriter, r *http.Request)

UpdateToken UpdateToken swagger:operation PUT /cloud/auth/{eid} cloud updateToken

更新token

update token info

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

type DockerConsole

type DockerConsole struct {
	// contains filtered or unexported fields
}

DockerConsole docker console

func GetDockerConsole

func GetDockerConsole() *DockerConsole

GetDockerConsole get Docker console

func (DockerConsole) Get

Get get

type DockerLog

type DockerLog struct {
	// contains filtered or unexported fields
}

DockerLog docker log

func GetDockerLog

func GetDockerLog() *DockerLog

GetDockerLog get docker log

func (DockerLog) Get

func (d DockerLog) Get(w http.ResponseWriter, r *http.Request)

Get get

type EventLog

type EventLog struct {
	// contains filtered or unexported fields
}

EventLog event log

func GetEventLog

func GetEventLog() *EventLog

GetEventLog get event log

func (EventLog) Get

func (d EventLog) Get(w http.ResponseWriter, r *http.Request)

Get get

type EventLogStruct

type EventLogStruct struct{}

EventLogStruct eventlog struct

func (*EventLogStruct) LogByAction

func (e *EventLogStruct) LogByAction(w http.ResponseWriter, r *http.Request)

LogByAction GetLogByAction

func (*EventLogStruct) LogFile

func (e *EventLogStruct) LogFile(w http.ResponseWriter, r *http.Request)

LogFile GetLogFile

func (*EventLogStruct) LogList

func (e *EventLogStruct) LogList(w http.ResponseWriter, r *http.Request)

LogList GetLogList

func (*EventLogStruct) LogSocket

func (e *EventLogStruct) LogSocket(w http.ResponseWriter, r *http.Request)

LogSocket GetLogSocket

func (*EventLogStruct) Logs

Logs GetLogs

func (*EventLogStruct) TenantLogByAction

func (e *EventLogStruct) TenantLogByAction(w http.ResponseWriter, r *http.Request)

TenantLogByAction GetTenantLogByAction swagger:operation POST /v2/tenants/{tenant_name}/event-log v2 tenantLogByAction

获取指定操作的操作日志

get tenant log by level

--- produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

type GatewayStruct

type GatewayStruct struct {
	MQClient client.MQClient
	// contains filtered or unexported fields
}

GatewayStruct -

func (*GatewayStruct) AddTCPRule

func (g *GatewayStruct) AddTCPRule(w http.ResponseWriter, r *http.Request)

AddTCPRule adds a tcp rule

func (*GatewayStruct) GetAvailablePort

func (g *GatewayStruct) GetAvailablePort(w http.ResponseWriter, r *http.Request)

GetAvailablePort returns a available port

func (*GatewayStruct) HTTPRule

func (g *GatewayStruct) HTTPRule(w http.ResponseWriter, r *http.Request)

HTTPRule is used to add, update or delete http rule which enables external traffic to access applications through the gateway

func (*GatewayStruct) RuleConfig

func (g *GatewayStruct) RuleConfig(w http.ResponseWriter, r *http.Request)

RuleConfig is used to add, update or delete rule config.

func (*GatewayStruct) TCPRule

func (g *GatewayStruct) TCPRule(w http.ResponseWriter, r *http.Request)

TCPRule is used to add, update or delete tcp rule which enables external traffic to access applications through the gateway

type Handle

type Handle struct {
	Body struct {
		//in: body
		//handle message
		HandleMessage string `json:"handle_message" validate:"handle_message"`
	}
}

Handle Handle swagger:parameters handlenotify

type LabelController

type LabelController struct {
	// contains filtered or unexported fields
}

LabelController implements Labeler.

func (*LabelController) Labels

func (l *LabelController) Labels(w http.ResponseWriter, r *http.Request)

Labels - get -> list labels

type LicenseManager

type LicenseManager struct{}

LicenseManager license manager

func GetLicenseManager

func GetLicenseManager() *LicenseManager

GetLicenseManager get license Manager

func (*LicenseManager) AnalystLicense

func (l *LicenseManager) AnalystLicense(w http.ResponseWriter, r *http.Request)

AnalystLicense AnalystLicense swagger:operation POST /license license SendLicense

提交license

post license & get token

--- produces: - application/json - application/xml parameters:

  • name: license in: form description: license required: true type: string format: string

Responses:

  '200':
	   description: '{"bean":"{\"token\": \"Q3E5OXdoZDZDX3drN0QtV2gtVmpRaGtlcHJQYmFK\"}"}'

type LogFile

type LogFile struct {
	Root string
}

LogFile log file down server

func GetLogFile

func GetLogFile() *LogFile

GetLogFile get log file

func (LogFile) Get

func (d LogFile) Get(w http.ResponseWriter, r *http.Request)

Get get

func (LogFile) GetInstallLog

func (d LogFile) GetInstallLog(w http.ResponseWriter, r *http.Request)

GetInstallLog get

type MonitorMessage

type MonitorMessage struct {
	// contains filtered or unexported fields
}

MonitorMessage monitor message

func GetMonitorMessage

func GetMonitorMessage() *MonitorMessage

GetMonitorMessage get MonitorMessage

func (MonitorMessage) Get

Get get

type RootFuncManager

type RootFuncManager struct{}

RootFuncManager root function manager

func GetRootFuncManager

func GetRootFuncManager() *RootFuncManager

GetRootFuncManager get root function Manager

type SourcesInfo

type SourcesInfo struct {
	TenantID        string `json:"tenant_id"`
	AvailableMemory int    `json:"available_memory"`
	Status          bool   `json:"status"`
	MemTotal        int    `json:"mem_total"`
	MemUsed         int    `json:"mem_used"`
	CpuTotal        int    `json:"cpu_total"`
	CpuUsed         int    `json:"cpu_used"`
}

SourcesInfo -

type TenantStruct

type TenantStruct struct {
	StatusCli *client.AppRuntimeSyncClient
	MQClient  mqclient.MQClient
}

TenantStruct tenant struct

func (*TenantStruct) AddDefatultENV

func (t *TenantStruct) AddDefatultENV(w http.ResponseWriter, r *http.Request)

AddDefatultENV AddDefatultENV

func (*TenantStruct) AddDependency

func (t *TenantStruct) AddDependency(w http.ResponseWriter, r *http.Request)

AddDependency AddDependency swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/dependency v2 addDependency

增加应用依赖关系

add dependency

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) AddEnv

func (t *TenantStruct) AddEnv(w http.ResponseWriter, r *http.Request)

AddEnv AddEnv swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/env v2 addEnv

增加环境变量

add env var

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) AddLabel

func (t *TenantStruct) AddLabel(w http.ResponseWriter, r *http.Request, labels *api_model.LabelsStruct)

AddLabel adds label

func (*TenantStruct) AddPort

func (t *TenantStruct) AddPort(w http.ResponseWriter, r *http.Request)

AddPort add port

func (*TenantStruct) AddProbe

func (t *TenantStruct) AddProbe(w http.ResponseWriter, r *http.Request)

AddProbe add probe swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/probe v2 addProbe

增加应用探针

add probe

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) AddTenant

func (t *TenantStruct) AddTenant(w http.ResponseWriter, r *http.Request)

AddTenant AddTenant

func (*TenantStruct) AddVolume

func (t *TenantStruct) AddVolume(w http.ResponseWriter, r *http.Request)

AddVolume AddVolume

func (*TenantStruct) AddVolumeDependency

func (t *TenantStruct) AddVolumeDependency(w http.ResponseWriter, r *http.Request)

AddVolumeDependency add volume dependency

func (*TenantStruct) AllTenantResources

func (t *TenantStruct) AllTenantResources(w http.ResponseWriter, r *http.Request)

AllTenantResources GetResources

func (*TenantStruct) BuildList

func (t *TenantStruct) BuildList(w http.ResponseWriter, r *http.Request)

BuildList BuildList

func (*TenantStruct) BuildService

func (t *TenantStruct) BuildService(w http.ResponseWriter, r *http.Request)

BuildService BuildService swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/build v2 serviceBuild

应用构建

service build

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) BuildVersionInfo

func (t *TenantStruct) BuildVersionInfo(w http.ResponseWriter, r *http.Request)

BuildVersionInfo -

func (*TenantStruct) BuildVersionIsExist

func (t *TenantStruct) BuildVersionIsExist(w http.ResponseWriter, r *http.Request)

BuildVersionIsExist -

func (*TenantStruct) ChangeLBPort

func (t *TenantStruct) ChangeLBPort(w http.ResponseWriter, r *http.Request)

ChangeLBPort change lb mapping port only support change to existing port in this tenants

func (*TenantStruct) CheckCode

func (t *TenantStruct) CheckCode(w http.ResponseWriter, r *http.Request)

CheckCode CheckCode swagger:operation POST /v2/tenants/{tenant_name}/code-check v2 checkCode

应用代码检测

check code

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) CreatePlugin

func (t *TenantStruct) CreatePlugin(w http.ResponseWriter, r *http.Request)

CreatePlugin add plugin

func (*TenantStruct) CreateService

func (t *TenantStruct) CreateService(w http.ResponseWriter, r *http.Request)

CreateService create Service

func (*TenantStruct) DeleteBuildVersion

func (t *TenantStruct) DeleteBuildVersion(w http.ResponseWriter, r *http.Request)

DeleteBuildVersion -

func (*TenantStruct) DeleteDefaultENV

func (t *TenantStruct) DeleteDefaultENV(w http.ResponseWriter, r *http.Request)

DeleteDefaultENV DeleteDefaultENV

func (*TenantStruct) DeleteDependency

func (t *TenantStruct) DeleteDependency(w http.ResponseWriter, r *http.Request)

DeleteDependency DeleteDependency swagger:operation DELETE /v2/tenants/{tenant_name}/services/{service_alias}/dependency v2 deleteDependency

删除应用依赖关系

delete dependency

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) DeleteDownStreamRule

func (t *TenantStruct) DeleteDownStreamRule(w http.ResponseWriter, r *http.Request)

DeleteDownStreamRule 删除下游规则

func (*TenantStruct) DeleteEnv

func (t *TenantStruct) DeleteEnv(w http.ResponseWriter, r *http.Request)

DeleteEnv DeleteEnv swagger:operation DELETE /v2/tenants/{tenant_name}/services/{service_alias}/env v2 deleteEnv

删除环境变量

delete env var

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) DeleteLabel

func (t *TenantStruct) DeleteLabel(w http.ResponseWriter, r *http.Request, labels *api_model.LabelsStruct)

DeleteLabel deletes labels

func (*TenantStruct) DeletePlugin

func (t *TenantStruct) DeletePlugin(w http.ResponseWriter, r *http.Request)

DeletePlugin DeletePlugin

func (*TenantStruct) DeletePluginBuildVersion

func (t *TenantStruct) DeletePluginBuildVersion(w http.ResponseWriter, r *http.Request)

DeletePluginBuildVersion DeletePluginBuildVersion swagger:operation DELETE /v2/tenants/{tenant_name}/plugin/{plugin_id}/build-version/{version_id} v2 deletePluginVersion

删除某个构建版本信息

delete plugin version

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) DeletePluginRelation

func (t *TenantStruct) DeletePluginRelation(w http.ResponseWriter, r *http.Request)

DeletePluginRelation DeletePluginRelation swagger:operation DELETE /v2/tenants/{tenant_name}/services/{service_alias}/plugin/{plugin_id} v2 deletePluginRelation

删除插件依赖

delete plugin relation

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) DeletePort

func (t *TenantStruct) DeletePort(w http.ResponseWriter, r *http.Request)

DeletePort delete port

func (*TenantStruct) DeleteProbe

func (t *TenantStruct) DeleteProbe(w http.ResponseWriter, r *http.Request)

DeleteProbe delete probe swagger:operation DELETE /v2/tenants/{tenant_name}/services/{service_alias}/probe v2 deleteProbe

删除应用探针

delete probe

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) DeleteSingleServiceInfo

func (t *TenantStruct) DeleteSingleServiceInfo(w http.ResponseWriter, r *http.Request)

DeleteSingleServiceInfo DeleteService swagger:operation DELETE /v2/tenants/{tenant_name}/services/{service_alias} v2 deleteService

删除应用

delete service

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) DeleteTenant

func (t *TenantStruct) DeleteTenant(w http.ResponseWriter, r *http.Request)

DeleteTenant DeleteTenant

func (*TenantStruct) DeleteVolume

func (t *TenantStruct) DeleteVolume(w http.ResponseWriter, r *http.Request)

DeleteVolume DeleteVolume

func (*TenantStruct) DeleteVolumeDependency

func (t *TenantStruct) DeleteVolumeDependency(w http.ResponseWriter, r *http.Request)

DeleteVolumeDependency delete volume dependency

func (*TenantStruct) Dependency

func (t *TenantStruct) Dependency(w http.ResponseWriter, r *http.Request)

Dependency Dependency

func (*TenantStruct) DeployService

func (t *TenantStruct) DeployService(w http.ResponseWriter, r *http.Request)

DeployService DeployService

func (*TenantStruct) Env

Env Env

func (*TenantStruct) Event

func (t *TenantStruct) Event(w http.ResponseWriter, r *http.Request)

Event GetLogs

func (*TenantStruct) GePluginEnvWhichCanBeSet

func (t *TenantStruct) GePluginEnvWhichCanBeSet(w http.ResponseWriter, r *http.Request)

GePluginEnvWhichCanBeSet GePluginEnvWhichCanBeSet swagger:operation GET /v2/tenants/{tenant_name}/services/{service_alias}/plugin/{plugin_id}/envs v2 getVersionEnvs

获取可配置的env; 从service plugin对应中取, 若不存在则返回默认可修改的变量

get version env

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) GetAllPluginBuildVersons

func (t *TenantStruct) GetAllPluginBuildVersons(w http.ResponseWriter, r *http.Request)

GetAllPluginBuildVersons 获取该插件所有的构建版本 swagger:operation GET /v2/tenants/{tenant_name}/plugin/{plugin_id}/build-version v2 allPluginVersions

获取所有的构建版本信息

all plugin versions

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) GetDeployVersion

func (t *TenantStruct) GetDeployVersion(w http.ResponseWriter, r *http.Request)

GetDeployVersion GetDeployVersion by service

func (*TenantStruct) GetDownStreamRule

func (t *TenantStruct) GetDownStreamRule(w http.ResponseWriter, r *http.Request)

GetDownStreamRule 获取下游规则 swagger:operation GET /v2/tenants/{tenant_name}/services/{service_alias}/net-rule/downstream/{dest_service_alias}/{port} v2 getNetDownStreamRuleStruct

获取下游网络规则

set NetDownStreamRuleStruct

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) GetManyDeployVersion

func (t *TenantStruct) GetManyDeployVersion(w http.ResponseWriter, r *http.Request)

GetManyDeployVersion GetDeployVersion by some service id

func (*TenantStruct) GetPluginBuildVersion

func (t *TenantStruct) GetPluginBuildVersion(w http.ResponseWriter, r *http.Request)

GetPluginBuildVersion 获取某构建版本信息 swagger:operation GET /v2/tenants/{tenant_name}/plugin/{plugin_id}/build-version/{version_id} v2 pluginVersion

获取某个构建版本信息

plugin version

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) GetPluginDefaultEnvs

func (t *TenantStruct) GetPluginDefaultEnvs(w http.ResponseWriter, r *http.Request)

GetPluginDefaultEnvs GetPluginDefaultEnvs

func (*TenantStruct) GetPlugins

func (t *TenantStruct) GetPlugins(w http.ResponseWriter, r *http.Request)

GetPlugins GetPlugins

func (*TenantStruct) GetSingleServiceInfo

func (t *TenantStruct) GetSingleServiceInfo(w http.ResponseWriter, r *http.Request)

GetSingleServiceInfo GetSingleServiceInfo

func (*TenantStruct) GetSupportProtocols

func (t *TenantStruct) GetSupportProtocols(w http.ResponseWriter, r *http.Request)

GetSupportProtocols GetSupportProtocols swagger:operation GET /v2/tenants/{tenant_name}/protocols v2 getSupportProtocols

获取当前数据中心支持的protocols

get region protocols

--- produces: - application/json - application/xml parameters:

  • name: tenant_name in: path description: tenant name required: true type: string

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) GetTenants

func (t *TenantStruct) GetTenants(w http.ResponseWriter, r *http.Request)

GetTenants GetTenants

func (*TenantStruct) HorizontalService

func (t *TenantStruct) HorizontalService(w http.ResponseWriter, r *http.Request)

HorizontalService HorizontalService swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/horizontal v2 horizontalService

应用水平伸缩

service horizontal

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) Label

func (t *TenantStruct) Label(w http.ResponseWriter, r *http.Request)

Label -

func (*TenantStruct) LimitTenantMemory

func (t *TenantStruct) LimitTenantMemory(w http.ResponseWriter, r *http.Request)

LimitTenantMemory -

func (*TenantStruct) PluginAction

func (t *TenantStruct) PluginAction(w http.ResponseWriter, r *http.Request)

PluginAction plugin action

func (*TenantStruct) PluginBuild

func (t *TenantStruct) PluginBuild(w http.ResponseWriter, r *http.Request)

PluginBuild PluginBuild swagger:operation POST /v2/tenants/{tenant_name}/plugin/{plugin_id}/build v2 buildPlugin

构建plugin

build plugin

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) PluginDefaultENV

func (t *TenantStruct) PluginDefaultENV(w http.ResponseWriter, r *http.Request)

PluginDefaultENV PluginDefaultENV

func (*TenantStruct) PluginSet

func (t *TenantStruct) PluginSet(w http.ResponseWriter, r *http.Request)

PluginSet PluginSet

func (*TenantStruct) Pods

func (t *TenantStruct) Pods(w http.ResponseWriter, r *http.Request)

Pods pods swagger:operation GET /v2/tenants/{tenant_name}/services/{service_alias}/pods v2 getPodsInfo

获取pods信息

get pods info

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) Port

func (t *TenantStruct) Port(w http.ResponseWriter, r *http.Request)

Port Port

func (*TenantStruct) PortInnerController

func (t *TenantStruct) PortInnerController(w http.ResponseWriter, r *http.Request)

PortInnerController 开关端口对内服务 swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/ports/{port}/inner v2 PortInnerController

开关对内服务,应用无需重启,自动生效

add port

--- Consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) PortOuterController

func (t *TenantStruct) PortOuterController(w http.ResponseWriter, r *http.Request)

PortOuterController 开关端口对外服务 swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/ports/{port}/outer v2 PortOuterController

开关端口对外服务,应用无需重启自动生效

add port

--- Consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) Ports

func (t *TenantStruct) Ports(w http.ResponseWriter, r *http.Request)

Ports 应用端口控制器

func (*TenantStruct) PostStatusService

func (t *TenantStruct) PostStatusService(w http.ResponseWriter, r *http.Request)

PostStatusService PostStatusService

func (*TenantStruct) Probe

func (t *TenantStruct) Probe(w http.ResponseWriter, r *http.Request)

Probe probe

func (*TenantStruct) PutPorts

func (t *TenantStruct) PutPorts(w http.ResponseWriter, r *http.Request)

PutPorts PortVar swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/ports v2 updatePort

更新应用端口信息(旧)

update port

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) RestartService

func (t *TenantStruct) RestartService(w http.ResponseWriter, r *http.Request)

RestartService RestartService swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/restart v2 restartService

重启应用

restart service

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) RollBack

func (t *TenantStruct) RollBack(w http.ResponseWriter, r *http.Request)

RollBack RollBack swagger:operation Post /v2/tenants/{tenant_name}/services/{service_alias}/rollback v2 rollback

应用版本回滚

service rollback

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) ServiceResources

func (t *TenantStruct) ServiceResources(w http.ResponseWriter, r *http.Request)

ServiceResources ServiceResources

func (*TenantStruct) ServicesCount

func (t *TenantStruct) ServicesCount(w http.ResponseWriter, r *http.Request)

ServicesCount Get all apps and status

func (*TenantStruct) ServicesInfo

func (t *TenantStruct) ServicesInfo(w http.ResponseWriter, r *http.Request)

ServicesInfo GetServiceInfo

func (*TenantStruct) SetDownStreamRule

func (t *TenantStruct) SetDownStreamRule(w http.ResponseWriter, r *http.Request)

SetDownStreamRule 设置下游规则 swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/net-rule/downstream v2 setNetDownStreamRuleStruct

设置下游网络规则

set NetDownStreamRuleStruct

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) SetLanguage

func (t *TenantStruct) SetLanguage(w http.ResponseWriter, r *http.Request)

SetLanguage SetLanguage

func (*TenantStruct) Share

func (t *TenantStruct) Share(w http.ResponseWriter, r *http.Request)

Share 应用分享

func (*TenantStruct) SharePlugin

func (t *TenantStruct) SharePlugin(w http.ResponseWriter, r *http.Request)

SharePlugin share tenants plugin

func (*TenantStruct) SharePluginResult

func (t *TenantStruct) SharePluginResult(w http.ResponseWriter, r *http.Request)

SharePluginResult SharePluginResult

func (*TenantStruct) ShareResult

func (t *TenantStruct) ShareResult(w http.ResponseWriter, r *http.Request)

ShareResult 获取分享结果

func (*TenantStruct) SingleServiceInfo

func (t *TenantStruct) SingleServiceInfo(w http.ResponseWriter, r *http.Request)

SingleServiceInfo SingleServiceInfo

func (*TenantStruct) SingleTenantResources

func (t *TenantStruct) SingleTenantResources(w http.ResponseWriter, r *http.Request)

SingleTenantResources SingleTenantResources swagger:operation GET /v2/tenants/{tenant_name}/resources v2 singletenantResources

指定租户资源使用情况

get tenant resources

--- produces: - application/json - application/xml parameters:

  • name: tenant_name in: path description: tenant name required: true type: string

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) StartService

func (t *TenantStruct) StartService(w http.ResponseWriter, r *http.Request)

StartService StartService swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/start v2 startService

启动应用

start service

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) StatusContainerID

func (t *TenantStruct) StatusContainerID(w http.ResponseWriter, r *http.Request)

StatusContainerID StatusContainerID

func (*TenantStruct) StatusService

func (t *TenantStruct) StatusService(w http.ResponseWriter, r *http.Request)

StatusService StatusService

func (*TenantStruct) StatusServiceList

func (t *TenantStruct) StatusServiceList(w http.ResponseWriter, r *http.Request)

StatusServiceList service list status

func (*TenantStruct) StopService

func (t *TenantStruct) StopService(w http.ResponseWriter, r *http.Request)

StopService StopService swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/stop v2 stopService

关闭应用

stop service

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) SumTenants

func (t *TenantStruct) SumTenants(w http.ResponseWriter, r *http.Request)

SumTenants 统计租户数量

func (*TenantStruct) Tenant

func (t *TenantStruct) Tenant(w http.ResponseWriter, r *http.Request)

Tenant Tenant

func (*TenantStruct) TenantResources

func (t *TenantStruct) TenantResources(w http.ResponseWriter, r *http.Request)

TenantResources TenantResources

func (*TenantStruct) TenantResourcesStatus

func (t *TenantStruct) TenantResourcesStatus(w http.ResponseWriter, r *http.Request)

TenantResourcesStatus tenant resources status

func (*TenantStruct) TenantsGetByName

func (t *TenantStruct) TenantsGetByName(w http.ResponseWriter, r *http.Request)

TenantsGetByName TenantsGetByName

func (*TenantStruct) TenantsQuery

func (t *TenantStruct) TenantsQuery(w http.ResponseWriter, r *http.Request)

TenantsQuery TenantsQuery

func (*TenantStruct) TenantsWithResource

func (t *TenantStruct) TenantsWithResource(w http.ResponseWriter, r *http.Request)

TenantsWithResource TenantsWithResource

func (*TenantStruct) TransPlugins

func (t *TenantStruct) TransPlugins(w http.ResponseWriter, r *http.Request)

TransPlugins transPlugins swagger:operation POST /v2/tenants/{tenant_name}/transplugins v2 transPlugins

安装云帮默认plugins

trans plugins

--- produces: - application/json - application/xml parameters:

  • name: tenant_name in: path description: tenant name required: true type: string

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) UpdVolume

func (t *TenantStruct) UpdVolume(w http.ResponseWriter, r *http.Request)

UpdVolume updates service volume.

func (*TenantStruct) UpdateDefaultENV

func (t *TenantStruct) UpdateDefaultENV(w http.ResponseWriter, r *http.Request)

UpdateDefaultENV UpdateDefaultENV

func (*TenantStruct) UpdateDownStreamRule

func (t *TenantStruct) UpdateDownStreamRule(w http.ResponseWriter, r *http.Request)

UpdateDownStreamRule 更新下游规则 swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/net-rule/downstream/{dest_service_alias}/{port} v2 updateNetDownStreamRuleStruct

更新下游网络规则

update NetDownStreamRuleStruct

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) UpdateEnv

func (t *TenantStruct) UpdateEnv(w http.ResponseWriter, r *http.Request)

UpdateEnv UpdateEnv swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/env v2 update Env

修改环境变量

update env var

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) UpdateLabel

func (t *TenantStruct) UpdateLabel(w http.ResponseWriter, r *http.Request, labels *api_model.LabelsStruct)

UpdateLabel Update updates labels

func (*TenantStruct) UpdatePlugin

func (t *TenantStruct) UpdatePlugin(w http.ResponseWriter, r *http.Request)

UpdatePlugin UpdatePlugin

func (*TenantStruct) UpdatePort

func (t *TenantStruct) UpdatePort(w http.ResponseWriter, r *http.Request)

UpdatePort Update port

func (*TenantStruct) UpdateProbe

func (t *TenantStruct) UpdateProbe(w http.ResponseWriter, r *http.Request)

UpdateProbe update probe swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/probe v2 updateProbe

更新应用探针信息, *注意此处为全量更新

update probe

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) UpdateService

func (t *TenantStruct) UpdateService(w http.ResponseWriter, r *http.Request)

UpdateService create Service

func (*TenantStruct) UpdateTenant

func (t *TenantStruct) UpdateTenant(w http.ResponseWriter, r *http.Request)

UpdateTenant UpdateTenant

func (*TenantStruct) UpdateVersionEnv

func (t *TenantStruct) UpdateVersionEnv(w http.ResponseWriter, r *http.Request)

UpdateVersionEnv UpdateVersionEnv swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/plugin/{plugin_id}/upenv v2 updateVersionEnv

modify the app plugin config info. it will Thermal effect

update version env

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) UpgradeService

func (t *TenantStruct) UpgradeService(w http.ResponseWriter, r *http.Request)

UpgradeService UpgradeService swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/upgrade v2 upgradeService

升级应用

upgrade service

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) VerticalService

func (t *TenantStruct) VerticalService(w http.ResponseWriter, r *http.Request)

VerticalService VerticalService swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/vertical v2 verticalService

应用垂直伸缩

service vertical

--- consumes: - application/json - application/x-protobuf

produces: - application/json - application/xml

responses:

default:
  schema:
    "$ref": "#/responses/commandResponse"
  description: 统一返回格式

func (*TenantStruct) VolumeDependency

func (t *TenantStruct) VolumeDependency(w http.ResponseWriter, r *http.Request)

VolumeDependency VolumeDependency

type ThirdPartyServiceController

type ThirdPartyServiceController struct{}

ThirdPartyServiceController implements ThirdPartyServicer

func (*ThirdPartyServiceController) Endpoints

Endpoints POST->add endpoints, PUT->update endpoints, DELETE->delete endpoints

type V2Routes

V2Routes v2Routes

func NewManager

func NewManager(conf option.Config, statusCli *client.AppRuntimeSyncClient) (*V2Routes, error)

NewManager new manager

func (*V2Routes) AlertManagerWebHook

func (v2 *V2Routes) AlertManagerWebHook(w http.ResponseWriter, r *http.Request)

AlertManagerWebHook -

func (*V2Routes) Health

func (v2 *V2Routes) Health(w http.ResponseWriter, r *http.Request)

Health show health status

func (*V2Routes) Show

func (v2 *V2Routes) Show(w http.ResponseWriter, r *http.Request)

Show test

func (*V2Routes) Version

func (v2 *V2Routes) Version(w http.ResponseWriter, r *http.Request)

Version -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL