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/gitlab/connections/:connectionId

func ListConnections

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

GET /plugins/gitlab/connections

func PutConnection

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

PUT /plugins/gitlab/connections/:connectionId

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 GitlabConnection

type GitlabConnection 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 GitlabResponse

type GitlabResponse struct {
	Name string
	ID   int
	GitlabConnection
}

This object conforms to what the frontend currently expects.

func GetConnectionFromEnv

func GetConnectionFromEnv() (*GitlabResponse, error)

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