gitlabclient

package
v0.0.0-...-73116f3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2017 by Christian Hüning (christianhuening@googlemail.com).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const UserStateBlocked = "blocked"

Variables

This section is empty.

Functions

func SetupK8sIntegrationForGitlabProject

func SetupK8sIntegrationForGitlabProject(projectId, namespace, token string)

func TranslateIntAccessLevels

func TranslateIntAccessLevels(lvl int) string

From: https://docs.gitlab.com/ee/api/members.html 10 => Guest access 20 => Reporter access 30 => Developer access 40 => Maintainer access 50 => Owner access # Only valid for groups

Types

type ErrorMessage

type ErrorMessage struct {
	Message Msg
}

type GitlabContent

type GitlabContent struct {
	Groups   []GitlabGroup
	Projects []GitlabProject
	Users    []GitlabUser
}

func GetFullGitlabContent

func GetFullGitlabContent() (*GitlabContent, error)

type GitlabGroup

type GitlabGroup struct {
	Id       int
	FullPath string `json:"full_path"`
	Members  []Member
}

func GetAllGroups

func GetAllGroups(gitlabGroups []GitlabGroup, url string) ([]GitlabGroup, error)

type GitlabProject

type GitlabProject struct {
	Id                int
	PathWithNameSpace string `json:"path_with_namespace"`
	Members           []Member
	Links             Links     `json:"_links"`
	Namespace         Namespace `json:"namespace"`
	Path              string    `json:"path"`
}

func GetAllProjects

func GetAllProjects(gitlabProjects []GitlabProject, url string) ([]GitlabProject, error)

type GitlabUser

type GitlabUser struct {
	Username string `json:"username"`
	State    string `json:"state"`
}

func GetAllUsers

func GetAllUsers(gitlabUsers []GitlabUser, url string) ([]GitlabUser, error)
type Links struct {
	Members string
}

type Member

type Member struct {
	Id          int    `json:"id"`
	Username    string `json:"username"`
	Name        string `json:"name"`
	State       string `json:"state"`
	AccessLevel int    `json:"access_level"`
}

type Msg

type Msg struct {
	Name []string
	Slug []string
}

type Namespace

type Namespace struct {
	Id       int
	Name     string
	Path     string
	Kind     string
	FullPath string
}

Jump to

Keyboard shortcuts

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