gitlabci

package
v0.0.0-...-31c8788 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const BackendName = "gitlabci"

BackendName name

Variables

This section is empty.

Functions

This section is empty.

Types

type GitlabCI

type GitlabCI struct {
	URL                *jsontypes.URL     `json:"url,omitempty"`
	Timeout            jsontypes.Duration `json:"timeout,omitempty"`
	Username           string             `json:"username,omitempty"`
	InsecureSkipVerify bool               `json:"insecure_skip_verify,omitempty"`
}

GitlabCI backend provides authentication against gitlab paths, primarily to make it easier to dynamically authenticate the gitlab-ci against gitlab permitting testing access to otherwise private resources without storing credentials in gitlab or gitlab-ci.yml

Authenticating against this backend should be done with the project path as the username and the token as the password.

Example: docker login docker.example.com -u "$CI_PROJECT_PATH" -p "$CI_BUILD_TOKEN"

func NewDriver

func NewDriver() *GitlabCI

NewDriver returns a GitlabCI instance with some defaults

func (GitlabCI) Authenticate

func (h GitlabCI) Authenticate(r *http.Request) (string, error)

Authenticate fulfils the backend interface

func (GitlabCI) Validate

func (h GitlabCI) Validate() error

Validate that this module is ready to go

Jump to

Keyboard shortcuts

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