values

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NoGitLabCredentialsError = errors.New("there is neither a CI_JOB_TOKEN nor GITLAB_TOKEN set." +
		" Please go to your GitLab profile page and create yourself a token with at least the permission" +
		" `read_api` and store it as environment variables GITLAB_TOKEN=<created_token>" +
		" ; For more details refer: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html")
)

Functions

func RequireValue

func RequireValue(name string, replacements ...string) (result string)

func Value

func Value(name, def string, replacements ...string) (result string)

Types

type GitLabCredentials

type GitLabCredentials struct {
	Type  GitLabCredentialsType
	Token string
}

func GetGitLabCredentials

func GetGitLabCredentials() (GitLabCredentials, error)

func MustGetGitLabCredentials

func MustGetGitLabCredentials() GitLabCredentials

func (GitLabCredentials) BeforeRequest

func (instance GitLabCredentials) BeforeRequest(ctx context.Context, req *http.Request) (context.Context, *http.Request, error)

func (GitLabCredentials) Self

func (instance GitLabCredentials) Self() mhttp.Plugin

type GitLabCredentialsType

type GitLabCredentialsType string
const (
	GitLabJobToken     GitLabCredentialsType = "Job-Token"
	GitLabPrivateToken GitLabCredentialsType = "Private-Token"
)

Jump to

Keyboard shortcuts

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