utils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskCredentials

func AskCredentials() (string, string, error)

AskCredentials prompts for username and password

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

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