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
b75a71e9
Commit
b75a71e9
authored
Oct 11, 2018
by
Sune Keller
Committed by
Sander van Harmelen
Oct 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Discussions API implementation (#481)
Add Discussions API implementation
parent
b9570190
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
15 deletions
+44
-15
discussions.go
discussions.go
+0
-0
gitlab.go
gitlab.go
+2
-0
notes.go
notes.go
+42
-15
No files found.
discussions.go
0 → 100644
View file @
b75a71e9
This diff is collapsed.
Click to expand it.
gitlab.go
View file @
b75a71e9
...
...
@@ -287,6 +287,7 @@ type Client struct {
CustomAttribute
*
CustomAttributesService
DeployKeys
*
DeployKeysService
Deployments
*
DeploymentsService
Discussions
*
DiscussionsService
Environments
*
EnvironmentsService
Events
*
EventsService
Features
*
FeaturesService
...
...
@@ -426,6 +427,7 @@ func newClient(httpClient *http.Client) *Client {
c
.
CustomAttribute
=
&
CustomAttributesService
{
client
:
c
}
c
.
DeployKeys
=
&
DeployKeysService
{
client
:
c
}
c
.
Deployments
=
&
DeploymentsService
{
client
:
c
}
c
.
Discussions
=
&
DiscussionsService
{
client
:
c
}
c
.
Environments
=
&
EnvironmentsService
{
client
:
c
}
c
.
Events
=
&
EventsService
{
client
:
c
}
c
.
Features
=
&
FeaturesService
{
client
:
c
}
...
...
notes.go
View file @
b75a71e9
...
...
@@ -40,22 +40,49 @@ type Note struct {
Title
string
`json:"title"`
FileName
string
`json:"file_name"`
Author
struct
{
ID
int
`json:"id"`
Username
string
`json:"username"`
Email
string
`json:"email"`
Name
string
`json:"name"`
State
string
`json:"state"`
CreatedAt
*
time
.
Time
`json:"created_at"`
AvatarURL
string
`json:"avatar_url"`
WebURL
string
`json:"web_url"`
ID
int
`json:"id"`
Username
string
`json:"username"`
Email
string
`json:"email"`
Name
string
`json:"name"`
State
string
`json:"state"`
AvatarURL
string
`json:"avatar_url"`
WebURL
string
`json:"web_url"`
}
`json:"author"`
System
bool
`json:"system"`
ExpiresAt
*
time
.
Time
`json:"expires_at"`
UpdatedAt
*
time
.
Time
`json:"updated_at"`
CreatedAt
*
time
.
Time
`json:"created_at"`
NoteableID
int
`json:"noteable_id"`
NoteableType
string
`json:"noteable_type"`
NoteableIID
int
`json:"noteable_iid"`
System
bool
`json:"system"`
ExpiresAt
*
time
.
Time
`json:"expires_at"`
UpdatedAt
*
time
.
Time
`json:"updated_at"`
CreatedAt
*
time
.
Time
`json:"created_at"`
NoteableID
int
`json:"noteable_id"`
NoteableType
string
`json:"noteable_type"`
Position
*
NotePosition
`json:"position"`
Resolvable
bool
`json:"resolvable"`
Resolved
bool
`json:"resolved"`
ResolvedBy
struct
{
ID
int
`json:"id"`
Username
string
`json:"username"`
Email
string
`json:"email"`
Name
string
`json:"name"`
State
string
`json:"state"`
AvatarURL
string
`json:"avatar_url"`
WebURL
string
`json:"web_url"`
}
`json:"resolved_by"`
NoteableIID
int
`json:"noteable_iid"`
}
// NotePosition represents the "position" attributes on a note
type
NotePosition
struct
{
BaseSHA
string
`json:"base_sha"`
StartSHA
string
`json:"start_sha"`
HeadSHA
string
`json:"head_sha"`
PositionType
string
`json:"position_type"`
NewPath
string
`json:"new_path,omitempty"`
NewLine
int
`json:"new_line,omitempty"`
OldPath
string
`json:"old_path,omitempty"`
OldLine
int
`json:"old_line,omitempty"`
Width
int
`json:"width,omitempty"`
Height
int
`json:"height,omitempty"`
X
int
`json:"x,omitempty"`
Y
int
`json:"y,omitempty"`
}
func
(
n
Note
)
String
()
string
{
...
...
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