api

package
v0.13.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func DeleteConnection

func DeleteConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, 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 GetConnection

func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, 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 Init

func Init(config *viper.Viper, logger core.Logger, database *gorm.DB)

func ListConnections

func ListConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, 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 MakePipelinePlan added in v0.12.0

func MakePipelinePlan(subtaskMetas []core.SubTaskMeta, connectionId uint64, scope []*core.BlueprintScopeV100) (core.PipelinePlan, error)

func PatchConnection

func PatchConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, 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, 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 Proxy

func TestConnection

func TestConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, 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]

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 TicketTransformationRules `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 TicketTransformationRules `json:"transformationRules"`
	} `json:"options"`
}

type TicketTransformationRules

type TicketTransformationRules struct {
	EpicKeyField               string `json:"epicKeyField"`
	StoryPointField            string `json:"storyPointField"`
	RemotelinkCommitShaPattern string `json:"remotelinkCommitShaPattern"`
	TypeMappings               map[string]struct {
		StandardType string `json:"standardType"`
	} `json:"typeMappings"`
}

Jump to

Keyboard shortcuts

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