Categorygithub.com/ronmi/gitlab
modulepackage
0.0.0-20160901030653-5431f1341d04
Repository: https://github.com/ronmi/gitlab.git
Documentation: pkg.go.dev

# README

gitlab

Build Status

GitLab API client for golang

Tests

To run tests, you will need a working GitLab server.

The test code needs several info of that GitLab server, passing via environment variables:

# personal access token
export PERSONAL_TOKEN="supersecret"
# server address
export SERVER_URL="http://127.0.0.1:3333"
# api path, should be /api/v3
export API_PATH="/api/v3"
# repository name, the repository must be a mirror of
#   https://gitlab.com/Ronmi/test-project.git
# The easiest way to obtain one is importing it into
# your GitLab server.
export REPO_PATH="root/test"
# repository id, you can find it at "Trggers" page in your project settings
export REPO_ID=2

go test ./...

# Packages

Package webhook defines payload format of GitLab webhook It also provides a simple wrapper for you to easily create applications handle webhooks.

# Functions

FromOAuth creates GitLab API client which authorized by oauth access token.
FromPAT creates GitLab API client which authorizes by personal access token.
ParsePagination extracts pagination info from http headers.
ParseTime parses time formats in api response.
RawClient creates non-wrapped GitLab API client.

# Constants

resource confliction.
action is not allowed for current user.
at least one required attribute is missing.
resource cannot be accessed.
action is not supported.
internal server error.
need authorization.
entity cannot be processed.

# Structs

Branch represents info of a branch.
Commit represents a commit in a repository.
CommitStats represents states of a commit.
GitLab maps all gitlab apis to method calls.
ListOption represents pagination related options.
Pagination represents pagination info from header.
ProjectHookOption represents optional parameters needed for AddProjectHook.
User represents info of a user.
UserIdentity represents an external identity of a user.
Webhook represents a project hook.

# Interfaces

APIOption abstracts all options, so we're easier to construct requests.

# Type aliases

No description provided by the author