gitlab

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllGroupMembers

func AllGroupMembers(c *gl.Client, gID int) []*gl.GroupMember

returns the list of all gitlab project members for the given gitlab group ID.

func AllGroups

func AllGroups(c *gl.Client) []*gl.Group

returns the list of all visible (per auth token) gitlab groups.

func AllLabels

func AllLabels(c *gl.Client, pID int) []*gl.Label

returns the list of all gitlab project labels for the given project ID.

func AllProjectTags

func AllProjectTags(c *gl.Client, pID int) []*gl.Tag

returns the list of all tags for the given gitlab project ID.

func AllProjects

func AllProjects(c *gl.Client, gID int) []*gl.Project

returns the list of all gitlab projects for the given gitlab group ID.

func FindGroup

func FindGroup(groups []*gl.Group, id int) *gl.Group

for the given collection of gitlab group finds the one with the given group id and returns it.

func GroupMaintainer

func GroupMaintainer(c *gl.Client, g *gl.Group, u *gl.User) bool

verifies the given gitlab user is a member of the given gitlab group and has at least maintainer permissions there.

func LatestTag

func LatestTag(c *gl.Client, p *gl.Project, cmd common.VerboseCommand) string

for the given gitlab project returns the latest (updated) tag.

func NewClient

func NewClient(creds *common.GitlabCredentials) *gl.Client

constructs a new gitlab client using the given credentials missing credentials will be taken from the current configurationq.

func ParseCIFile

func ParseCIFile(path string) (ci map[string]interface{})

attempts to read the gitlab CI file at the given path and returns an unmarshalled map of maps for it.

func UncheckForwardDeployment

func UncheckForwardDeployment(c *gl.Client, p *gl.Project) *gl.Project

for the given gitlab project sets the 'CI Forward Deployment' setting to false returns the gitlab project for chaining.

func WriteBaseCIFile

func WriteBaseCIFile(basePath string, refs *common.BlockRefs) string

writes the gitlab CI file at the given parent path using the given collection of building blocks. returns $basePath/$filename.

Types

type Projects

type Projects []*gl.Project

a collection of gitlab projects.

func AllBuildingBlocks

func AllBuildingBlocks(creds *common.GitlabCredentials) Projects

returns all existing building block gitlab projects for the given credentials object.

func (*Projects) MaxNameLen

func (ps *Projects) MaxNameLen() int

for this gitlab project collection returns the length of the longest name contained.

Jump to

Keyboard shortcuts

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