api

package
v0.10.0-k8s3 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: 8 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/gitlab/sources/:sourceId

func ListSources

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

GET /plugins/gitlab/sources

func PutSource

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

PUT /plugins/gitlab/sources/:sourceId

func TestConnection added in v0.6.0

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

POST /plugins/gitlab/test

Types

type ApiUserResponse added in v0.6.0

type ApiUserResponse struct {
	Id   int
	Name string
}

Using User because it requires authentication.

type GitlabResponse

type GitlabResponse struct {
	Name string
	ID   int
	GitlabSource
}

This object conforms to what the frontend currently expects.

func GetSourceFromEnv

func GetSourceFromEnv() (*GitlabResponse, error)

type GitlabSource

type GitlabSource struct {
	Endpoint string `mapstructure:"GITLAB_ENDPOINT" validate:"required"`
	Auth     string `mapstructure:"GITLAB_AUTH" validate:"required"`
	Proxy    string `mapstructure:"GITLAB_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"`
	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