utils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindConfig added in v0.0.5

func FindConfig(path string) (string, error)

FindConfig will return the first .gitgroup file that it finds going up the directory tree

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<- ListedProject) error

ListGroupProjects lists all projects within a group

func (*GitlabClient) ListGroupProjectsWithMax added in v0.0.5

func (c *GitlabClient) ListGroupProjectsWithMax(projects chan<- ListedProject, sample int) error

ListGroupProjectsWithMax lists all projects within a group

type ListedProject

type ListedProject struct {
	Index   int
	Total   string
	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