Documentation
¶
Overview ¶
Package endpoints 定义所有的 route handle.
Index ¶
- Constants
- func InternalReverseHandler(handler func(context.Context, *http.Request, map[string]string) error) http.Handler
- func NotImplemented(ctx context.Context, request *http.Request, m map[string]string) (httpserver.Responser, error)
- func ProxyMetrics(ctx context.Context, r *http.Request, vars map[string]string) error
- type Endpoints
- func (e *Endpoints) APIDocWebsocket(ctx context.Context, w http.ResponseWriter, r *http.Request, ...) error
- func (e *Endpoints) CreateAPIAsset(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateAPIVersion(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateAccess(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateClient(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateContract(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateInstantiation(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateNode(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) CreateSLA(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeleteAPIAsset(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeleteAPIAssetVersion(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeleteAccess(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeleteClient(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeleteContract(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeleteNode(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DeleteSLA(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) DownloadSpecText(ctx context.Context, w http.ResponseWriter, r *http.Request, ...) (err error)
- func (e *Endpoints) ExecuteAttemptTest(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetAPIAsset(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetAPIAssetVersion(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetAccess(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetClient(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetContract(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetInstantiations(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetNodeDetail(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetOperation(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) GetSLA(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) Health(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListAPIGateways(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListAccess(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListChildrenNodes(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListContract(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListContractRecords(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListMyClients(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListProjectAPIGateways(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListRuntimeServices(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListSLAs(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListSwaggerClient(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ListSwaggerVersions(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) MvCpNode(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) PagingAPIAssetVersions(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) PagingAPIAssets(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) Routes() []httpserver.Endpoint
- func (e *Endpoints) SearchOperations(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) UpdateAPIAsset(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) UpdateAccess(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) UpdateAssetVersion(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) UpdateClient(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) UpdateContract(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) UpdateInstantiation(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) UpdateNode(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) UpdateSLA(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- func (e *Endpoints) ValidateSwagger(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
- type Option
Constants ¶
const ( ApiTest = "API_TEST" PipelineYmlVersion = "1.1" ApiTestType = "api-test" ApiTestIDs = "api_ids" UsecaseID = "usecase_id" PipelineStageLen = 10 Project = "project" Usecase = "case" )
API 返回对应的错误类型
Variables ¶
This section is empty.
Functions ¶
func InternalReverseHandler ¶
func NotImplemented ¶
Types ¶
type Endpoints ¶
type Endpoints struct {
// contains filtered or unexported fields
}
Endpoints 定义 endpoint 方法
func (*Endpoints) APIDocWebsocket ¶
func (*Endpoints) CreateAPIAsset ¶
func (e *Endpoints) CreateAPIAsset(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
CreateAPIAsset creates APIAsset
func (*Endpoints) CreateAPIVersion ¶
func (e *Endpoints) CreateAPIVersion(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
CreateAPIVersion 创建 API 资料版本
func (*Endpoints) CreateAccess ¶
func (e *Endpoints) CreateAccess(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
CreateAccess creates an Access
func (*Endpoints) CreateClient ¶
func (e *Endpoints) CreateClient(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
创建一个客户端
func (*Endpoints) CreateContract ¶
func (e *Endpoints) CreateContract(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
创建一个合约
func (*Endpoints) CreateInstantiation ¶
func (e *Endpoints) CreateInstantiation(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
实例化 (即创建一个 instantiation)
func (*Endpoints) CreateNode ¶
func (*Endpoints) CreateSLA ¶
func (e *Endpoints) CreateSLA(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
创建 SLA
func (*Endpoints) DeleteAPIAsset ¶
func (e *Endpoints) DeleteAPIAsset(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
DeleteAPIAsset deletes APIAsset
func (*Endpoints) DeleteAPIAssetVersion ¶
func (e *Endpoints) DeleteAPIAssetVersion(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
DeleteAPIAssetVersion 删除 API Version
func (*Endpoints) DeleteAccess ¶
func (*Endpoints) DeleteClient ¶
func (*Endpoints) DeleteContract ¶
func (*Endpoints) DeleteNode ¶
func (*Endpoints) DownloadSpecText ¶
func (e *Endpoints) DownloadSpecText(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) (err error)
下载 swagger 文本
func (*Endpoints) ExecuteAttemptTest ¶
func (*Endpoints) GetAPIAsset ¶
func (e *Endpoints) GetAPIAsset(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetAPIAsset selects APIAsset
func (*Endpoints) GetAPIAssetVersion ¶
func (e *Endpoints) GetAPIAssetVersion(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
GetAPIAssetVersion 查询 API 资产版本详情
func (*Endpoints) GetClient ¶
func (e *Endpoints) GetClient(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
查询一个客户端的详情
func (*Endpoints) GetContract ¶
func (*Endpoints) GetInstantiations ¶
func (e *Endpoints) GetInstantiations(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
查询 minor 下的 instantiation
func (*Endpoints) GetNodeDetail ¶
func (*Endpoints) GetOperation ¶
func (e *Endpoints) GetOperation(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
查询文档中的接口详情
func (*Endpoints) Health ¶
func (e *Endpoints) Health(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
Health 健康检查
func (*Endpoints) ListAPIGateways ¶
func (*Endpoints) ListAccess ¶
func (e *Endpoints) ListAccess(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
ListAccess lists Accesses
func (*Endpoints) ListChildrenNodes ¶
func (*Endpoints) ListContract ¶
func (e *Endpoints) ListContract(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
查询客户端下的合约列表
func (*Endpoints) ListContractRecords ¶
func (e *Endpoints) ListContractRecords(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
查询合约操作记录
func (*Endpoints) ListMyClients ¶
func (e *Endpoints) ListMyClients(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
获取本人创建的客户端列表
func (*Endpoints) ListProjectAPIGateways ¶
func (*Endpoints) ListRuntimeServices ¶
func (e *Endpoints) ListRuntimeServices(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
拉取 application 下的服务的地址
func (*Endpoints) ListSLAs ¶
func (e *Endpoints) ListSLAs(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
SLAs 列表
func (*Endpoints) ListSwaggerClient ¶
func (*Endpoints) ListSwaggerVersions ¶
func (e *Endpoints) ListSwaggerVersions(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
查询 swaggerVersions (即版本树)
func (*Endpoints) PagingAPIAssetVersions ¶
func (e *Endpoints) PagingAPIAssetVersions(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
PagingAPIAssetVersions 查询 API 资料版本列表
func (*Endpoints) PagingAPIAssets ¶
func (e *Endpoints) PagingAPIAssets(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
PagingAPIAssets pages APIAssets
func (*Endpoints) Routes ¶
func (e *Endpoints) Routes() []httpserver.Endpoint
Routes 返回 endpoints 的所有 endpoint 方法,也就是 route.
func (*Endpoints) SearchOperations ¶
func (e *Endpoints) SearchOperations(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
从文档中搜索符合条件的接口列表
func (*Endpoints) UpdateAPIAsset ¶
func (e *Endpoints) UpdateAPIAsset(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
UpdateAPIAsset updates APIAsset
func (*Endpoints) UpdateAccess ¶
func (*Endpoints) UpdateAssetVersion ¶
func (e *Endpoints) UpdateAssetVersion(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
修改版本 (标记为不建议使用)
func (*Endpoints) UpdateClient ¶
func (*Endpoints) UpdateContract ¶
func (e *Endpoints) UpdateContract(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
更新合约状态
func (*Endpoints) UpdateInstantiation ¶
func (e *Endpoints) UpdateInstantiation(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)
修改实例