controller

package
v3.7.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: LGPL-3.0 Imports: 41 Imported by: 36

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 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) 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 GetPodList

func GetPodList(namespace, serviceAlias string, cli *kubernetes.Clientset) (*v1.PodList, error)

GetPodList Get pod list

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 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 ListPodIP

func ListPodIP(namespace, serviceAlias string, cli *kubernetes.Clientset) (map[string]string, error)

ListPodIP get running pod ip

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 AppStruct

type AppStruct struct{}

func (*AppStruct) Download

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

func (*AppStruct) ExportApp

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

func (*AppStruct) ImportApp

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

func (*AppStruct) ImportID

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

func (*AppStruct) Upload

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

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 EntranceStruct

type EntranceStruct struct {
	HTTPProxy proxy.Proxy
}

EntranceStruct entrance struct

func (*EntranceStruct) Entrance

func (e *EntranceStruct) Entrance(w http.ResponseWriter, r *http.Request)

Entrance entrance

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 Handle

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

Handle Handle swagger:parameters handlenotify

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

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 TenantStruct

type TenantStruct struct {
	StatusCli *client.AppRuntimeSyncClient
}

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) AddNodeLabel

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

AddNodeLabel AddNodeLabel

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) AddServiceLabel

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

AddServiceLabel AddServiceLabel

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)

func (*TenantStruct) BuildVersionIsExist

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

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)

func (*TenantStruct) DeleteDefaultENV

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

DeleteDefaultENV DeleteDefaultENV

func (*TenantStruct) DeleteDefineSource

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

DeleteDefineSource DeleteDefineSource swagger:operation DELETE /v2/tenants/{tenant_name}/sources/{source_alias}/{env_name} v2 deleteDefineSource

设置自定义资源

set defineSource

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

produces: - application/json - application/xml

responses:

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

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) DeleteNodeLabel

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

DeleteNodeLabel DeleteLabel

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 (e *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) GetDefineSource

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

GetDefineSource GetDefineSource swagger:operation GET /v2/tenants/{tenant_name}/sources/{source_alias}/{env_name} v2 getDefineSource

设置自定义资源

set defineSource

--- 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) NodeLabel

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

NodeLabel label

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) ServiceLabel

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

ServiceLabel label

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)

Get all apps and status

func (*TenantStruct) ServicesInfo

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

ServicesInfo GetServiceInfo

func (*TenantStruct) SetDefineSource

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

SetDefineSource SetDefineSource swagger:operation POST /v2/tenants/{tenant_name}/sources/{source_alias} v2 setDefineSource

设置自定义资源

set defineSource

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

produces: - application/json - application/xml

responses:

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

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) ShareCloud

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

ShareCloud 云市分享

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) 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) UpdateDefaultENV

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

UpdateDefaultENV UpdateDefaultENV

func (*TenantStruct) UpdateDefineSource

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

UpdateDefineSource UpdateDefineSource swagger:operation PUT /v2/tenants/{tenant_name}/sources/{source_alias}/{env_name} v2 updateDefineSource

更新自定义资源

set defineSource

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

produces: - application/json - application/xml

responses:

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

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) 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) UpdateServiceLabel

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

UpdateServiceLabel UpdateServiceLabel

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 V2Routes

V2Routes v2Routes

func NewManager

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

NewManager new manager

func (*V2Routes) Health

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

show health status

func (*V2Routes) Show

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

Show test

Jump to

Keyboard shortcuts

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