utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitCommand added in v0.0.7

func GitCommand(showProgress bool, workDir string, args ...string) ([]byte, error)

GitCommand wraps git command execution

Types

type GitlabClient

type GitlabClient struct {
	Client   *http.Client
	Endpoint *url.URL
	Group    string
	Token    string
}

GitlabClient implements methods to interace with a Gitlab instance

func NewGitlabClient

func NewGitlabClient(gitlabLink string) (*GitlabClient, error)

NewGitlabClient returns a GitlabClient

func (*GitlabClient) Authenticate

func (c *GitlabClient) Authenticate(username, password string) error

Authenticate authenticates against a Gitlab instance, storing the access_token

func (*GitlabClient) ListGroupProjects

func (c *GitlabClient) ListGroupProjects(projects chan interface{}) error

ListGroupProjects lists all projects within a group

func (*GitlabClient) ListGroupProjectsWithMax added in v0.0.5

func (c *GitlabClient) ListGroupProjectsWithMax(projects chan interface{}, sample int) error

ListGroupProjectsWithMax lists all projects within a group

type ListedProject

type ListedProject struct {
	Index   int
	Total   optionalInt
	Project gitlabProject
}

ListedProject wraps a gitlabProject with iteration status to be sent through the ListGroupProjects channel

Jump to

Keyboard shortcuts

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