api

package
v0.11.0-test11 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: Apache-2.0 Imports: 18 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)

DELETE /plugins/jira/connections/:connectionId

func DeleteIssueStatusMapping

func DeleteIssueStatusMapping(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

DELETE /plugins/jira/connections/:connectionId/type-mappings/:userType/status-mappings/:userStatus

func DeleteIssueTypeMapping

func DeleteIssueTypeMapping(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

DELETE /plugins/jira/connections/:connectionId/type-mappings/:userType

func GetBoardsByConnectionId

func GetBoardsByConnectionId(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

GET /plugins/jira/connections/:connectionId/boards

func GetConnection

func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

GET /plugins/jira/connections/:connectionId

{
	"name": "jira data connection name",
	"endpoint": "jira api endpoint, i.e. https://merico.atlassian.net/rest",
	"basicAuthEncoded": "generated by `echo -n <jira login email>:<jira token> | base64`",
	"epicKeyField": "name of customfield of epic key",
	"storyPointField": "name of customfield of story point",
	"typeMappings": { // optional, send empty object to delete all typeMappings of the data connection
		"userType": {
			"standardType": "devlake standard type",
			"statusMappings": {  // optional, send empt object to delete all status mapping for the user type
				"userStatus": {
					"standardStatus": "devlake standard status"
				}
			}
		}
	}
}

func GetEpicsByConnectionId

func GetEpicsByConnectionId(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

GET /plugins/jira/connections/:connectionId/epics

func GetGranularitiesByConnectionId

func GetGranularitiesByConnectionId(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

func Init

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

func ListConnections

func ListConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

GET /plugins/jira/connections

func ListIssueStatusMappings

func ListIssueStatusMappings(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

GET /plugins/jira/connections/:connectionId/type-mappings/:userType/status-mappings

func ListIssueTypeMappings

func ListIssueTypeMappings(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

GET /plugins/jira/connections/:connectionId/type-mappings

func PatchConnection

func PatchConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

PATCH /plugins/jira/connections/:connectionId

{
	"name": "jira data connection name",
	"endpoint": "jira api endpoint, i.e. https://merico.atlassian.net/rest",
	"basicAuthEncoded": "generated by `echo -n <jira login email>:<jira token> | base64`",
	"epicKeyField": "name of customfield of epic key",
	"storyPointField": "name of customfield of story point",
	"typeMappings": { // optional, send empty object to delete all typeMappings of the data connection
		"userType": {
			"standardType": "devlake standard type",
			"statusMappings": {  // optional, send empt object to delete all status mapping for the user type
				"userStatus": {
					"standardStatus": "devlake standard status"
				}
			}
		}
	}
}

func PostConnections

func PostConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

POST /plugins/jira/connections

{
	"name": "jira data connection name",
	"endpoint": "jira api endpoint, i.e. https://merico.atlassian.net/rest",
	"basicAuthEncoded": "generated by `echo -n <jira login email>:<jira token> | base64`",
	"epicKeyField": "name of customfield of epic key",
	"storyPointField": "name of customfield of story point",
	"typeMappings": { // optional, send empty object to delete all typeMappings of the data connection
		"userType": {
			"standardType": "devlake standard type",
			"statusMappings": {  // optional, send empt object to delete all status mapping for the user type
				"userStatus": {
					"standardStatus": "devlake standard status"
				}
			}
		}
	}
}

func PostIssueStatusMappings

func PostIssueStatusMappings(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

POST /plugins/jira/connections/:connectionId/type-mappings/:userType/status-mappings

{
	"userStatus": "user custom status",
	"standardStatus": "devlake standard status"
}

func PostIssueTypeMappings

func PostIssueTypeMappings(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

POST /plugins/jira/connections/:connectionId/type-mappings

{
	"userType": "user custom type",
	"standardType": "devlake standard type"
}

func Proxy

func PutIssueStatusMapping

func PutIssueStatusMapping(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

PUT /plugins/jira/connections/:connectionId/type-mappings/:userType/status-mappings/:userStatus

{
	"standardStatus": "devlake standard status"
}

func PutIssueTypeMapping

func PutIssueTypeMapping(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

PUT /plugins/jira/connections/:connectionId/type-mappings/:userType

{
	"standardType": "devlake standard type"
}

func TestConnection

func TestConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)

Types

type GranularitiesResponse

type GranularitiesResponse struct {
	Id    int
	Title string
	Value string
}

GET /plugins/jira/connections/:connectionId/granularities

Jump to

Keyboard shortcuts

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