api

package
v0.0.0-...-7d3b672 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeOut = 10 * time.Second
)

Variables

This section is empty.

Functions

func CreateScopeConfig

func CreateScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)

CreateScopeConfig create scope config for Tapd @Summary create scope config for Tapd @Description create scope config for Tapd @Tags plugins/tapd @Accept application/json @Param connectionId path int true "connectionId" @Param scopeConfig body models.TapdScopeConfig true "scope config" @Success 200 {object} models.TapdScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/tapd/connections/{connectionId}/scope-configs [POST]

func DeleteConnection

func DeleteConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)

@Summary delete a tapd connection @Description Delete a Tapd connection @Tags plugins/tapd @Success 200 {object} models.TapdConnection "Success" @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/tapd/connections/{connectionId} [DELETE]

func DeleteScope

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/tapd @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/tapd/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/tapd @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/tapd/connections/{connectionId}/scope-configs/{id} [DELETE]

func GetApiWorkspace

func GetApiWorkspace(op *tasks.TapdOptions, apiClient aha.ApiClientAbstract) (*models.TapdWorkspace, errors.Error)

func GetConnection

func GetConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)

@Summary get tapd connection detail @Description Get Tapd connection detail @Tags plugins/tapd @Success 200 {object} models.TapdConnection "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/tapd/connections/{connectionId} [GET]

func GetScope

GetScope get one tapd job @Summary get one tapd job @Description get one tapd job @Tags plugins/tapd @Param connectionId path int false "connection ID" @Param scopeId path string false "workspace ID" @Success 200 {object} ScopeRes @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/tapd/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/tapd @Param id path int true "id" @Param connectionId path int true "connectionId" @Success 200 {object} models.TapdScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/tapd/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/tapd @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.TapdScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/tapd/connections/{connectionId}/scope-configs [GET]

func GetScopeList

GetScopeList get tapd jobs @Summary get tapd jobs @Description get tapd jobs @Tags plugins/tapd @Param connectionId path int false "connection ID" @Param pageSize query int false "page size, default 50" @Param page query int false "page size, default 1" @Param blueprints query bool false "also return blueprints using these scopes as part of the payload" @Success 200 {object} []ScopeRes @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/tapd/connections/{connectionId}/scopes [GET]

func Init

func Init(br context.BasicRes, p plugin.PluginMeta)

func ListConnections

func ListConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)

@Summary get all tapd connections @Description Get all Tapd connections @Tags plugins/tapd @Success 200 {object} models.TapdConnection "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/tapd/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 tapd connection @Description Patch Tapd connection @Tags plugins/tapd @Param body body models.TapdConnection true "json body" @Success 200 {object} models.TapdConnection "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/tapd/connections/{connectionId} [PATCH]

func PostConnections

func PostConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)

@Summary create tapd connection @Description Create Tapd connection @Tags plugins/tapd @Param body body models.TapdConnection true "json body" @Success 200 {object} models.TapdConnection "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/tapd/connections [POST]

func PrepareFirstPageToken

func PrepareFirstPageToken(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)

PrepareFirstPageToken prepare first page token @Summary prepare first page token @Description prepare first page token @Tags plugins/tapd @Accept application/json @Param connectionId path int false "connection ID" @Param companyId query string false "company ID" @Success 200 {object} api.RemoteScopesOutput @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/tapd/connections/{connectionId}/remote-scopes-prepare-token [GET]

func PutScope

PutScope create or update tapd job @Summary create or update tapd job @Description Create or update tapd job @Tags plugins/tapd @Accept application/json @Param connectionId path int false "connection ID" @Param scope body ScopeReq true "json" @Success 200 {object} []models.TapdWorkspace @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/tapd/connections/{connectionId}/scopes [PUT]

func RemoteScopes

RemoteScopes list all available scope for users @Summary list all available scope for users @Description list all available scope for users @Tags plugins/tapd @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/tapd/connections/{connectionId}/remote-scopes [GET]

func TestConnection

func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)

@Summary test tapd connection @Description Test Tapd Connection @Tags plugins/tapd @Param body body models.TapdConn true "json body" @Success 200 {object} TapdTestConnResponse "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/tapd/test [POST]

func UpdateScope

UpdateScope patch to tapd job @Summary patch to tapd job @Description patch to tapd job @Tags plugins/tapd @Accept application/json @Param connectionId path int false "connection ID" @Param scopeId path string false "workspace ID" @Param scope body models.TapdWorkspace true "json" @Success 200 {object} models.TapdWorkspace @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/tapd/connections/{connectionId}/scopes/{scopeId} [PATCH]

func UpdateScopeConfig

func UpdateScopeConfig(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)

UpdateScopeConfig update scope config for Tapd @Summary update scope config for Tapd @Description update scope config for Tapd @Tags plugins/tapd @Accept application/json @Param id path int true "id" @Param connectionId path int true "connectionId" @Param scopeConfig body models.TapdScopeConfig true "scope config" @Success 200 {object} models.TapdScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/tapd/connections/{connectionId}/scope-configs/{id} [PATCH]

Types

type ScopeReq

type ScopeReq api.ScopeReq[models.TapdWorkspace]

type TapdTaskOptions

type TapdTaskOptions tasks.TapdOptions

type TapdTestConnResponse

type TapdTestConnResponse struct {
	shared.ApiBody
	Connection *models.TapdConn
}

Jump to

Keyboard shortcuts

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