Documentation ¶
Index ¶
- func CreateScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func DeleteConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func DeleteProductScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func DeleteProjectScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func DeleteScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func DeleteScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetProductScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetProductScopeList(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetProjectScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetProjectScopeList(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetScopeConfigList(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetScopeList(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func Init(br context.BasicRes, p plugin.PluginMeta)
- func ListConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func MakeDataSourcePipelinePlanV200(subtaskMetas []plugin.SubTaskMeta, connectionId uint64, ...) (plugin.PipelinePlan, []plugin.Scope, errors.Error)
- func PatchConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func PostConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func PutProductScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func PutProjectScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func PutScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func RemoteScopes(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func UpdateProductScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func UpdateProjectScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func UpdateScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func UpdateScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- type MixScopes
- type ProductResponse
- type ProductScopeReq
- type ProductScopeRes
- type ProjectResponse
- type ProjectScopeReq
- type ProjectScopeRes
- type ZentaoTestConnResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateScopeConfig ¶
func CreateScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
CreateScopeConfig create scope config for Zentao @Summary create scope config for Zentao @Description create scope config for Zentao @Tags plugins/zentao @Accept application/json @Param connectionId path int true "connectionId" @Param scopeConfig body models.ZentaoScopeConfig true "scope config" @Success 200 {object} models.ZentaoScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scope-configs [POST]
func DeleteConnection ¶
func DeleteConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
@Summary delete a zentao connection @Description Delete a zentao connection @Tags plugins/zentao @Success 200 {object} models.ZentaoConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 409 {object} services.BlueprintProjectPairs "References exist to this connection" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/zentao/connections/{connectionId} [DELETE]
func DeleteProductScope ¶
func DeleteProductScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
DeleteScope delete plugin data associated with the scope and optionally the scope itself @Summary delete plugin data associated with the scope and optionally the scope itself @Description delete data associated with plugin scope @Tags plugins/zentao @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Param delete_data_only query bool false "Only delete the scope data, not the scope itself" @Success 200 @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 409 {object} api.ScopeRefDoc "References exist to this scope" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scopes/product/{scopeId} [DELETE]
func DeleteProjectScope ¶
func DeleteProjectScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
DeleteScope delete plugin data associated with the scope and optionally the scope itself @Summary delete plugin data associated with the scope and optionally the scope itself @Description delete data associated with plugin scope @Tags plugins/zentao @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Param delete_data_only query bool false "Only delete the scope data, not the scope itself" @Success 200 @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 409 {object} api.ScopeRefDoc "References exist to this scope" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scopes/project/{scopeId} [DELETE]
func DeleteScope ¶
func DeleteScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
DeleteScope delete plugin data associated with the scope and optionally the scope itself @Summary delete plugin data associated with the scope and optionally the scope itself @Description delete data associated with plugin scope @Tags plugins/zentao @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Param delete_data_only query bool false "Only delete the scope data, not the scope itself" @Success 200 @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scopes/{scopeId} [DELETE]
func DeleteScopeConfig ¶
func DeleteScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
DeleteScopeConfig delete a scope config @Summary delete a scope config @Description delete a scope config @Tags plugins/zentao @Param id path int true "id" @Param connectionId path int true "connectionId" @Success 200 @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scope-configs/{id} [DELETE]
func GetConnection ¶
func GetConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
@Summary get zentao connection detail @Description Get zentao connection detail @Tags plugins/zentao @Success 200 {object} models.ZentaoConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/zentao/connections/{connectionId} [GET]
func GetProductScope ¶
func GetProductScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetProductScope get one product @Summary get one product @Description get one product @Tags plugins/zentao @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Success 200 {object} ProductScopeRes @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scopes/product/{scopeId} [GET]
func GetProductScopeList ¶
func GetProductScopeList(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetProductScopeList get one product @Summary get one product @Description get one product @Tags plugins/zentao @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Success 200 {object} []ProductScopeRes @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/gitlab/connections/{connectionId}/scopes/product/ [GET]
func GetProjectScope ¶
func GetProjectScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetProjectScope get one project @Summary get one project @Description get one project @Tags plugins/zentao @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Success 200 {object} ProjectScopeRes @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scopes/project/{scopeId} [GET]
func GetProjectScopeList ¶
func GetProjectScopeList(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetProjectScopeList get Gitlab projects @Summary get Gitlab projects @Description get Gitlab projects @Tags plugins/gitlab @Param connectionId path int false "connection ID" @Param blueprints query bool false "also return blueprints using these scopes as part of the payload" @Success 200 {object} []ProjectScopeRes @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/gitlab/connections/{connectionId}/scopes/project/ [GET]
func GetScope ¶
func GetScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetScope get one project @Summary get one project @Description get one project @Tags plugins/zentao @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Success 200 {object} ProjectScopeRes @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scopes/{scopeId} [GET]
func GetScopeConfig ¶
func GetScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetScopeConfig return one scope config @Summary return one scope config @Description return one scope config @Tags plugins/zentao @Param id path int true "id" @Param connectionId path int true "connectionId" @Success 200 {object} models.ZentaoScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scope-configs/{id} [GET]
func GetScopeConfigList ¶
func GetScopeConfigList(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetScopeConfigList return all scope configs @Summary return all scope configs @Description return all scope configs @Tags plugins/zentao @Param connectionId path int true "connectionId" @Param pageSize query int false "page size, default 50" @Param page query int false "page size, default 1" @Success 200 {object} []models.ZentaoScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scope-configs [GET]
func GetScopeList ¶
func GetScopeList(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetScopeList get Gitlab projects @Summary get Gitlab projects @Description get Gitlab projects @Tags plugins/gitlab @Param connectionId path int false "connection ID" @Param blueprints query bool false "also return blueprints using these scopes as part of the payload" @Success 200 {object} []ProjectScopeRes @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/gitlab/connections/{connectionId}/scopes/ [GET]
func ListConnections ¶
func ListConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
@Summary get all zentao connections @Description Get all zentao connections @Tags plugins/zentao @Success 200 {object} []models.ZentaoConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/zentao/connections [GET]
func MakeDataSourcePipelinePlanV200 ¶
func MakeDataSourcePipelinePlanV200(subtaskMetas []plugin.SubTaskMeta, connectionId uint64, bpScopes []*plugin.BlueprintScopeV200, syncPolicy *plugin.BlueprintSyncPolicy) (plugin.PipelinePlan, []plugin.Scope, errors.Error)
func PatchConnection ¶
func PatchConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
@Summary patch zentao connection @Description Patch zentao connection @Tags plugins/zentao @Param body body models.ZentaoConnection true "json body" @Success 200 {object} models.ZentaoConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/zentao/connections/{connectionId} [PATCH]
func PostConnections ¶
func PostConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
@Summary create zentao connection @Description Create zentao connection @Tags plugins/zentao @Param body body models.ZentaoConnection true "json body" @Success 200 {object} models.ZentaoConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/zentao/connections [POST]
func PutProductScope ¶
func PutProductScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
PutProductScope create or update zentao products @Summary create or update zentao products @Description Create or update zentao products @Tags plugins/zentao @Accept application/json @Param connectionId path int true "connection ID" @Param scope body ProductScopeReq true "json" @Success 200 {object} []models.ZentaoProduct @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/product/scopes [PUT]
func PutProjectScope ¶
func PutProjectScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
PutProjectScope create or update zentao projects @Summary create or update zentao projects @Description Create or update zentao projects @Tags plugins/zentao @Accept application/json @Param connectionId path int true "connection ID" @Param scope body ProjectScopeReq true "json" @Success 200 {object} []models.ZentaoProject @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/project/scopes [PUT]
func PutScope ¶
func PutScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
PutScope create or update zentao projects @Summary create or update zentao projects @Description Create or update zentao projects @Tags plugins/zentao @Accept application/json @Param connectionId path int true "connection ID" @Param scope body ProjectScopeReq true "json" @Success 200 {object} []models.ZentaoProject @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scopes [PUT]
func RemoteScopes ¶
func RemoteScopes(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
RemoteScopes list all available scope for users @Summary list all available scope for users @Description list all available scope for users @Tags plugins/zentao @Accept application/json @Param connectionId path int false "connection ID" @Param groupId query string false "group ID" @Param pageToken query string false "page Token" @Success 200 {object} api.RemoteScopesOutput @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/remote-scopes [GET]
func TestConnection ¶
func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
@Summary test zentao connection @Description Test zentao Connection @Tags plugins/zentao @Param body body models.ZentaoConn true "json body" @Success 200 {object} ZentaoTestConnResponse "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/zentao/test [POST]
func UpdateProductScope ¶
func UpdateProductScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
UpdateProductScope patch to zentao product @Summary patch to zentao product @Description patch to zentao product @Tags plugins/zentao @Accept application/json @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Param scope body models.ZentaoProduct true "json" @Success 200 {object} models.ZentaoProduct @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scopes/product/{scopeId} [PATCH]
func UpdateProjectScope ¶
func UpdateProjectScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
UpdateProjectScope patch to zentao project @Summary patch to zentao project @Description patch to zentao project @Tags plugins/zentao @Accept application/json @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Param scope body models.ZentaoProject true "json" @Success 200 {object} models.ZentaoProject @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scopes/project/{scopeId} [PATCH]
func UpdateScope ¶
func UpdateScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
UpdateScope patch to zentao project @Summary patch to zentao project @Description patch to zentao project @Tags plugins/zentao @Accept application/json @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Param scope body models.ZentaoProject true "json" @Success 200 {object} models.ZentaoProject @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scopes/{scopeId} [PATCH]
func UpdateScopeConfig ¶
func UpdateScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
UpdateScopeConfig update scope config for Zentao @Summary update scope config for Zentao @Description update scope config for Zentao @Tags plugins/zentao @Accept application/json @Param id path int true "id" @Param connectionId path int true "connectionId" @Param scopeConfig body models.ZentaoScopeConfig true "scope config" @Success 200 {object} models.ZentaoScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/zentao/connections/{connectionId}/scope-configs/{id} [PATCH]
Types ¶
type MixScopes ¶
type MixScopes struct { ZentaoProduct *models.ZentaoProduct `json:"product"` ZentaoProject *models.ZentaoProject `json:"project"` }
type ProductResponse ¶
type ProductResponse struct { Limit int `json:"limit"` Page int `json:"page"` Total int `json:"total"` Values []models.ZentaoProductRes `json:"products"` }
type ProductScopeReq ¶
type ProductScopeReq api.ScopeReq[models.ZentaoProduct]
type ProductScopeRes ¶
type ProductScopeRes struct { models.ZentaoProduct api.ScopeResDoc[models.ZentaoScopeConfig] }
type ProjectResponse ¶
type ProjectResponse struct { Limit int `json:"limit"` Page int `json:"page"` Total int `json:"total"` Values []models.ZentaoProject `json:"projects"` }
func (*ProjectResponse) ConvertFix ¶
func (pr *ProjectResponse) ConvertFix()
type ProjectScopeReq ¶
type ProjectScopeReq api.ScopeReq[models.ZentaoProject]
type ProjectScopeRes ¶
type ProjectScopeRes struct { models.ZentaoProject api.ScopeResDoc[models.ZentaoScopeConfig] }
type ZentaoTestConnResponse ¶
type ZentaoTestConnResponse struct { shared.ApiBody Connection *models.ZentaoConn }