api

package
v0.11.0-test1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnection

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

GET /plugins/github/connections/:connectionId

func ListConnections

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

GET /plugins/github/connections

func PutConnection

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

PUT /plugins/github/connections/:connectionId

func TestConnection added in v0.6.0

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

POST /plugins/github/test

Types

type ApiUserPublicEmailResponse added in v0.6.0

type ApiUserPublicEmailResponse []PublicEmail

type GithubConnection

type GithubConnection struct {
	Endpoint string `mapstructure:"GITHUB_ENDPOINT" validate:"required"`
	Auth     string `mapstructure:"GITHUB_AUTH" validate:"required"`
	Proxy    string `mapstructure:"GITHUB_PROXY"`

	PrType               string `mapstructure:"GITHUB_PR_TYPE"`
	PrComponent          string `mapstructure:"GITHUB_PR_COMPONENT"`
	IssueSeverity        string `mapstructure:"GITHUB_ISSUE_SEVERITY"`
	IssuePriority        string `mapstructure:"GITHUB_ISSUE_PRIORITY"`
	IssueComponent       string `mapstructure:"GITHUB_ISSUE_COMPONENT"`
	IssueTypeBug         string `mapstructure:"GITHUB_ISSUE_TYPE_BUG"`
	IssueTypeIncident    string `mapstructure:"GITHUB_ISSUE_TYPE_INCIDENT"`
	IssueTypeRequirement string `mapstructure:"GITHUB_ISSUE_TYPE_REQUIREMENT"`
}

This object conforms to what the frontend currently sends.

type GithubResponse

type GithubResponse struct {
	Name string
	ID   int

	GithubConnection
}

This object conforms to what the frontend currently expects.

func GetConnectionFromEnv

func GetConnectionFromEnv() (*GithubResponse, error)

type PublicEmail added in v0.6.0

type PublicEmail struct {
	Email      string
	Primary    bool
	Verified   bool
	Visibility string
}

Using Public Email because it requires authentication, and it is public information anyway. We're not using email information for anything here.

type TestConnectionRequest added in v0.9.0

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

Jump to

Keyboard shortcuts

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