Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
e9d0a58e
Commit
e9d0a58e
authored
May 21, 2017
by
Sander van Harmelen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing field to ListTreeOptions
parent
df6c9365
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
repositories.go
repositories.go
+15
-19
No files found.
repositories.go
View file @
e9d0a58e
...
...
@@ -25,16 +25,14 @@ import (
// RepositoriesService handles communication with the repositories related
// methods of the GitLab API.
//
// GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html
type
RepositoriesService
struct
{
client
*
Client
}
// TreeNode represents a GitLab repository file or directory.
//
// GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html
type
TreeNode
struct
{
ID
string
`json:"id"`
Name
string
`json:"name"`
...
...
@@ -50,17 +48,17 @@ func (t TreeNode) String() string {
// ListTreeOptions represents the available ListTree() options.
//
// GitLab API docs:
// https://
gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
#list-repository-tree
// https://
docs.gitlab.com/ce/api/repositories.html
#list-repository-tree
type
ListTreeOptions
struct
{
Path
*
string
`url:"path,omitempty" json:"path,omitempty"`
Ref
Name
*
string
`url:"ref_name,omitempty" json:"ref_name
,omitempty"`
Ref
*
string
`url:"ref,omitempty" json:"ref
,omitempty"`
Recursive
*
bool
`url:"recursive,omitempty" json:"recursive,omitempty"`
}
// ListTree gets a list of repository files and directories in a project.
//
// GitLab API docs:
// https://
gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
#list-repository-tree
// https://
docs.gitlab.com/ce/api/repositories.html
#list-repository-tree
func
(
s
*
RepositoriesService
)
ListTree
(
pid
interface
{},
opt
*
ListTreeOptions
,
options
...
OptionFunc
)
([]
*
TreeNode
,
*
Response
,
error
)
{
project
,
err
:=
parseID
(
pid
)
if
err
!=
nil
{
...
...
@@ -85,7 +83,7 @@ func (s *RepositoriesService) ListTree(pid interface{}, opt *ListTreeOptions, op
// RawFileContentOptions represents the available RawFileContent() options.
//
// GitLab API docs:
// https://
gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
#raw-file-content
// https://
docs.gitlab.com/ce/api/repositories.html
#raw-file-content
type
RawFileContentOptions
struct
{
FilePath
*
string
`url:"filepath,omitempty" json:"filepath,omitempty"`
}
...
...
@@ -93,7 +91,7 @@ type RawFileContentOptions struct {
// RawFileContent gets the raw file contents for a file by commit SHA and path
//
// GitLab API docs:
// https://
gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
#raw-file-content
// https://
docs.gitlab.com/ce/api/repositories.html
#raw-file-content
func
(
s
*
RepositoriesService
)
RawFileContent
(
pid
interface
{},
sha
string
,
opt
*
RawFileContentOptions
,
options
...
OptionFunc
)
([]
byte
,
*
Response
,
error
)
{
project
,
err
:=
parseID
(
pid
)
if
err
!=
nil
{
...
...
@@ -118,7 +116,7 @@ func (s *RepositoriesService) RawFileContent(pid interface{}, sha string, opt *R
// RawBlobContent gets the raw file contents for a blob by blob SHA.
//
// GitLab API docs:
// https://
gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
#raw-blob-content
// https://
docs.gitlab.com/ce/api/repositories.html
#raw-blob-content
func
(
s
*
RepositoriesService
)
RawBlobContent
(
pid
interface
{},
sha
string
,
options
...
OptionFunc
)
([]
byte
,
*
Response
,
error
)
{
project
,
err
:=
parseID
(
pid
)
if
err
!=
nil
{
...
...
@@ -143,7 +141,7 @@ func (s *RepositoriesService) RawBlobContent(pid interface{}, sha string, option
// ArchiveOptions represents the available Archive() options.
//
// GitLab API docs:
// https://
gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
#get-file-archive
// https://
docs.gitlab.com/ce/api/repositories.html
#get-file-archive
type
ArchiveOptions
struct
{
SHA
*
string
`url:"sha,omitempty" json:"sha,omitempty"`
}
...
...
@@ -151,7 +149,7 @@ type ArchiveOptions struct {
// Archive gets an archive of the repository.
//
// GitLab API docs:
// https://
gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
#get-file-archive
// https://
docs.gitlab.com/ce/api/repositories.html
#get-file-archive
func
(
s
*
RepositoriesService
)
Archive
(
pid
interface
{},
opt
*
ArchiveOptions
,
options
...
OptionFunc
)
([]
byte
,
*
Response
,
error
)
{
project
,
err
:=
parseID
(
pid
)
if
err
!=
nil
{
...
...
@@ -176,7 +174,7 @@ func (s *RepositoriesService) Archive(pid interface{}, opt *ArchiveOptions, opti
// Compare represents the result of a comparison of branches, tags or commits.
//
// GitLab API docs:
// https://
gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
#compare-branches-tags-or-commits
// https://
docs.gitlab.com/ce/api/repositories.html
#compare-branches-tags-or-commits
type
Compare
struct
{
Commit
*
Commit
`json:"commit"`
Commits
[]
*
Commit
`json:"commits"`
...
...
@@ -192,7 +190,7 @@ func (c Compare) String() string {
// CompareOptions represents the available Compare() options.
//
// GitLab API docs:
// https://
gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
#compare-branches-tags-or-commits
// https://
docs.gitlab.com/ce/api/repositories.html
#compare-branches-tags-or-commits
type
CompareOptions
struct
{
From
*
string
`url:"from,omitempty" json:"from,omitempty"`
To
*
string
`url:"to,omitempty" json:"to,omitempty"`
...
...
@@ -201,7 +199,7 @@ type CompareOptions struct {
// Compare compares branches, tags or commits.
//
// GitLab API docs:
// https://
gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
#compare-branches-tags-or-commits
// https://
docs.gitlab.com/ce/api/repositories.html
#compare-branches-tags-or-commits
func
(
s
*
RepositoriesService
)
Compare
(
pid
interface
{},
opt
*
CompareOptions
,
options
...
OptionFunc
)
(
*
Compare
,
*
Response
,
error
)
{
project
,
err
:=
parseID
(
pid
)
if
err
!=
nil
{
...
...
@@ -225,8 +223,7 @@ func (s *RepositoriesService) Compare(pid interface{}, opt *CompareOptions, opti
// Contributor represents a GitLap contributor.
//
// GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#contributer
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributer
type
Contributor
struct
{
Name
string
`json:"name,omitempty"`
Email
string
`json:"email,omitempty"`
...
...
@@ -241,8 +238,7 @@ func (c Contributor) String() string {
// Contributors gets the repository contributors list.
//
// GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#contributer
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributer
func
(
s
*
RepositoriesService
)
Contributors
(
pid
interface
{},
options
...
OptionFunc
)
([]
*
Contributor
,
*
Response
,
error
)
{
project
,
err
:=
parseID
(
pid
)
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment