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
e7bb5915
Commit
e7bb5915
authored
May 10, 2019
by
alex.berger@nexiot.ch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix linter errors.
parent
29328820
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
project_import_export.go
project_import_export.go
+14
-10
No files found.
project_import_export.go
View file @
e7bb5915
...
...
@@ -15,18 +15,22 @@ type ProjectImportExportService struct {
client
*
Client
}
// ExportProject
s
Options represents the available ExportProject() options.
// ExportProjectOptions represents the available ExportProject() options.
//
// GitLab API docs: https://docs.gitlab.com/ee/api/project_import_export.html#schedule-an-export
type
ExportProject
s
Options
struct
{
type
ExportProjectOptions
struct
{
Description
*
string
`url:"description,omitempty" json:"description,omitempty"`
Upload
struct
{
U
rl
*
string
`json:"url,omitempty"`
H
ttp
Method
*
string
`json:"http_method,omitempty"`
U
RL
*
string
`json:"url,omitempty"`
H
TTP
Method
*
string
`json:"http_method,omitempty"`
}
`json:"upload,omitempty"`
}
func
(
s
*
ProjectImportExportService
)
ExportProject
(
pid
interface
{},
opt
*
ExportProjectsOptions
,
options
...
OptionFunc
)
(
*
Response
,
error
)
{
// ExportProject schedule project export.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/project_import_export.html#schedule-an-export
func
(
s
*
ProjectImportExportService
)
ExportProject
(
pid
interface
{},
opt
*
ExportProjectOptions
,
options
...
OptionFunc
)
(
*
Response
,
error
)
{
project
,
err
:=
parseID
(
pid
)
if
err
!=
nil
{
return
nil
,
err
...
...
@@ -58,7 +62,7 @@ type ProjectExportStatus struct {
ExportStatus
*
string
`json:"export_status,omitempty"`
Message
*
string
`json:"message,omitempty"`
Links
struct
{
A
pi
URL
*
string
`json:"api_url,omitempty"`
A
PI
URL
*
string
`json:"api_url,omitempty"`
WebURL
*
string
`json:"web_url,omitempty"`
}
`json:"_links,omitempty"`
}
...
...
@@ -67,7 +71,7 @@ func (s ProjectExportStatus) String() string {
return
Stringify
(
s
)
}
// Get
Project
ExportStatus Get the status of export.
// GetExportStatus Get the status of export.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/project_import_export.html#export-status
...
...
@@ -89,7 +93,7 @@ func (s *ProjectImportExportService) GetExportStatus(pid interface{}, options ..
return
pb
,
resp
,
err
}
//
GetProjectExportDownload
Download the finished export.
//
DownloadExport
Download the finished export.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/project_import_export.html#export-download
...
...
@@ -145,7 +149,7 @@ type ProjectImportStatus struct {
func
(
s
ProjectImportStatus
)
String
()
string
{
return
Stringify
(
s
)
}
//
GetProjectImportFile
import the project.
//
ImportProject
import the project.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/project_import_export.html#import-a-file
...
...
@@ -162,7 +166,7 @@ func (s *ProjectImportExportService) ImportProject(opt *ImportFileOptions, optio
return
pb
,
resp
,
err
}
// Get
Project
ImportStatus Get the status of an import.
// GetImportStatus Get the status of an import.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/project_import_export.html#import-status
...
...
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