api

package
v0.10.0-test1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSource

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

GET /plugins/jenkins/sources/:sourceId

func ListSources

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

GET /plugins/jenkins/sources

func PostSource

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

POST /plugins/jenkins/sources

{
	"Endpoint": "your-endpoint",
	"Username": "your-username",
	"Password": "your-password",
}

func PutSource

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

PUT /plugins/jenkins/sources/:sourceId

{
	"Endpoint": "your-endpoint",
	"Username": "your-username",
	"Password": "your-password",
}

func TestConnection added in v0.6.0

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

Types

type JenkinsResponse added in v0.9.0

type JenkinsResponse struct {
	ID   int
	Name string
	JenkinsSource
}

func GetSourceFromEnv

func GetSourceFromEnv() (*JenkinsResponse, error)

type JenkinsSource

type JenkinsSource struct {
	Endpoint string `mapstructure:"JENKINS_ENDPOINT" validate:"required"`
	Username string `mapstructure:"JENKINS_USERNAME" validate:"required"`
	Password string `mapstructure:"JENKINS_PASSWORD" validate:"required"`
	Proxy    string `mapstructure:"JENKINS_PROXY"`
}

This object conforms to what the frontend currently sends.

type TestConnectionRequest added in v0.10.0

type TestConnectionRequest struct {
	Endpoint string `json:"endpoint" validate:"required"`
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
	Proxy    string `json:"proxy"`
}

Jump to

Keyboard shortcuts

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