api

package
v0.10.1-test1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func DeleteIssueStatusMapping

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

DELETE /plugins/jira/sources/:sourceId/type-mappings/:userType/status-mappings/:userStatus

func DeleteIssueTypeMapping

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

DELETE /plugins/jira/sources/:sourceId/type-mappings/:userType

func DeleteSource

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

DELETE /plugins/jira/sources/:sourceId

func GetBoardsBySourceId

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

func GetEpicsBySourceId

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

func GetGranularitiesBySourceId

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

func GetSource

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

GET /plugins/jira/sources/:sourceId

{
	"name": "jira data source 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 source
		"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 Init added in v0.10.0

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

func ListIssueStatusMappings

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

GET /plugins/jira/sources/:sourceId/type-mappings/:userType/status-mappings

func ListIssueTypeMappings

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

GET /plugins/jira/sources/:sourceId/type-mappings

func ListSources

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

GET /plugins/jira/sources

func PostIssueStatusMappings

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

POST /plugins/jira/sources/:sourceId/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/sources/:sourceId/type-mappings

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

func PostSources

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

POST /plugins/jira/sources

{
	"name": "jira data source 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 source
		"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 Proxy

func PutIssueStatusMapping

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

PUT /plugins/jira/sources/:sourceId/type-mappings/:userType/status-mappings/:userStatus

{
	"standardStatus": "devlake standard status"
}

func PutIssueTypeMapping

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

PUT /plugins/jira/sources/:sourceId/type-mappings/:userType

{
	"standardType": "devlake standard type"
}

func PutSource

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

PUT /plugins/jira/sources/:sourceId

{
	"name": "jira data source 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 source
		"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 TestConnection added in v0.6.0

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

Types

type BoardResponse

type BoardResponse struct {
	Id    int
	Title string
	Value string
}

type EpicResponse

type EpicResponse struct {
	Id    int
	Title string
	Value string
}

GET /plugins/jira/sources/:sourceId/epics

type GranularitiesResponse

type GranularitiesResponse struct {
	Id    int
	Title string
	Value string
}

GET /plugins/jira/sources/:sourceId/granularities

type TestConnectionRequest added in v0.7.0

type TestConnectionRequest struct {
	Endpoint string `json:"endpoint"`
	Auth     string `json:"auth"`
	Proxy    string `json:"proxy"`
}

Jump to

Keyboard shortcuts

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