client

package
v0.77.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// GITLABDOMAIN defines the default gitlab url
	GITLABDOMAIN string = "gitlab.com"
)

Variables

This section is empty.

Functions

func EnsureValidURL added in v0.47.2

func EnsureValidURL(u string) string

Types

type Client

type Client *scm.Client

func New

func New(s Spec) (Client, error)

type Spec

type Spec struct {
	//  "url" defines the GitLab url to interact with
	//
	//  default:
	//     "gitlab.com"
	URL string `yaml:",omitempty"`
	//  "username" defines the username used to authenticate with GitLab
	Username string `yaml:",omitempty"`
	//  "token" defines the credential used to authenticate with GitLab
	//
	//  remark:
	//    A token is a sensitive information, it's recommended to not set this value directly in the configuration file
	//    but to use an environment variable or a SOPS file.
	//
	//    The value can be set to `{{ requiredEnv "GITLAB_TOKEN"}}` to retrieve the token from the environment variable `GITHUB_TOKEN`
	//	  or `{{ .gitlab.token }}` to retrieve the token from a SOPS file.
	//
	//	  For more information, about a SOPS file, please refer to the following documentation:
	//    https://github.com/getsops/sops
	Token string `yaml:",omitempty"`
}

Spec defines a specification for a "GitLab" resource parsed from an updatecli manifest file

Jump to

Keyboard shortcuts

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