api

package
v0.15.1-beta3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0, MIT Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTransformationRule added in v0.15.0

func CreateTransformationRule(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

CreateTransformationRule create transformation rule for Jira @Summary create transformation rule for Jira @Description create transformation rule for Jira @Tags plugins/jira @Accept application/json @Param transformationRule body tasks.JiraTransformationRule true "transformation rule" @Success 200 {object} tasks.JiraTransformationRule @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jira/transformation_rules [POST]

func DeleteConnection

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

@Summary delete a jira connection @Description Delete a Jira connection @Tags plugins/jira @Success 200 {object} models.JiraConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/jira/connections/{connectionId} [DELETE]

func GetApiJira added in v0.15.0

func GetApiJira(op *tasks.JiraOptions, apiClient helper.ApiClientGetter) (*apiv2models.Board, errors.Error)

func GetConnection

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

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

func GetScope added in v0.15.0

GetScope get one Jira board @Summary get one Jira board @Description get one Jira board @Tags plugins/jira @Param connectionId path int false "connection ID" @Param boardId path int false "board ID" @Success 200 {object} models.JiraBoard @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jira/connections/{connectionId}/scopes/{boardId} [GET]

func GetScopeList added in v0.15.0

func GetScopeList(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

GetScopeList get Jira boards @Summary get Jira boards @Description get Jira boards @Tags plugins/jira @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" @Success 200 {object} []apiBoard @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jira/connections/{connectionId}/scopes/ [GET]

func GetTransformationRule added in v0.15.0

func GetTransformationRule(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

GetTransformationRule return one transformation rule @Summary return one transformation rule @Description return one transformation rule @Tags plugins/jira @Param id path int true "id" @Success 200 {object} tasks.JiraTransformationRule @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jira/transformation_rules/{id} [GET]

func GetTransformationRuleList added in v0.15.0

func GetTransformationRuleList(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

GetTransformationRuleList return all transformation rules @Summary return all transformation rules @Description return all transformation rules @Tags plugins/jira @Param pageSize query int false "page size, default 50" @Param page query int false "page size, default 1" @Success 200 {object} []tasks.JiraTransformationRule @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jira/transformation_rules [GET]

func Init

func Init(br core.BasicRes)

func ListConnections

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

@Summary get all jira connections @Description Get all Jira connections @Tags plugins/jira @Success 200 {object} []models.JiraConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/jira/connections [GET]

func MakeDataSourcePipelinePlanV200 added in v0.15.0

func MakeDataSourcePipelinePlanV200(subtaskMetas []core.SubTaskMeta, connectionId uint64, bpScopes []*core.BlueprintScopeV200, syncPolicy *core.BlueprintSyncPolicy) (core.PipelinePlan, []core.Scope, errors.Error)

func MakePipelinePlanV100 added in v0.15.0

func MakePipelinePlanV100(subtaskMetas []core.SubTaskMeta, connectionId uint64, scope []*core.BlueprintScopeV100) (core.PipelinePlan, errors.Error)

func PatchConnection

func PatchConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

@Summary patch jira connection @Description Patch Jira connection @Tags plugins/jira @Param body body models.JiraConnection true "json body" @Success 200 {object} models.JiraConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/jira/connections/{connectionId} [PATCH]

func PostConnections

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

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

func PutScope added in v0.15.0

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

func TestConnection

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

@Summary test jira connection @Description Test Jira Connection @Tags plugins/jira @Param body body models.TestConnectionRequest true "json body" @Success 200 {object} shared.ApiBody "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/jira/test [POST]

func UpdateScope added in v0.15.0

func UpdateScope(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

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

func UpdateTransformationRule added in v0.15.0

func UpdateTransformationRule(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

UpdateTransformationRule update transformation rule for Jira @Summary update transformation rule for Jira @Description update transformation rule for Jira @Tags plugins/jira @Accept application/json @Param id path int true "id" @Param transformationRule body tasks.JiraTransformationRule true "transformation rule" @Success 200 {object} tasks.JiraTransformationRule @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jira/transformation_rules/{id} [PATCH]

Types

type JiraBlueprintSetting added in v0.14.0

type JiraBlueprintSetting []struct {
	Version     string `json:"version"`
	Connections []struct {
		Plugin       string `json:"plugin"`
		ConnectionID int    `json:"connectionId"`
		Scope        []struct {
			Transformation tasks.JiraTransformationRule `json:"transformation"`
			Options        struct {
				BoardId uint64 `json:"boardId"`
				Since   string `json:"since"`
			} `json:"options"`
			Entities []string `json:"entities"`
		} `json:"scope"`
	} `json:"connections"`
}

type JiraPipelinePlan added in v0.14.0

type JiraPipelinePlan [][]struct {
	Plugin   string   `json:"plugin"`
	Subtasks []string `json:"subtasks"`
	Options  struct {
		BoardID             int                          `json:"boardId"`
		ConnectionID        int                          `json:"connectionId"`
		TransformationRules tasks.JiraTransformationRule `json:"transformationRules"`
	} `json:"options"`
}

Jump to

Keyboard shortcuts

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