api

package
v0.15.0-zentao-beta-5 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 13 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, 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 500 {string} errcode.Error "Internel Error" @Router /plugins/tapd/connections/{connectionId} [DELETE]

func GetConnection

func GetConnection(input *core.ApiResourceInput) (*core.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 "Internel Error" @Router /plugins/tapd/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, 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 "Internel Error" @Router /plugins/tapd/connections [GET]

func PatchConnection

func PatchConnection(input *core.ApiResourceInput) (*core.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 "Internel Error" @Router /plugins/tapd/connections/{connectionId} [PATCH]

func PostConnections

func PostConnections(input *core.ApiResourceInput) (*core.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 "Internel Error" @Router /plugins/tapd/connections [POST]

func TestConnection

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

@Summary test tapd connection @Description Test Tapd Connection @Tags plugins/tapd @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/tapd/test [POST]

Types

type StatusMappings added in v0.14.2

type StatusMappings struct {
	TodoStatus       []string `json:"todoStatus"`
	InProgressStatus []string `json:"inprogressStatus"`
	DoneStatus       []string `json:"doneStatus"`
}

type TapdBlueprintSetting added in v0.14.0

type TapdBlueprintSetting []struct {
	Version     string `json:"version"`
	Connections []struct {
		Plugin       string `json:"plugin"`
		ConnectionID int    `json:"connectionId"`
		Scope        []struct {
			Options struct {
				WorkspaceId         uint64   `mapstruct:"workspaceId"`
				CompanyId           uint64   `mapstruct:"companyId"`
				Tasks               []string `mapstruct:"tasks,omitempty"`
				Since               string
				TransformationRules TransformationRules `json:"transformationRules"`
			} `json:"options"`
			Entities []string `json:"entities"`
		} `json:"scope"`
	} `json:"connections"`
}

type TapdPipelinePlan added in v0.14.0

type TapdPipelinePlan [][]struct {
	Plugin   string   `json:"plugin"`
	Subtasks []string `json:"subtasks"`
	Options  struct {
		ConnectionId        uint64   `mapstruct:"connectionId"`
		WorkspaceId         uint64   `mapstruct:"workspaceId"`
		CompanyId           uint64   `mapstruct:"companyId"`
		Tasks               []string `mapstruct:"tasks,omitempty"`
		Since               string
		TransformationRules TransformationRules `json:"transformationRules"`
	} `json:"options"`
}

type TransformationRules added in v0.14.2

type TransformationRules struct {
	TypeMappings   TypeMappings   `json:"typeMappings"`
	StatusMappings StatusMappings `json:"statusMappings"`
}

type TypeMapping added in v0.14.2

type TypeMapping struct {
	StandardType string `json:"standardType"`
}

type TypeMappings added in v0.14.2

type TypeMappings map[string]TypeMapping

Jump to

Keyboard shortcuts

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