Documentation ¶
Index ¶
- func AllGroupMembers(cmd common.ConfiguredCommand, c *gl.Client, gID int) []*gl.GroupMember
- func AllGroups(cmd common.ConfiguredCommand, c *gl.Client) []*gl.Group
- func AllLabels(cmd common.ConfiguredCommand, c *gl.Client, pID int) []*gl.Label
- func AllProjectTags(cmd common.ConfiguredCommand, c *gl.Client, pID int) []*gl.Tag
- func AllProjects(cmd common.ConfiguredCommand, c *gl.Client, gID int) []*gl.Project
- func AllUserProjects(cmd common.ConfiguredCommand, c *gl.Client, uID int) []*gl.Project
- func CurrentInstance(cmd common.ConfiguredCommand, creds *common.GitlabCredentials) (string, error)
- func CurrentUser(cmd common.ConfiguredCommand, creds *common.GitlabCredentials) (*gl.User, error)
- func EnsureRepoPath(cmd common.ConfiguredCommand, creds *common.GitlabCredentials, usr *gl.User, ...) string
- func FindGroup(groups []*gl.Group, id int) *gl.Group
- func FindProject(prs Projects, name string) *gl.Project
- func GroupMaintainer(cmd common.ConfiguredCommand, c *gl.Client, g *gl.Group, u *gl.User) bool
- func LatestTag(cmd common.ConfiguredCommand, c *gl.Client, p *gl.Project) string
- func NewClient(cmd common.ConfiguredCommand, creds *common.GitlabCredentials) *gl.Client
- func ParseCIFile(path string) (ci map[string]interface{})
- func SelectConfigRepo(cmd common.ConfiguredCommand, r *common.RepoInfo)
- func SelectedConfigRepo(cmd common.ConfiguredCommand, creds *common.GitlabCredentials) (*common.RepoInfo, error)
- func UncheckForwardDeployment(c *gl.Client, p *gl.Project) *gl.Project
- func WriteBaseCIFile(basePath string, refs *common.BlockRefs) string
- type Projects
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllGroupMembers ¶
func AllGroupMembers(cmd common.ConfiguredCommand, c *gl.Client, gID int) []*gl.GroupMember
returns the list of all gitlab project members for the given gitlab group ID.
func AllProjectTags ¶
returns the list of all tags for the given gitlab project ID.
func AllProjects ¶
returns the list of all gitlab projects for the given gitlab group ID.
func AllUserProjects ¶ added in v0.5.0
returns the list of all personal gitlab projects for the given user ID.
func CurrentInstance ¶ added in v0.6.0
func CurrentInstance(cmd common.ConfiguredCommand, creds *common.GitlabCredentials) (string, error)
returns the current instance name if configured.
func CurrentUser ¶ added in v0.6.0
func CurrentUser(cmd common.ConfiguredCommand, creds *common.GitlabCredentials) (*gl.User, error)
returns the current gitlab user if configured.
func EnsureRepoPath ¶ added in v0.6.0
func EnsureRepoPath(cmd common.ConfiguredCommand, creds *common.GitlabCredentials, usr *gl.User, grp *gl.Group, prj *gl.Project) string
for the given configuration and project by user in group returns the local path to the clone, which is: $LOCAL_BASEDIR/.config/mkactl/repo/${address_from_current_context_urlencoded}/${user_id}/${group_id_or_0}/${project_path}
the address value in the config context of the provided command must not be nil the provided group may be nil for personal projects usr.ID and prj.Path must not be nil.
func FindGroup ¶
for the given collection of gitlab groups finds the one with the given group id and returns it.
func FindProject ¶ added in v0.4.0
for the given collection of gitlab projects finds the one with the given name and returns it.
func GroupMaintainer ¶
verifies the given gitlab user is a member of the given gitlab group and has at least maintainer permissions there.
func NewClient ¶
func NewClient(cmd common.ConfiguredCommand, 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 ¶
attempts to read the gitlab CI file at the given path and returns an unmarshalled map of maps for it.
func SelectConfigRepo ¶ added in v0.6.0
func SelectConfigRepo(cmd common.ConfiguredCommand, r *common.RepoInfo)
sets the given string as the selected repository in the configuration and writes the configuration to the currently used config file.
func SelectedConfigRepo ¶ added in v0.6.0
func SelectedConfigRepo(cmd common.ConfiguredCommand, creds *common.GitlabCredentials) (*common.RepoInfo, error)
returns the currently selected repository from the current configuration.
func UncheckForwardDeployment ¶
for the given gitlab project sets the 'CI Forward Deployment' setting to false returns the gitlab project for chaining.
Types ¶
type Projects ¶
a collection of gitlab projects.
func AllBuildingBlocks ¶
func AllBuildingBlocks(cmd common.ConfiguredCommand, creds *common.GitlabCredentials) Projects
returns all existing building block gitlab projects for the given credentials object.
func (*Projects) MaxNameLen ¶
for this gitlab project collection returns the length of the longest name contained NB: "project name" actually always refers to gitlab.Project.Path.