api

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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 JenkinsConfig

type JenkinsConfig struct {
	JENKINS_ENDPOINT string `mapstructure:"JENKINS_ENDPOINT"`
	JENKINS_USERNAME string `mapstructure:"JENKINS_USERNAME"`
	JENKINS_PASSWORD string `mapstructure:"JENKINS_PASSWORD"`
}

type JenkinsSource

type JenkinsSource struct {
	ID       int
	Username string
	Password string
	Endpoint string
	Name     string
}

func GetSourceFromEnv

func GetSourceFromEnv() (*JenkinsSource, error)

Jump to

Keyboard shortcuts

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